Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (525)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (594)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  game recording  (Read 1448 times)
0 Members and 1 Guest are viewing this topic.
Offline bitshit

Junior Devvie




Java games rock!!


« Posted 2005-12-29 18:16:55 »

Whats a good strategy to record a sequence of gamestates?

Kinda like a playback for a race game, I guess I'd need a fixed timestep to increment my gamelogic with, fx each 10ms between gamelogic updates indepenand of framerate. But what would be a good way to store the gamestate variables each 10ms? I know serialisation is overkill, write them in a dataoutputstream? And maybe wrap this around a zipstream to compress it a bit?

I guess it's also closely related to networking games, that also need to send gamestate updates regulary but then over the network...
Offline elias

Senior Devvie





« Reply #1 - Posted 2005-12-29 20:03:06 »

Another strategy is keeping the game state deterministic and only recording input (key presses). Take a look at

http://www.gamasutra.com/features/20010322/terrano_01.htm

to see what I mean. Make sure to use strictfp if your game state involves floating point operations.

 - elias

8: Undefined index: online
File: /home/jgo/public_html/Themes/default/Display.template.php (main sub template - eval?)
Line: 161