|
Post by hamalnamal on May 1, 2004 18:23:56 GMT -5
yeah i guess, if you added a third dimension how many movment directions could u make?
|
|
|
Post by IsmAvatar on May 1, 2004 22:42:43 GMT -5
Then you'd have 2 directions (direction1 and direction2), probably. Vertical direction, and horizontal direction.
I'm not sure, though. Haven't taken physics. Probably wouldn't really measure it in directions anymore then, they'd probably just go to the hspeed, vspeed, and the new dspeed (3 dimensions), or, as you may be more familiar, x,y, and z.
Whatever the case, keep in mind that pi is rounded off.
|
|
|
Post by hamalnamal on May 31, 2004 20:33:37 GMT -5
cool, a bit off topic, but im taking precal next year, ill ask my teacher and tell you, i find it interesting so others might.
|
|
|
Post by IsmAvatar on Jun 1, 2004 12:32:29 GMT -5
I'm taking physics next year, so I should have a full knowledge of it all at the end of the school year.
In the 8 direction games, if you add in the 3rd dimension, you'd have 3x3x3-1 = 26 directions. Think of a rubics cube. Most programmers don't feel like writing 26 if statements, so they start using 3d arrays. Though, by this point, they'd have to do 45 degree steps, and it's much easier to do 1 degree steps, so they go the whole 9 yards and just make it so you can walk in whatever direction you want. I like this method. It's the method you see in most 3d games, like Ocarana of TIme, Mario 3d, DK3d, add in the mouse and you have the computer 3d games (i'm not gonna list them). So glad there's a control stick on N64.
(heh, trying to bring this back on topic, can you tell? lol)
|
|
|
Post by phatsk8boarder on Feb 23, 2005 23:08:25 GMT -5
it's probably already been answered or talked about in this topic, but i'm short on time and skipped to the end. i personally prefer 8-directional movement, but it's always been strange. the character always moves faster when i move in a diagonal direction. however, earlier me and nailog were in a long discussion about angled movement, and we figured out a method to get the speed for angled movement and strait movement(x or y) nearly exact. it was only off by maybe a decimal in the hundreths position, such as 2.2 versus 2.24. gotta love geometry.
|
|
|
Post by IsmAvatar on Feb 24, 2005 11:56:28 GMT -5
it's actually trigonometry, not geometry. And the simpler, memorized version of trig. 45 degrees (pi/4) is root 2 over 2, times the speed. or, if you like numbers, (.7071) times speed in the x and y direction. So the resultant of just having an hspeed and vspeed of 1, and using the direction and speed, differs by 1-.7071 or (.2929) times speed. After 10 steps of a 1 speed, you'd be 3 pixels off. Every 3.4 steps, you'd be 1 pixel off.
|
|
|
Post by phatsk8boarder on Feb 24, 2005 16:51:55 GMT -5
true, but in my method i used geometry, through a 45-45-90 special triangles situation. i guess saying speed threw you off, but in speed i meant the amount added to x or y every step. because i was adding based on an x and y grid so i decided to work it out on a graph, and realized that i could use the 45-45-90 special triangles theorem which is that the hypotenuse is equal to x times the square root of 2.
|
|
|
Post by IsmAvatar on Feb 25, 2005 13:10:34 GMT -5
the hypotenuse is the speed. so, speed = x*sqrt(2) divide both sides by sqrt2 speed/sqrt(2) = x but you can't have a root on the bottom, so multiply it by sqrt(2)/sqrt(2) (which happens to be 1, so you don't have to do it to the other side).
speed*sqrt(2)/2 as I said in trig, sqrt(2)/2, times the speed.
Same thing. So I guess it is geometry. just been so long since I've taken it, I do everything the trig way now.
|
|