𝗧𝗼𝘄𝗲𝗿 𝗕𝗲𝗳𝗼𝗿𝗲 𝗗𝘂𝘀𝗸: 𝗜 𝗕𝘂𝗶𝗹𝘁 𝗮 𝗣𝘂𝘇𝘇𝗹𝗲 𝗚𝗮𝗺𝗲 𝗳𝗼𝗿 𝗛𝘂𝗺𝗮𝗻𝘀 𝗮𝗻𝗱 𝗔𝗜
I built a game for the June Solstice Game Jam.
The concept is simple. You must reach your tower before the sun goes down. Every move costs time. Every step brings the sunset closer.
You must plan your path carefully. Rivers block you. Rocks force you to take long detours. You need wood to build bridges to cross water. If you move too much or pick up useless resources, you will lose.
The goal is efficiency.
I wanted to see if an AI could play this game. I used Google WebMCP to connect an AI model to the game.
I gave the AI two tools:
- getGameState: This shows the map, the rules, and your current resources.
- submitPlan: This lets the AI send a full list of moves to the game.
Instead of making the AI move one step at a time, I had it create a complete plan. My game then replays those moves with a short delay. It looks like the AI is thinking and playing in real time.
The results were surprising.
I tested several models, including Gemini 1.5 Flash. The tools worked perfectly. The AI could read the map and send moves without errors.
But the AI struggled to win.
Even the easiest levels were difficult for the models. They failed to find the most efficient paths. This taught me something important. Puzzles that feel easy to humans require reasoning and intuition that AI still finds hard.
Designing levels that humans find simple but AI finds difficult is a new kind of challenge.
You can play the game or view the code here: tower-before-dusk.gramli.workers.dev
Source: https://dev.to/gramli/tower-before-dusk-i-built-a-puzzle-game-for-humans-and-ai-oao
Optional learning community: https://t.me/GyaanSetuAi