Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

SkinnyM

Doing the movment in demos

This topic is 5326 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
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)

Share this post


Link to post
Share on other sites
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.

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]

Share this post


Link to post
Share on other sites
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."

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!