The project consists of developing a controller to play “Ball Drop Game“, a TCP sockets multiplayer game developed by Tom Igoe. The main idea was to use an Arduino with multiple sensors to control a player through TCP sockets in a game running on someone’s computer. We learned about the various layers of protocol we need to build a network in order to build this communication. The physical layer and the datalink layer were defined by our hardware and their addresses, in this case the Arduino and the laptop connected to a same WiFi network.
The network layer and the IP adresses were managed by the local network, while the transport layer consisted of a TCP socket between each player(client) and the computer(server). We used sessions to open and close the connection to the server with a physical interface, and finally we sent characters through the connection as commands to the player on-screen. The game itself consists of a screen where each player is a bar, and the idea is to collide with a ball that falls from the top of the screen as many times as possible.