Creating the Tower of Time game
https://github.com/maciej-trebacz/tower-of-time-game/blob/main/PROMPTS.md
In cases where the code for a repository is created by AI, it would be good to add the entire chat protocol or at least the prompts that were used.
The developer (maciej-trebacz) acts as the architect and team lead: he sets tasks, checks results, points out errors, and directs the process. The AI does not invent the game "from scratch" but implements specific, clearly defined tasks.
Development is conducted iteratively. No complex feature was created with a single prompt. When the developer asks to create a WaveSystem
"by analogy with EnergySystem.ts
", the AI performs excellently because there is a ready pattern. The prompt "Refactor BasicTower
to extract common logic for all towers" is an ideal task for AI.
Conclusions:
- Write as specifically and step-by-step as possible. Bad: "Make enemies." Good (as in the file): "Implement enemy movement. It has a target position. On each
update()
, it should move towards it. During movement, play the animation corresponding to the movement vector." For the complexRewindableSprite
mechanic, the developer described an entire algorithm with several points. - Engage AI in creative tasks. Ask not only to write code but also to critique the scenario or suggest ideas.
- It is important to provide context. Always specify the files you need to work with using the
@file.ts
syntax. This is critically important for accuracy. Specify how the system should NOT work (e.g., "towers do not shoot during time rewind"). - Use existing code as an example. Ask it to make new features "by analogy with..." to maintain a consistent code style. Don't just say "there's an error here," but send the error text and logs.
#prompts