H!
I have one fast pc and a slow pc with a terrible slow videocard ;)
And what do I get when I'm testing my game with that : wrong results.
When the player moves it sending the code of direction.
For example Right -> 1
----
1.
Fast pc [host]
idle
Slow pc [client]
player is going right {player moves very slow}
2.
Fast pc
the client is much much more to the right then at the slow pc
---------------
When I use 2 fast pc's everything is oke.
But now my question.
What to do ?
- block slow computers with a frame test ?
- what frame tweening can I use ?
- how to get it 1:1 ? [or is that a bad idea]
I found this in the 3D code archives, i don't know if its working for 2D like it must.
I have one fast pc and a slow pc with a terrible slow videocard ;)
And what do I get when I'm testing my game with that : wrong results.
When the player moves it sending the code of direction.
For example Right -> 1
----
1.
Fast pc [host]
idle
Slow pc [client]
player is going right {player moves very slow}
2.
Fast pc
the client is much much more to the right then at the slow pc
---------------
When I use 2 fast pc's everything is oke.
But now my question.
What to do ?
- block slow computers with a frame test ?
- what frame tweening can I use ?
- how to get it 1:1 ? [or is that a bad idea]
I found this in the 3D code archives, i don't know if its working for 2D like it must.
period=1000 / 30 tweentime = MilliSecs()-period While 1 ;====== CALCULATE TWEEN ============== Repeat elapsed = MilliSecs() - tweentime Until elapsed ticks = elapsed/period tween# = Float(elapsed Mod period) / Float(period) ;======================================= ;Game LOOP For k=1 To ticks tweentime = tweentime+period If KeyDown(1) End EndIf ;TCP network stuff Next Cls ; Draw everything on the screen Flip Wend