MMOG, Rendering and Thinking

Started by
3 comments, last by RFLAGG 20 years ago
Okay, so I’m making a 3d mmog... Currently, say you jump, it sets your velocity to lets say 100m/s, then decreases at 9.8m/s(earth gravity) every frame. Now lets say it should take 1.5 seconds from the point you jump till the point you land. What if you have a slow computer that runs the program at 6fps? If i get 1.5 seconds on 60fps, then it would take 15 seconds for a jump on the other computer. Now if a third computer ran at 600fps, then it would be done in .15 seconds. If this were a single player game, I would just set the fps limit to 60fps and if the computer was to slow, then too bad for the user. On an mmog though, there must be a high level of synchronicity. So basically i need to have a constant frame of reference for time. Basically what it does now is while (running) { check user inputs move stuff render to screen } If anyone can help, it would be greatly appreciated, I''ve looked around for something that could help me, but I couldn''t find anything (if there’s something else on the forums like this I''m really sorry) www.openwar.net www.openwar.net/members/forums/
www.openwar.netwww.openwar.net/members/forums/
Advertisement
quote:Original post by RFLAGG
then decreases at 9.8m/s(earth gravity) every frame.

you should decrease it 9.8m/s every second , not every frame .
--- krez ([email="krez_AT_optonline_DOT_net"]krez_AT_optonline_DOT_net[/email])
quote:Original post by krez
quote:Original post by RFLAGG
then decreases at 9.8m/s(earth gravity) every frame.

you should decrease it 9.8m/s every second , not every frame .


the problem is frames are my measuerment of time.

EDIT: by frame i meant every x frame, were x = amount of fps I want

[edited by - rflagg on April 14, 2004 10:13:57 PM]
www.openwar.netwww.openwar.net/members/forums/
You need to define a basic update speed, where everybody runs the game at that update speed. If you can''t keep up with that speed, for physics, your machine is too low spec and gets booted from the game.

Then, you render in the time that''s left, which may be more or less often than your update rate.

There''s a better explanation of the Canonical Game Loop at
http://www.mindcontrol.org/~hplus/graphics/game_loop.html


enum Bool { True, False, FileNotFound };
Thanks, that''s exactly what I needed :D

www.openwar.net
www.openwar.net/members/forums/
www.openwar.netwww.openwar.net/members/forums/

This topic is closed to new replies.

Advertisement