Sunday, September 8, 2013

Network progresses on Pong 2013

Updates in real time:

12:03pm: I implemented the ball in the playing room to see if we can interact between the pads and right away I found a problem. In my mind I wanted to send (back and forth) less data possible. For a pong game I was thinking was enough to send the y coordinates of the pads and all the rest could run in local. I didn't deal with one major issue: every single machine works at his own speed. Took me one second to see the pattern of the ball bouncing on the PC was different (whether faster or slower) than the ball bouncing on the test android device. I'm afraid this will lead to only one fix: all the data of the sprite generated must be sent back and forth through the network, nevertheless the ball which can't be managed locally but by the server and sent to the client. A huge amount of work and data...

11:00am: something very similar to the control system of the original Pong 2013 lite has been fixed to control the pads in the networking playing room. I tested it on 3 platforms: iOS, Android and windows all as server and clients and it works with all of them. Atm you can see the first background of pong 2013 with the fields lines and the two pads which are controlled via network and they move properly responding the commands. Also the field limits has been implemented and they work through the network. Above the pad (temporary location) you can see the name of the player (inserted in the connection menu) which moves along the pads. On top there is the number of players connected (which will be max 2 for the nature of the game) 

9:45am: a bit distracted from the F1 GP of Italy which is in the background of my mac I managed the connection in the main room of the game (the one which will be used for playing). Once connected the two pads are shown on the screen in the right place (more or less) and a primordial control system has been added (just to check the how the pads move and show on display)

9:00am: from the temporary menu of connection the user can write (type) the name and decide to be a server within a button. If someone else is already connected as a server the user can see the list of the awaiting servers (IP and name) and can click (or tap if mobile) the server to play against him (as client). It works.

No comments:

Post a Comment