project. we had lot of discussion and finally i gave up and left
On Apr 27, 10:59 pm, Nate <
nathan.sw...@gmail.com> wrote:
> From the stacktrace, I can't tell why the exception is occurring. I
> encourage you to not use ObjectSpace so you can better understand what is
> going on. Structure your app like this:
>
> * The server has list of balls. When a client connects, a ball is added to
> the list for that client. When a client disconnects, their ball is removed.
>
> * The server has a thread. It sleeps for X seconds, then moves all the balls
> and sends the new positions to all clients, then repeats.
>
> * The client connects to the server.
>
> * The client draws all the balls at the last position the server told it.
>
> This way you can have multiple clients connect, and they will all see the
> same balls moving around. The movement will only be updated X seconds,
> because the server thread only updates them every X seconds. Get that
> working first, then you can worry about how to make the balls move smoother
> (client side prediction), how clients can control their balls, etc.
>
> -Nate
>