Skip to main content
gamedev.net
🔒 Locked

[java] Networked Pong Problems

Started by Idej-Avaj 0 replies 500+ views
Original Post
Idej-Avaj
Idej-Avaj
What would be the best way to sync a network game for Pong? My friend and I are updating BingBong to version 2.0 and we''re including Direct IP play. The problem is, however, that when a network game is played - the ball doesn''t move at the same rate on each computer, and ends up being in different places. I''ve written the code for true velocity (Thanks Jiim), but this doesn''t seem to help because the two games start at what seems to be different times. Would a good way to counter this problem be by sending the actual X,Y coordinates of the ball to the other computer? As of now, the ball moves just with the regular step/velocity method... could this be the major problem? Thanks for any help on this!
Soulice
Soulice
You are going to have to use x,y coords because diff pc''s may varie the calc results if you are using system time.

x y coords sent from a server to each client every 30ms or so shoudl do nicely

-Soulice
-Soulice

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.