Inspiration
We love physical, interactive games and real-time hardware hacks. After seeing Solana's contribution to Hack the North's first-ever interactive badges, we knew we had to create a project to show its potential in these social events. Thus, we made Trojan Badge a simple premise: survive, spread the infection, and watch the outbreak unfold across a room.
What it does
Trojan Badge turns event badges into a live, physical multiplayer game:
- Patient Zero: One player starts as the zombie. Using ESP-NOW close-range wireless protocols, the badge constantly checks proximity to nearby survivors.
- Infection: If a survivor gets too close to the zombie and the zombie presses the tag button, the survivor's badge updates their status and turns them into a zombie.
- Real-Time Dashboard: A web-based survival dashboard displaying live infection stats and match telemetry across the entire venue.
How we built it
We flashed the badges and wrote bare-metal C++ firmware for the ESP32 boards. Utilizing the ESP-NOW protocol, we were able to create a peer-to-peer mesh system with one badge acting as the host for badge distance detection without relying on crowded Wi-Fi networks.
Cloudflare: We utilized Cloudflare's Workers and Durable Objects services to keep track of the data during a round of the game. These two systems working together enable the processing of messy data being sent in by all the ESP32s, allowing us to create an accurate leaderboard that reflects the survival times of the players.
Sentry: We incorporated Sentry into our logging system to keep track of all the data being passed in. This enabled us to troubleshoot misbehaving devices more easily.
OpenAI: Seeing Astra-6's launch announcement, we witnessed that the model was even capable of designing its own custom PCB. Impressed by its strengths, we utilized this model heavily during the development and coding of the game on the ESP32s.
Finally, we created a React frontend to display the stats of the game and ensure that all information was synced correctly.
Challenges we ran into
- We had trouble agreeing on an idea and couldn't agree on this until less than 20 hours left settled it with a vote
- We had subjective disagreements about the front-end architecture settled it with a push-ups competition
- The multiplayer game requires multiple devices to play properly while we only have 3 we decided to demonstrate the concept using 3 boards to demonstrate the concept, without an ideal 10+ player match
Accomplishments that we're proud of
- We agreed on an idea
- Created something mostly original
- Managed to rewrite the firmware from bare-metal
- have it broadcast data effectively to the web through wifi
- built a real-time dashboard of the status of the game
What we learned
We learned how to write bare-metal hardware protocols under strict time and resource constraints. Additionally, we also learned how to navigate technical team debates constructively to push a complex hardware-software hybrid project to its potential.
What's next for Trojan Badge
- More effects would make the game more immersive
- Using a smaller board will allow the players to move around better
Built With
- bare-metal
- c++
- cloudflare
- esp32
- fastapi
- firmware
- python
- react
- web
- websockets


Log in or sign up for Devpost to join the conversation.