Network problem with my game...

Joined
Apr 28, 2009
Messages
1
Reaction score
0
Yo!
I'm currently writing a small game where you are supposed to move around balls on the screen (yes, very simple), and over the network with other players ofc.

And I've got it to work so players can move around on the screen, there's only one small problem, when a player stops, it kinda "jumps" to its right position, as if it was corrected to the right position.

And if I put my game and server simple, it would look like:
1. When player connects, the client creates a instance for every player's ball with some move functions and so.
2. When a player wants to move, it sends a message that reads something like "1|15,17|1,0" - where "1" is the player ID, "15,17" is the coordinates and "1,0" is the velocity.
3. When the server gets the message, it sends it to all clients connected.
4. Then when the clients gets the message, it updates the player's coordinates, and then it sets the direction of the player.
5. And at last, the clients updates every player to move in that direction given in the instance, until it will get "0,0" as velocity ofc.

I might have to provide you with some code to understand more. but if you think you know what the problem could be, please post :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,740
Latest member
AdolphBig6

Latest Threads

Top