Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 19 Jul 2012
Offline Last Active May 01 2015 08:59 AM

Posts I've Made

In Topic: Game testing - debug vs release configuration

01 May 2015 - 08:05 AM

Thank you for your answers.
I was asking because I work alone or with 1-2 developers so we don't have a group of testers.
I believe open beta could be a solution.

In Topic: Chain of Events

11 June 2013 - 01:41 PM

I like it very much. Though killing your father sounds too harsh to me.

Can you tell more about the game?


In Topic: SDL_net get MAC address from socket

14 May 2013 - 12:11 PM

Oh thank you, you're absolutely right!

In Topic: Which physics library can also step backwards in time?

19 December 2012 - 10:31 AM

Well what I want to do is like a multiplayer racing game over network, so something with physics over network.
I have read some articles about it, here is what I think how it would work:
Say I have a client and a server. I measure the latency between them, one direction it's ping/2. Let's say ping is 200 ms, so one way latency is 100 ms.
The physics simulations runs on the server, but the client also tries to approximate it. If the client gets an input for example to move, sends it to the server that it wants to move. Then the server has to roll back time of the physics with 100 ms, because the action of the client happened at that time. Then apply the action, and go forward with time 100 ms again.
The server sends the actual positions and velocities let's say 10 times a second. When the client receives positions, the ones it got are the positions reflecting the physics state 100 ms earlier, so the client sets those positions and velocities and advances time by 100 ms.

For this, restarting the simulation every time when teleporting objects, would be too often to do. I'm going to use Box2D. I don't know if you have problems with collisions when setting the new positions and velocities.
So is it correct what I think of? Or do I make it overcomplicated?

In Topic: Which physics library can also step backwards in time?

18 December 2012 - 08:54 AM

Thank you for your reply.

b)Save snapshots at some interval, then either interpolate or simulate forward/backward from closest point (whichever works the best)

So I'm going to do this. Set the position, rotation, velocity and angular velocity at the earlier of the two frames next to the desired time. Then advance physics by the difference between the desired time and the frame time.
This should be better than interpolating between two frames myself, because a collision might happen in the meantime.