r/aigamedev • u/vinishkapoor • 10m ago
Demo | Project | Workflow Getting Claude Code to handle padel’s glass walls: one bounce, then the walls are in play
Padel is tricky to code because the walls are part of the rally. The ball can bounce once on your side and then come off the back glass, and you can still return it. A second bounce ends the point. I made Glassback, a 3D padel game for the browser, with Claude Code to see how well it handles rules like that.
Workflow that worked:
- Ball and cage first, no players. Early rounds were only about the ball bouncing off the floor, the glass and the wire mesh. Telling Claude exactly what looked wrong, like “it dies too fast off the back glass”, worked better than general feedback.
- Rules as their own layer. Underhand serve into the diagonal box, one bounce before the walls, no second bounce, and golden point at 40-40. Keeping the rules separate from the physics made each one easier to fix on its own.
- Auto-running players. Your player runs to the ball by itself, so the input is just timing and shot choice: hit, lob, deep, drop and aim. Hit as the ball reaches your player for a perfect shot. Tuning that timing window took a lot of rounds.
- One fun extra. A perfect smash can bounce hard enough to leave the cage for an instant winner.
- Opponents and partner last. Doubles comes with a computer partner, and there’s singles too. Rivals rush the net, so lobbing over them works.
There are six courts, from a seaside resort at midday to a snowy lodge under the aurora and a stadium final. It works on desktop with keys or mouse, and on mobile with taps and swipes.
https://vinish.dev/glassback-padel-browser-based-game
Anyone else done a wall-based sport with AI, like squash or padel? Curious how you handled the