Week Three — Networked Game Controller - matthewlaujh/itpnyu-understandingnetworks GitHub Wiki
Traceroute Analysis
Make a physical controller for playing a ball drop game. This can be a microcontroller-based controller, or a keyboard/ mouse controller that sends its commands through netcat. The technology is up to you. Your controller should have physical controls that allow the user to send the characters w, a, s, d, and x over a network via a TCP socket. Optionally, you can add controls for the additional features of the game (see the “Communication Protocol” section of the game repository home page fro more on these). You can use a WiFi-connected microcontroller, or a device which sends keyboard commands through a command line interface (CLI) or you can pipe the asynchronous serial output of your controller to a TCP socket in a CLI to play the game.
Write a summary of your controller and your results on your blog. We’ll play in class and compare notes.
Circuit I reused a PCB that I designed. It has two switches and a couple of LEDs and runs on an ESP32-S3. I always thought that the shape of this would be fun as a handheld object, the original project I used it for was a desktop item, but this was my chance to try it as a handheld object.
Code
The original use for the project was that they were networked lamps connected over TCP to send colour information using the switches to control lights on both your lamp and the other lamp as vibe/pressence messagers. It already had most of the functionality that was needed to become a game controller, just had to simplify what I had by remapping the switches to send the "w,a,s,d, connect, disconnect" messages using the HTTP client and I also just reworked the LEDs to correspond to the direction that it was supposed to move and for it to stop pulsing when sending, so that you could see which is being sent at any time.
Link to Code Repo
Working!
Link to Video