Animating and Command Reading

Blitz3D Forums/Blitz3D Beginners Area/Animating and Command Reading

Gauge(Posted 2004) [#1]
How many frames should i run per command read? I plan on reading the command(s) and then running 5 to 10 frames of animation. Or how else should I do it?

Like this:

Main Loop:
*ReadCommands
*Set animation,etc
*Renderworld,etc 5(10)x

I'm also attempting to get a multiplayer server going and would like to know how to properly set up the animation/renderworld. I'd like to have x# amount of frames run between each readplayer, so how should i do this? Heres what I figure out what the client and server should do.

Server Main Loop:
Read each player
MoveEachplayer
Send each player e/player
send each mob/etc
updateworld

Client Main loop:
readcommand
sendcommand
read each player
read each mob/etc
updateworld


WolRon(Posted 2004) [#2]
I have no idea what you mean by "command read", and "reading the command(s)".
Please explain better. Do you mean to collect player input?
If collecting player input is what you mean, then that depends on the type of game (turn-based or real-time), and what you are trying to achieve. Mostly, I guess it depends on what YOU want, not really what anyone else thinks. Only you know how you want your game to 'run'.


Also, this looks wrong:
Main Loop:
*ReadCommands
*Set animation,etc
*Renderworld,etc 5(10)x

Why would you want to RenderWorld 5 to 10 times within the same loop? Seems pointless. There are times that you may want to render more than one thing at a time or from more than one camera at a time, but rendering the same scene from the same camera 5-10 times in a row within the same frame is pointless.
What are you trying to achieve with the multiple renders?
Did you actually mean something like this: ?

Main Loop:
frame = frame + 1
If frame = 1 then *ReadCommands
If frame = 5 then frame = 0
*Set animation,etc
*Renderworld,etc
End of loop

which essentially reads commands (whatever that means...) every 5th frame.