DevConnectDevConnect
Sign up · Log in
← back to the feed
2

Rebuilding osu!mania in pygame with a weak AI

Before Opus 4.8, I spent two months rebuilding osu!mania, the rhythm game, from scratch in pygame. No game engine, no framework, all of it built with AI that was a lot weaker than what we have now. Quick context for anyone who hasn't played it: osu!mania is a keyboard rhythm game. Notes fall down a set of vertical columns, and you press the matching key at the exact moment each note reaches the hit line, in time with the music. Think Guitar Hero or DDR, but on your keyboard. Simple to describe, brutal to get right. I didn't build it to ship a product. I built it to actually learn: how far you can push a weak model, where the APIs and context limits fall apart, and how much of "good design" still has to come from you when the AI can't carry it. The hardest parts, in order: 1. Timing. In a rhythm game everything has to land exactly on the beat, and "almost" is worse than useless. Keeping the audio, the input and the falling notes in sync down to the millisecond is where most of the two months went. 2. Accuracy scoring. Every note you hit gets judged by how close you were to perfect timing (perfect, good, ok, miss) using real timing windows, and that feeds a live accuracy percentage. Getting those windows and the math to feel fair, exactly like the real game, took way more iteration than I expected. 3. The UI and buttons. pygame hands you a blank window and nothing else. No buttons, no menus, no UI toolkit at all. Every clickable element, every menu, every hover and press state I had to build by hand. Back then, with weaker AI, even "make this button reliably do the thing" was a real fight. The part I'm proudest of: it imports songs straight from real .osz files, so you can drop in actual osu! beatmaps and play them, charts and audio and all. I keep seeing "I made a game with AI" posts where the game is a colored square that moves. Nothing wrong with starting there, we all start somewhere. But I wanted to see what happens when you point even a weak model at something genuinely hard and refuse to stop at the first thing that runs. Turns out, a lot. The tool being weak just meant I had to understand every part myself, which was kind of the whole point.
0:00 / 0:00
Add a comment
0/2000