Doing the movment in demos
What i was thinking was that i could run my program in some kind of mode and each time i press a key, it logs it in a file, the keys mainly the ones that are doing the moving, like up_arrow and such. Then i could have complete control over how i want to be moving in my demo, also i would log the changes in the mouse coordinates and log it to the file.
Then the next time i run the program, i turn off that mode and it looks inside that file for its input each frame, so i get the same movement each and every time as if it were a demo.
I was wondering if most people do it like this, when i started thinking about it, i would have to store ALOT of data, and i was wondering if there is a better approach?
Thanks
"What we do in life, echos in eternity" -- Gladiator
"What we do in life, echos in eternity" -- Gladiator
You might want to store only "key" positions and use interpolations between those...
For example, moving the camera along a bezier patch and interpolating its orientation using quaternions and slerp might be a not-so-bad approach.
SaM3d!, a cross-platform API for 3d based on SDL and OpenGL.
The trouble is that things never get better, they just stay the same, only more so. -- (Terry Pratchett, Eric)
For example, moving the camera along a bezier patch and interpolating its orientation using quaternions and slerp might be a not-so-bad approach.
SaM3d!, a cross-platform API for 3d based on SDL and OpenGL.
The trouble is that things never get better, they just stay the same, only more so. -- (Terry Pratchett, Eric)
SaM3d!, a cross-platform API for 3d based on SDL and OpenGL.The trouble is that things never get better, they just stay the same, only more so. -- (Terry Pratchett, Eric)
I use milkshape:
I generate my environment or psudoenvironment (using milkshape). I create a joint in the program and create a psudofrustum (just so that i can know the orientation of the soon to become camera). Then i export the animation on that individual joint. When i bring it into my program i do the animation but when i go to apply the transformation the joint generates, i apply the inverse transform (because it is a camera).
If you look in my two towers demo...all of the scenes' (all three of them...
) cameras are done using this method.
Its exactly the same method that rodzilla mentions except with a milkshape interface...
[edited by - llvllatrix on January 14, 2004 9:39:30 AM]
[edited by - llvllatrix on January 14, 2004 11:12:19 AM]
I generate my environment or psudoenvironment (using milkshape). I create a joint in the program and create a psudofrustum (just so that i can know the orientation of the soon to become camera). Then i export the animation on that individual joint. When i bring it into my program i do the animation but when i go to apply the transformation the joint generates, i apply the inverse transform (because it is a camera).
If you look in my two towers demo...all of the scenes' (all three of them...

quote:
You might want to store only "key" positions and use interpolations between those...
For example, moving the camera along a bezier patch and interpolating its orientation using quaternions and slerp might be a not-so-bad approach.
Its exactly the same method that rodzilla mentions except with a milkshape interface...

[edited by - llvllatrix on January 14, 2004 9:39:30 AM]
[edited by - llvllatrix on January 14, 2004 11:12:19 AM]
This is something that is done by professional games (Age of Empires II) to record for playback the game and also to sycronize gameplay across a network (just send the keystrokes and let the other computer figure out the rest.) But there are problems and pitfalls. See the following gama article.
http://www.gamasutra.com/features/20010713/dickinson_01.htm
Good Luck,
-----------
VenDrake
"My stupid jar is full. I can''t talk to you anymore."
http://www.gamasutra.com/features/20010713/dickinson_01.htm
Good Luck,
-----------
VenDrake
"My stupid jar is full. I can''t talk to you anymore."
-------------VenDrakeTo understand recursion, you must first understand recursion.
check out CD579''s post in this thread: http://www.gamedev.net/community/forums/topic.asp?topic_id=195527
I used the ideas in his pseudo code to interpolate between keyframes.
I already had the camera class from the tutorials at gametutorials.com for movement within my program. I displayed the poistion and direction numbers in text in my program and then wrote them done on paper. I then hard coded them into arrays and interpolated through the keyframes in those arrays.
Writing them down on paper and hardcoding them is not the best way to do it. You can setup a key that when pressed will write the current position data into a file and then read in that file the next time you start your program.
I used the ideas in his pseudo code to interpolate between keyframes.
I already had the camera class from the tutorials at gametutorials.com for movement within my program. I displayed the poistion and direction numbers in text in my program and then wrote them done on paper. I then hard coded them into arrays and interpolated through the keyframes in those arrays.
Writing them down on paper and hardcoding them is not the best way to do it. You can setup a key that when pressed will write the current position data into a file and then read in that file the next time you start your program.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement