- Mark as New
- Follow
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
Why not send one packet with current X, Y and the direction the paddle is moving in (add speed if you have variable paddle speeds). Then only send another packet when the paddle stops or changes direction. Otherwise send nothing at all. I have a little tank iphone game and that's the kind of approach I'm taking for multiplayer. I think that's a pretty common approach in online multiplayer games, send messages when something interesting happens, like ball hits a paddle or a paddle starts moving. Then periodically send heartbeat messages with score, status, x, y, etc, just to keep things synced.
In this case I think you want to do a coin flip to make one player the "server" and one the client, then the server has the final word on things like player 1 just missed the ball. A bit more complicated but should drastically cut down the ammount of messages you have to send. Just a thought don't mean to butt in.
-Eric
Views
Replies
Total Likes