Presentation is loading. Please wait.

Presentation is loading. Please wait.

Wireless Pong on the Nokia 770 Jason Waterman EE194-WIR April 27th, 2006.

Similar presentations


Presentation on theme: "Wireless Pong on the Nokia 770 Jason Waterman EE194-WIR April 27th, 2006."— Presentation transcript:

1 Wireless Pong on the Nokia 770 Jason Waterman EE194-WIR April 27th, 2006

2 Platform and Game Choices Why Pong? Pong is a classic video game Not turn based, so interesting to implement Why Nokia 770? I own one It runs Linux Possible to do most development on a desktop

3 Under the Hood Client server architecture Clients connect to server at known port to start Written in Python Uses pygame which is based on SDL Very portable, runs on Linux, Macs, PCs. GameServer Player1Player2 Player1 Inputs Player2 Updates Player2 Inputs Player1 Updates

4 Players talk to server via TCP socket connection Every time a player moves the paddle, an update message is sent to server Server will relay this new position to the other player Only one message format is used to simplify the design Message contains ball position, ball angle, paddle position, timestamp, and event (Update, Hit, Miss, Launch) Data is transfered over the network using Python’s marshaling functions called pickle Communication Details

5 Dead Reckoning and Time Synchronization Ball position is calculated using dead Reckoning Each player locally calculates ball position for each frame, but it is possible that local calculations can get out of sync with server So, server occasionally sends ball status and players can update with that information Players clocks must be synchronized with the server for this to work.

6 Conclusions Nokia 770 is a good platform for mobile networked games Python and SDL and run fine on the 770 and allows one to quickly develop games UDP is better then TCP for realtime updates Time synchronization is very important for dead reckoning


Download ppt "Wireless Pong on the Nokia 770 Jason Waterman EE194-WIR April 27th, 2006."

Similar presentations


Ads by Google