Inspiration
This hackathon's theme was going off the grid, and we wanted a setting that really is off the grid. We landed on Ruby Ridge. In August 1992, FBI agents and U.S. marshals were in an 11-day standoff with Randy Weaver, his family and a friend at an isolated cabin in Boundary County, Idaho. The family had built the cabin themselves, and by choice it had no electricity or running water. It was a real tragedy. Weaver's wife Vicki, his 14-year-old son Sammy and U.S. Marshal William Degan were all killed during the siege.
We didn't want to recreate the event or the people in it. What we took was the setting: a cabin in remote northern Idaho, forest all around, cut off from the world. The game is set in a fictional version of that landscape in the Kaniksu National Forest, with fictional characters.
We applied the theme to the tech as well as the story. Ruby Ridge uses no Wi-Fi, no Bluetooth and no internet. Two Android phones connect with a single USB-C cable, and that's the whole network.
What it does
Ruby Ridge is a top-down, two-player co-op shooter, written in C++ for Android.
Two players, one cable. Plug two phones together and both players appear on both screens. Three stages: Stage 1, The Forest: dense forest, 12 enemies in waves of 3. Stage 2, Deeper In: a sparser forest with less cover, 20 enemies in waves of 5. Stage 3, The Cabin: you hold the log cabin, which takes up the right third of the map, while waves march out of the treeline. Enemies can shoot through the windows. The final wave is tougher. A destructible world. Trees and rocks block movement and bullets, and you can shoot them down to stumps and rubble. Two characters with different weapons. RAY carries a rifle with a 10-round magazine. VIK carries a pistol with 5 rounds, but each shot does double damage. Each player sets their own three-letter name on the title screen. Power-ups. Enemies sometimes drop health packs, a shotgun (a 5-pellet spread with recoil) or an uzi (a spinning 360° spray). A scoreboard. Completed runs are ranked by fastest time, and runs where both players went down show as DNF, ranked by total kills. Synced music and sound. Each stage has its own soundtrack, and stage-clear and death stings play on both phones at the same moment. How we built it C++20 with SDL3, using SDL3's callback-style main loop, plus SDL_image for sprites and SDL_mixer for music and sound effects. It's built with CMake and the Android NDK inside Android Studio. USB with Android Open Accessory (AOA). One phone acts as the USB host. It sends the AOA handshake, and the other phone switches into "accessory" mode, which gives us a raw two-way byte pipe between the phones. A small Java layer (UsbLink.java) does the Android USB work and passes bytes to C++ over JNI. Host-authoritative netcode. The host phone runs the whole simulation: enemies, bullets, hits, waves and power-ups. Every frame it sends the guest a snapshot of the world. The guest only sends its own position, aim and "I pressed fire". So the two screens can never disagree about who got hit. Our own binary protocol. Every message starts with a marker byte, a type and a length. If bytes ever get out of step, the reader skips ahead to the next marker and recovers. The phones also exchange a protocol version every second, so if two different builds are plugged together, the screen says so. Testing without two phones. We wrote a fake USB link that sends the same bytes over a local socket. That let us run two copies of the game on one laptop and test multiplayer from end to end before touching the phones. Challenges we ran into Getting the first build onto a phone at all. Samsung's Auto Blocker silently blocked USB debugging. Our build.gradle went in the wrong folder. A .gitignore rule hid a folder one of SDL's image libraries needed, which broke the build. Assets inside the APK. std::filesystem can't see files packed inside an Android app, so the sprites "didn't exist" and the game closed on launch. We switched to loading everything through SDL, which can read the APK. Images that weren't what they claimed. Some of our PNG map art had been downloaded as WebP with a .png name, so it failed to load with "Unsupported image format". Touch controls on different screens. The joystick sat in the wrong place on one phone until we converted touch positions into game coordinates, and the status bar covered the health bar until we went true fullscreen. Merges breaking multiplayer. Twice, a merge quietly broke the two-player link and enemies froze on one screen. That's why the protocol has a marker byte to resync on, a version handshake, and live diagnostics on screen. Accomplishments that we're proud of Real-time co-op multiplayer between two phones over just a USB-C cable, with no networking stack at all. Both screens stay in sync for movement, bullets, enemy waves, power-ups, music and sound effects. A full game in a weekend: three stages, a title screen with names and skin swapping, a victory screen, a game-over screen and a persistent scoreboard. What we learned How USB actually works on Android: host and accessory roles, and the AOA handshake. Why multiplayer games give one machine authority, and how much easier that makes everything else. Designing a wire format that can recover from corrupted or misaligned bytes, and versioning it. The Android NDK and Gradle build pipeline, and the pain of keeping assets, CMake and Java in step. Merge early, test on both phones every time, and tag builds that work. What's next for Ruby Ridge More than two players, by chaining phones or adding a USB hub. Sharing the scoreboard over the cable, so both phones keep one combined board. Smarter enemies: proper pathfinding, flanking the cabin, and enemies that use cover. More stages and more of the Kaniksu forest to fight through.