Update 1
We have taken an existing JavaScript game called attacke (https://github.com/iamschulz/attacke) and added websocket functionality to facilitate the testing of P2P and C/S using this game. We also built a simple node project which can act as a central server for the C/S testing once ready for that.
Update 2
We have been testing and debugging the websocket functionalities to support the client-server attacke. The work for client-server is complete and we are yet to add the P2P functionality.
Attacke is a 2 player game, and as of now, the game status is updated by sending keyboard inputs of each player to the server, and the server rendering it for the other player, and the other player calculating the other player's position. However, while testing the game, we realized there is some latency in recognizing the time a button is pressed and let go, which results in the game being in different stages for the two players. As a result, we have decided to change the implementation so the position of each player is calculated after the keyboard input by themselves and the position updates are sent to the server and passed to the other player (or sent to other players directly in the p2p implementation). Further, we have decided to add in a third player to the game in order to help us do a better comparison between the C/S and P2P implementations.
We also want to add logging capabilities to the games' websocket connection. This would allow us to get data on how long it took a player's position updates to get to another player. Having this data will be vital in comparing our P2P implementation to C/S implementation.
Update 3
We have completed moving away from sending Keystrokes for communication towards sending position data every 10ms. This has resulted in a much more playable experience as the position across the connected games stay in line now. This has not fixed every problem, as the games do not send any data as for their state. This results in the occasional situation where a player attacks another player, but the hit only registers on one screen, leaving the two games in different states. Fixing this is complicated as allowing the players to send state information opens the door to cheating, as any given game need to trust the other games information. We are not fixing this problem for this project, but it is an interesting aside.
We also successfully added in a third player into this game and made it work with minimal extra bugs. This has allowed us to run full scale tests with three players in P2P mode and in C/S mode. This update also came with a gameplay demo video, and a presentation of our progress. Both of these can be found on our home page (as well as the associated slides).
We still need to implement the logging functionalities, run more tests with those logging functionalities in place, and analyze that data.