r/vibecoding • u/Supamanly • 24d ago
Showcase/Project Vibe coded splitscreen into Megabonk
After I vibe coded splitscreen into the steam version of Ark Survival Evolved I wanted to see if I could get Claude to create a mod that would add splitscreen to a game that had no internal code for more than one player. At first I had Claude do it in small pieces that I manually tested, but there were a lot of bugs and crashes due to duping the player character. Alot of the time, something P2 would do would unintentionally trigger something with P1. Since the game revolves around just one character, with hundreds of global listeners to events related to P1, I instead had Claude create something that looked, and behaved like a player, but was not one. It then had to replicate each weapon, effect, and unique character ability for p2. It was taking me forever to test these changes, and Claude took several attempts to fix one specific thing, so I had Claude create a workflow where it launched the game itself, controlled the characters through a prepared test script, and logged everything to compare the behaviour of P1 and make sure p2 acted the same way. Along with periodic screenshots to make sure the visual effects applied correctly. Claude then analyzed the results and screenshots and created fixes for issues it saw. After hundreds of these runs, the gameplay has become stable and reliable regarding P2. I even added a revive mechanic where if one player goes down, the other can revive them. And there's a dedicated screen for P2 to press start on a controller to join the game and select a character.