What it is
A tower defense game with a twist: you can rewind time to undo a bad wave, but rewinding spends the same energy you need to build towers. It was an entry for the Beginner’s Jam in summer 2025.
Maciej Trębacz has been a web developer for over 20 years but had never made a game, and he learned the Phaser engine on the way. He estimates AI wrote about 95% of the code, mostly Claude Sonnet 4 running in Cursor’s agent mode and in Augment Code, with occasional help from Claude Opus 4 and Open
What went wrong
His first try at ship movement with momentum went wrong: the ship spun at random and the agent couldn’t recover. He switched to Cursor with Claude Opus 4, which got it right.
The tutorial was the hardest part, and next time he would spell out how it should be built up front. When the AI got stuck, he asked it to add debug logging and fed the logs back. If that didn’t work, he rolled everything back and asked again with clearer wording or more context.
What we learned
Have a clear picture of the game, break it into lots of small jobs, and give firm direction on the critical parts. Start fresh chats often so the AI doesn’t run out of context. For the core rewind mechanic, he wrote the prompt carefully, ran it through three models and kept the best answer.
I want to create a new generic Phaser game object called RewindableSprite that will be the base to all further game objects that can move around and perform actions. The idea is that this object holds all of its state in a special serializable object that gets stored every n update ticks (configurable), updates `timeOffset` to the latest state entry index and then also has a `timeMode` variable that can be set to FORWARD or REWIND. When FORWARD is set the sprite works as usual - it fires its update logic normally, advances towards its target position etc. and stores its state after an update. When REWIND is set (by a public `setTimeMode` method) the object does not advance its state (and does not record it) but instead it just renders itself using the recorded state at current timeOffset. It also has a public method for rewinding the time by decreasing the timeOffset by a certain amount.




Comments