Futurecraft Forums

A forum dedicated to communication and innovation!
 
HomeCalendarFAQSearchMemberlistUsergroupsRegisterLog in
Welcome, one and all, to the Futurecraft Forums!

Share | 
 

 Keon's Dev Log

Go down 
Go to page : Previous  1, 2, 3 ... , 9, 10, 11  Next
AuthorMessage
The Schmetterling
DEV
DEV
avatar

Posts : 3123
Join date : 2011-08-31
Location : I'm a butterfly.

PostSubject: Re: Keon's Dev Log   Mon Jul 09, 2012 5:27 pm

Keon wrote:
Hmmm. Does anybody know if entities are programmed to handle pitch, yaw, and roll? I can't find roll anywhere.

Of course there's no roll. Things in Minecraft have no need to roll. Have you seen a falling animal? The stay perfectly vertical the entire time.

_________________



Noli timere tenebras quam lucem, id est tortor.


Spoiler:
 



Mackeroth est abiit. Hinc abiit, et misit me in profundum subconscious!
Back to top Go down
View user profile
fr0stbyte124
Super Developrator
Super Developrator
avatar

Posts : 1835
Join date : 2011-10-13

PostSubject: Re: Keon's Dev Log   Mon Jul 09, 2012 5:39 pm

Nothing uses roll in Minecraft, no. Most things don't use pitch either. And the yaw is backwards.
Back to top Go down
View user profile
Keon
Lord/Lady Rear Admiral 1st
Lord/Lady Rear Admiral 1st
avatar

Posts : 3075
Join date : 2012-01-17
Location : Hahahaha.

PostSubject: Re: Keon's Dev Log   Mon Jul 09, 2012 5:40 pm

Ouch.

How does planes mod do it, then? Did they re-code entity?

_________________
fr0stbyte124 wrote:
You know, I was thinking we should have a 3D crafting grid for complex recipes, but Kielaran is right: why have three dimensions when you can have six? Truly I don't know how we ever got by with a measly two.


Mackeroth? wrote:
Now, if Fr0stbyte wrote that, someone would make a sig, guaranteed. So what are you going to do now?
Back to top Go down
View user profile
fr0stbyte124
Super Developrator
Super Developrator
avatar

Posts : 1835
Join date : 2011-10-13

PostSubject: Re: Keon's Dev Log   Mon Jul 09, 2012 6:49 pm

Roll is not present in the base entity class, but there is nothing stopping you from adding it to your new class. Then you add the roll parameter to the opengl rotatef function in your entity render class.

Collision will be a bit interesting currently because bounding boxes can only be axis-aligned (so keep it sized to the outer bounds of the vessel). We'll have custom oriented hitboxes once flying ships are revisited, but for the time being, make do. Alternatively, I think it's possible to link a bunch of smaller axis-aligned BB to a single entity, which was used with the ender dragon. If you need multiple bounding boxes, that is the preferred way to store them to keep the bounding box count down for the host chunk.
Back to top Go down
View user profile
Keon
Lord/Lady Rear Admiral 1st
Lord/Lady Rear Admiral 1st
avatar

Posts : 3075
Join date : 2012-01-17
Location : Hahahaha.

PostSubject: Re: Keon's Dev Log   Wed Jul 11, 2012 9:03 pm

Well. Math. Good old 3d trigonometry to save the day and/or make my life miserable. Seeing as I havn't formally taken 2d trig...

_________________
fr0stbyte124 wrote:
You know, I was thinking we should have a 3D crafting grid for complex recipes, but Kielaran is right: why have three dimensions when you can have six? Truly I don't know how we ever got by with a measly two.


Mackeroth? wrote:
Now, if Fr0stbyte wrote that, someone would make a sig, guaranteed. So what are you going to do now?
Back to top Go down
View user profile
fr0stbyte124
Super Developrator
Super Developrator
avatar

Posts : 1835
Join date : 2011-10-13

PostSubject: Re: Keon's Dev Log   Wed Jul 11, 2012 11:00 pm

Why would you use trigonometry, when you could be using QUATERNIONS! You remember our friend the quaternion, don't you?

In any case, opengl makes rotation easy for you. No real trig required.

glRotatef(float angle, float x, float y, float z)

Angle is the base rotation factor in degrees, and x, y, and z are the coefficients for rotation around a particular axis (counter clockwise is positive). Normally you would do something like glRotatef(60.0, 0, 1.0, 0) to perform yaw, for instance.

To keep things simple do yaw, pitch, and roll as three separate rotations (opengl is pretty efficient with this sort of thing, so no worries). If the movement isn't the what you expected just change up the order. There are only six possible configurations, so trial and error works pretty well here, and of course take a look at the other model render classes if you need help with the syntax.
Back to top Go down
View user profile
Keon
Lord/Lady Rear Admiral 1st
Lord/Lady Rear Admiral 1st
avatar

Posts : 3075
Join date : 2012-01-17
Location : Hahahaha.

PostSubject: Re: Keon's Dev Log   Thu Jul 12, 2012 7:28 pm

fr0stbyte124 wrote:
To keep things simple do yaw, pitch, and roll as three separate rotations (opengl is pretty efficient with this sort of thing, so no worries). If the movement isn't the what you expected just change up the order. There are only six possible configurations, so trial and error works pretty well here, and of course take a look at the other model render classes if you need help with the syntax.

Shoulda thought of that. Anyways, the only real trig is changing from a spherical coord system for the thrust vector to a plane.

_________________
fr0stbyte124 wrote:
You know, I was thinking we should have a 3D crafting grid for complex recipes, but Kielaran is right: why have three dimensions when you can have six? Truly I don't know how we ever got by with a measly two.


Mackeroth? wrote:
Now, if Fr0stbyte wrote that, someone would make a sig, guaranteed. So what are you going to do now?
Back to top Go down
View user profile
Keon
Lord/Lady Rear Admiral 1st
Lord/Lady Rear Admiral 1st
avatar

Posts : 3075
Join date : 2012-01-17
Location : Hahahaha.

PostSubject: Re: Keon's Dev Log   Sun Jul 29, 2012 6:49 pm

It rotates. Pics in an hour or two.

_________________
fr0stbyte124 wrote:
You know, I was thinking we should have a 3D crafting grid for complex recipes, but Kielaran is right: why have three dimensions when you can have six? Truly I don't know how we ever got by with a measly two.


Mackeroth? wrote:
Now, if Fr0stbyte wrote that, someone would make a sig, guaranteed. So what are you going to do now?
Back to top Go down
View user profile
Tiel+
Lord/Lady Rear Admiral 1st
Lord/Lady Rear Admiral 1st
avatar

Posts : 5497
Join date : 2012-02-20
Age : 20
Location : AFK

PostSubject: Re: Keon's Dev Log   Sun Jul 29, 2012 7:03 pm

Shipyards? :c
Back to top Go down
View user profile
Grand Imperial Thunder
Infantry
Infantry


Posts : 714
Join date : 2012-01-31
Location : Saturday is awesome.

PostSubject: Re: Keon's Dev Log   Sun Jul 29, 2012 7:55 pm

Lord Tiel wrote:
Shipyards? :c
Who cares? Now we can roll!
Back to top Go down
View user profile
torrentialAberration
Infantry
Infantry
avatar

Posts : 727
Join date : 2012-06-20
Age : 104
Location : omnipresent

PostSubject: Re: Keon's Dev Log   Sun Jul 29, 2012 8:01 pm

Tunnelthunder wrote:
Lord Tiel wrote:
Shipyards? :c
Who cares? Now we can roll!

i care
Back to top Go down
View user profile
The Schmetterling
DEV
DEV
avatar

Posts : 3123
Join date : 2011-08-31
Location : I'm a butterfly.

PostSubject: Re: Keon's Dev Log   Tue Jul 31, 2012 8:25 am

Keon wrote:
It rotates. Pics in an hour or two.

Pictures... now?

_________________



Noli timere tenebras quam lucem, id est tortor.


Spoiler:
 



Mackeroth est abiit. Hinc abiit, et misit me in profundum subconscious!
Back to top Go down
View user profile
Keon
Lord/Lady Rear Admiral 1st
Lord/Lady Rear Admiral 1st
avatar

Posts : 3075
Join date : 2012-01-17
Location : Hahahaha.

PostSubject: Re: Keon's Dev Log   Tue Jul 31, 2012 10:51 am

I'm still working stuff out. Maybe the other coders can help me here.

GL11.glRotatef((float)par1EntityFighter.FighterPitch, 1.0F, 0.0F, 0.0F);
GL11.glRotatef((float)par1EntityFighter.FighterYaw, 0.0F, 1.0F, 0.0F);
GL11.glRotatef((float)par1EntityFighter.FighterRoll, 0.0F, 0.0F, 1.0F);

It seems like FighterRoll will be accurate to everything, so wherever the nose is the roll will be too. Yaw is accurate to pitch, but does not work with roll. Pitch is just up and down, it does not care about yaw or roll.

I tried to do them all in one,

float pitch = (float)par1EntityFighter.FighterPitch/360.0F;
float yaw = (float)par1EntityFighter.FighterYaw/360.0F;
float roll = (float)par1EntityFighter.FighterRoll/360.0F;
GL11.glRotatef(360, pitch, yaw, roll);//pitch, yaw and roll would in this case be stuff like 0.5F, for 180.

This does nothing, no rotation at all.

Frost, sounds like you have experience with that, how did you get it to work.

As for pictures:




_________________
fr0stbyte124 wrote:
You know, I was thinking we should have a 3D crafting grid for complex recipes, but Kielaran is right: why have three dimensions when you can have six? Truly I don't know how we ever got by with a measly two.


Mackeroth? wrote:
Now, if Fr0stbyte wrote that, someone would make a sig, guaranteed. So what are you going to do now?
Back to top Go down
View user profile
fr0stbyte124
Super Developrator
Super Developrator
avatar

Posts : 1835
Join date : 2011-10-13

PostSubject: Re: Keon's Dev Log   Tue Jul 31, 2012 11:29 am

Are you using degrees? It's supposed to be in degrees.
Back to top Go down
View user profile
Keon
Lord/Lady Rear Admiral 1st
Lord/Lady Rear Admiral 1st
avatar

Posts : 3075
Join date : 2012-01-17
Location : Hahahaha.

PostSubject: Re: Keon's Dev Log   Tue Jul 31, 2012 11:43 am

For the first one, yes. The second one is in decimal of 360. Do you mean to use:

GL11.glRotatef(360, 10, 10, 10);

to rotate ten degrees in all directions?

_________________
fr0stbyte124 wrote:
You know, I was thinking we should have a 3D crafting grid for complex recipes, but Kielaran is right: why have three dimensions when you can have six? Truly I don't know how we ever got by with a measly two.


Mackeroth? wrote:
Now, if Fr0stbyte wrote that, someone would make a sig, guaranteed. So what are you going to do now?
Back to top Go down
View user profile
fr0stbyte124
Super Developrator
Super Developrator
avatar

Posts : 1835
Join date : 2011-10-13

PostSubject: Re: Keon's Dev Log   Tue Jul 31, 2012 11:54 am

I have no idea where you are getting that number from, but the first parameter is the angle of rotation in degrees, and the next three make up the vector about which you are rotating. And if you want the expected amount of rotation, it should be a unit vector.
Back to top Go down
View user profile
Keon
Lord/Lady Rear Admiral 1st
Lord/Lady Rear Admiral 1st
avatar

Posts : 3075
Join date : 2012-01-17
Location : Hahahaha.

PostSubject: Re: Keon's Dev Log   Wed Aug 01, 2012 11:02 am

So I guess I'm learning quaternion, or at least matrices.

I'll take a look at Frost's rotation page.

_________________
fr0stbyte124 wrote:
You know, I was thinking we should have a 3D crafting grid for complex recipes, but Kielaran is right: why have three dimensions when you can have six? Truly I don't know how we ever got by with a measly two.


Mackeroth? wrote:
Now, if Fr0stbyte wrote that, someone would make a sig, guaranteed. So what are you going to do now?
Back to top Go down
View user profile
The Schmetterling
DEV
DEV
avatar

Posts : 3123
Join date : 2011-08-31
Location : I'm a butterfly.

PostSubject: Re: Keon's Dev Log   Wed Aug 01, 2012 5:23 pm

Good luck, Keon! The Empire supports you!

_________________



Noli timere tenebras quam lucem, id est tortor.


Spoiler:
 



Mackeroth est abiit. Hinc abiit, et misit me in profundum subconscious!
Back to top Go down
View user profile
fr0stbyte124
Super Developrator
Super Developrator
avatar

Posts : 1835
Join date : 2011-10-13

PostSubject: Re: Keon's Dev Log   Wed Aug 01, 2012 5:54 pm

Keon wrote:
So I guess I'm learning quaternion, or at least matrices.

I'll take a look at Frost's rotation page.
I certainly won't say you shouldn't, but are you understanding the proper input for gl rotation?

GL11.glRotatef(30, 0, 1, 0); //yaws 30 degrees counter-clockwise.

You can do multiple axes at once, but it's much simpler to do them one at a time.


Last edited by fr0stbyte124 on Wed Aug 01, 2012 6:50 pm; edited 1 time in total
Back to top Go down
View user profile
Keon
Lord/Lady Rear Admiral 1st
Lord/Lady Rear Admiral 1st
avatar

Posts : 3075
Join date : 2012-01-17
Location : Hahahaha.

PostSubject: Re: Keon's Dev Log   Wed Aug 01, 2012 6:28 pm

fr0stbyte124 wrote:
Keon wrote:
So I guess I'm learning quaternion, or at least matrices.

I'll take a look at Frost's rotation page.
I certainly won't say you shouldn't, but are you understanding the proper input for gl rotation?

GL11.glRotatef(30, 0, 1, 0); //yaws 45 degrees counter-clockwise.

You can do multiple axes at once, but it's much simpler to do them one at a time.

Why is 30 45 degrees?

Hmmm. Let me see how I can explain. The first thing I rotate, in this case pitch, is compared to the global axises. The second is rotated by the pitch, and it follows a local set of axises that are offset from the original ones by the pitch (The axises themselves have been rotated up and down). The third rotation, pitch, rotates correctly.

That means if I am rolled 90 degrees, so I am sideways, my pitch will rotate me up and down globally, rather than locally.

(What I want: Sideways fighter uses pitch, pulls sideways along ground.)
(What I have: Sideways fighter uses pitch, tilts up in what should be yaw.)

Did I explain that well enough? I can't think of a good way to put it.

_________________
fr0stbyte124 wrote:
You know, I was thinking we should have a 3D crafting grid for complex recipes, but Kielaran is right: why have three dimensions when you can have six? Truly I don't know how we ever got by with a measly two.


Mackeroth? wrote:
Now, if Fr0stbyte wrote that, someone would make a sig, guaranteed. So what are you going to do now?
Back to top Go down
View user profile
fr0stbyte124
Super Developrator
Super Developrator
avatar

Posts : 1835
Join date : 2011-10-13

PostSubject: Re: Keon's Dev Log   Wed Aug 01, 2012 6:50 pm

Keon wrote:

Why is 30 45 degrees?

Because this is what happens when I don't pay attention to the things I write. 30 is 30, sorry for the confusion.

I couldn't tell you which order makes it global and which makes it local without trying both, but to get the other perspective swap the order. It gets more complicated to plan when you add a third rotation, but there are only 6 combinations, and one of them is guaranteed to be what you want.
Back to top Go down
View user profile
Keon
Lord/Lady Rear Admiral 1st
Lord/Lady Rear Admiral 1st
avatar

Posts : 3075
Join date : 2012-01-17
Location : Hahahaha.

PostSubject: Re: Keon's Dev Log   Wed Aug 01, 2012 7:35 pm

fr0stbyte124 wrote:
Keon wrote:

Why is 30 45 degrees?

Because this is what happens when I don't pay attention to the things I write. 30 is 30, sorry for the confusion.

I couldn't tell you which order makes it global and which makes it local without trying both, but to get the other perspective swap the order. It gets more complicated to plan when you add a third rotation, but there are only 6 combinations, and one of them is guaranteed to be what you want.

No. None are, because one will always be not edited. I need to somehow do them all together or all last or I'm not quite sure how.

_________________
fr0stbyte124 wrote:
You know, I was thinking we should have a 3D crafting grid for complex recipes, but Kielaran is right: why have three dimensions when you can have six? Truly I don't know how we ever got by with a measly two.


Mackeroth? wrote:
Now, if Fr0stbyte wrote that, someone would make a sig, guaranteed. So what are you going to do now?
Back to top Go down
View user profile
Keon
Lord/Lady Rear Admiral 1st
Lord/Lady Rear Admiral 1st
avatar

Posts : 3075
Join date : 2012-01-17
Location : Hahahaha.

PostSubject: Re: Keon's Dev Log   Wed Aug 01, 2012 7:52 pm

Okay, my problem is the same as yours in the first page of your devlog. Do you still have your orientation class and the matrix class? And did you ever solve it?

_________________
fr0stbyte124 wrote:
You know, I was thinking we should have a 3D crafting grid for complex recipes, but Kielaran is right: why have three dimensions when you can have six? Truly I don't know how we ever got by with a measly two.


Mackeroth? wrote:
Now, if Fr0stbyte wrote that, someone would make a sig, guaranteed. So what are you going to do now?
Back to top Go down
View user profile
fr0stbyte124
Super Developrator
Super Developrator
avatar

Posts : 1835
Join date : 2011-10-13

PostSubject: Re: Keon's Dev Log   Wed Aug 01, 2012 8:07 pm

Yeah, I see what the problem is now, can quaternions will simplify matters. Unfortunately I didn't get all that far on writing it because there was no pressing need to finish it up. I'll look around for it though.
Back to top Go down
View user profile
Keon
Lord/Lady Rear Admiral 1st
Lord/Lady Rear Admiral 1st
avatar

Posts : 3075
Join date : 2012-01-17
Location : Hahahaha.

PostSubject: Re: Keon's Dev Log   Wed Aug 01, 2012 9:24 pm

Wait, so the quaternions method is what I should do or should not do? Because if I do I have these 10 pages of math that's 2 or so years ahead of me to get through.

_________________
fr0stbyte124 wrote:
You know, I was thinking we should have a 3D crafting grid for complex recipes, but Kielaran is right: why have three dimensions when you can have six? Truly I don't know how we ever got by with a measly two.


Mackeroth? wrote:
Now, if Fr0stbyte wrote that, someone would make a sig, guaranteed. So what are you going to do now?
Back to top Go down
View user profile
Sponsored content




PostSubject: Re: Keon's Dev Log   

Back to top Go down
 
Keon's Dev Log
Back to top 
Page 10 of 11Go to page : Previous  1, 2, 3 ... , 9, 10, 11  Next

Permissions in this forum:You cannot reply to topics in this forum
Futurecraft Forums :: Development :: Development Logs-
Jump to: