A second game with Claude Code, and the lessons from the first
Chronicles of Avalys, my medieval management game, built with Claude Code while Bubble Blend was still very much alive. What my first game had taught me, what I managed to apply, and what I got wrong all over again.
A few weeks ago, I told the story of my first ten months making a game with Claude Code, the months of Bubble Blend. What I didn't say is that for a good part of those ten months, another game was growing right next to it. On 12 May 2026, I opened a new repository, and that repository became Chronicles of Avalys: a medieval management game with a 300 by 300 tile map drawn by hand, a Capital in the middle, and a kingdom to rebuild one tile at a time.
Why a management game after a ball sort puzzle? Because I play a lot of Legacy of Kings, and I wanted to see if I could make a game that ambitious, while fixing what bugs me about it: performance that's all over the place, loads of buildings that are just clones of other buildings with a different skin, and very linear gameplay. And after all those months on Bubble Blend, I needed something new and a real challenge.
Today the repository has 5,356 commits in less than six months, more than twice what Bubble Blend piled up in almost a year. Its map has just gone 3D, and the game is now in open testing on the Play Store: anyone can install it. But above all, it's my second game: I came in with a brand new list of lessons, and this post is about what happened to them. Spoiler: some held up, and some really didn't :D
Starting with the lessons from the first game
The very first commit of Avalys contains an instructions file... for Gemini. Twenty-three minutes later, at 9:07, it's replaced by a 132-line CLAUDE.md. That's the first real file of the project, before almost any code, and it brings in straight away the rules Bubble Blend had made me pay for: game state that updates in one single step, immutable data, not a single hard-coded string. Two days later, the release pipeline is "aligned with GatherColor's" (Bubble Blend's code name), and the game reaches the Play Store's internal testing track about sixty hours after the first commit.


The "give the constraints before asking for an architecture" lesson paid off right away too. From the start, I said the map would be huge and would keep growing, and Claude came up with a save file that only holds what the player has changed, never the map itself. The save went from 412 KB to 2 KB. Along the way, we found out that the obstacles on the map were randomly scattered on every load. As long as the map lived inside the save, nobody could tell; once it was rebuilt at every launch, it was a disaster. Four days later, every bit of randomness was gone from how the map is built, so that "two players explore the same world". The rule has been set in stone ever since: nothing that builds the map rolls dice.
But copying has a cost too. On 10 September, a night review found that the nine agents reviewing Avalys's code were still talking about "balls, vials, duel". I had brought them over from Bubble Blend without rereading them, and for months they had been judging my management game through the eyes of a ball sort game.
My takeaway: arriving with your lessons saves a crazy amount of time, but whatever you copy from one project to the next has to be reread like new code.
Decide before you build, take two
That was THE lesson from Bubble Blend, the one about the funfair of mini-games. And honestly, I thought I'd learned it. On 15 May, in an hour and a quarter (from 5:31 to 6:46 pm), Claude delivered five "acts" of new buildings: a Forge, a whole bread chain, a Manufactory, a University... The next evening, the bot that simulated games gave its verdict: "0 Forges built, 0 Mills, 0 Bakeries, 0 Cathedrals", in every single game. The document written that night concludes that the vision of the game is exploration, and that production chains "pollute the focus". The Forge was removed in June.


After that, I started having every plan reviewed by an agent whose only job is to break it. It works really well... for the execution. On 11 September, the plan for the City of Avalys, a set of pieces the player assembles, went through review (four blocking problems found and fixed) and shipped that same evening. Three days later, at half past midnight, it "stops being a set of pieces the player places: it is now DRAWN, once and for all". 141 images went in the bin. A reviewer checks that the plan is well built, not that the idea is a good one.
That same weekend came army upkeep: a victorious army made the workforce drop, and the player, I quote, "read it as a punishment for winning". We added a switch, then a tab to dismiss the army, and at midnight Claude removed the whole thing with this conclusion: "we had to add two mechanics to it just to make it playable". My favourite is still Food: on 20 June we turned it into a capacity, reverted that thirty minutes later as "over-engineering"... and on 21 August we turned it into a capacity again, for good.
My takeaway: the Bubble Blend lesson still stands, and I broke it again. But I got a very simple warning sign out of it: when a rule needs two patches to be playable, it's the rule you need to question, not the patches.
A management game is all about measuring
This is the big new thing compared to Bubble Blend. In a ball sort game, a level is either solvable or it isn't. In a management game, everything is a matter of balance: how much a mine brings in, and how long it takes to pay for the next level.
At first, I had a Python bot playing games for me. The problem was that it rewrote the game's rules in Python. On 15 May at midnight, a commit admits that every balance finding from the latest batches of games "was a lie": a rule had changed in the game, not in the bot. On 12 August I deleted it, for this reason: "every gameplay change cost two implementations". Since then, the simulator calls the game's real engine, which no longer needs Android to run. It's actually the sync lesson from Bubble Blend, "a piece of data has only one boss", applied to the rules themselves.
And that simulator found things I would never have seen. On 21 June, the map had no marshes at all, so no clay, so level 10 of the Capital was impossible for everyone. At the end of August, a 33-hour simulated game was producing seventeen times the clay the entire game needed. And when we tried to calm that down by halving a mine's output, the simulated colony went from 13 to 21 furnaces: "lowering a rate fixes nothing on its own, the player just builds twice as many". My favourite bug is still the one from 9 September: a cost that had grown too big for its number type wrapped around to negative, and the level became free AND paid out 1.8 billion wood. Every player's dream.



Then real players arrived, and telemetry with them. At the end of September, it showed that 87% of the gold of one of my most loyal players came from selling at the Market. The Market was redesigned that same day, and part of that redesign was gone the following night, before it was even released. On 2 October, a player thought they were stuck at level 44: they had actually forgotten about a Ruin, its three fragments in their pocket, "nothing done for five days". It wasn't a balance problem, it was a screen problem.
My takeaway: you don't balance a management game by feel, but with a simulator that plays the real game, and telemetry that shows what real players actually do.
The AI is still wrong with total confidence, but it owns up faster
With Bubble Blend, I learned to check what Claude claims. On Avalys, it's still wrong with the same confidence, but there's one big difference: most of the time, it's the one catching itself, because the project is now packed with reviewers who didn't write the code.
On 14 August at 1:50 pm, it announced a map renderer going from 31% late frames to 2%. At 2:20 pm, another commit opens with "MEASUREMENT CORRECTION, and it concerns the previous commit": the phone's screen was adjusting its refresh rate on its own, and at the same rate, the two versions were indistinguishable. On 19 August: "I HAD COMMITTED A WRONG CALIBRATION, wrong twice over, even." And on 20 September, Claude very seriously explained to me that it couldn't produce a PNG image... while it was already sitting in the folder of tools that make them.
Then there are the comments. On 21 September, a measurement revealed that the code contained more lines of comments than lines of code, and some of them described things that weren't true anymore, like buildings that no longer existed. A September commit sums up the problem perfectly: "An outdated entry doesn't cost zero: it describes a vanished state in enough detail to be believed." Since then, a nightly routine rereads the comments, and every night-time fix has to prove that its test can fail.
My takeaway: checking the AI is still the real job, but part of that job can be delegated, as long as the reviewer didn't write the code it's reviewing.
Sync, the villain strikes back
In the Bubble Blend post, I wrote that I wasn't sure sync had said its last word. It said it again in Avalys, several times, and louder.
And yet I had been warned. But at the end of August, I found out that the cloud save only ever uploaded, without ever reading anything: a player who reinstalled saw their first upload wipe out their save. On 9 September, the game told a player that their game was behind the cloud copy, even though they had played 75 more minutes. The rule compared tiles played, a number that can go down. That's where Bubble Blend's rule, "a balance only goes down because the player spent something", took a new shape: we now compare the fog that has been cleared, "the only measure in the game that never goes backwards".
Avalys's rule is "nothing goes to the cloud before reading what's already there". It wasn't enough. In early October, a player reinstalled the game and lost her level 42 Capital: Android had restored an old copy of the local database, with an upload of her level 40 Capital that had never been confirmed, and the game took it as the truth. The read itself was lying. We managed to give her game back from an archive. On 14 October, after relaunching the game over and over with a test command, I ended up with five copies of the game open at the same time on my phone, all writing the same save. And on the 15th, a level 3 kingdom overwrote the same player's level 44 game. We recovered it from the database's history, within the one-hour window it's kept for. A tool was born that very evening to go back in time through that history.
My takeaway: Bubble Blend's rules held up, but they're not enough. Sync has to be protected at every step, reading included, and it remains the toughest problem in a mobile game, even the second time around.
Bugs that don't crash, season 2
Here too I'd been warned, and Avalys has tools Bubble Blend didn't: smoothness telemetry, simulations of entire games, screenshots compared on every version. That didn't stop the ghosts from coming back.
On the evening of 3 September, we found that the siege camp screen "could never have run" since it was created, two versions earlier. The whole military side of the game was unplayable, and the rule tests were green the entire time, because the rules themselves were right. It reminded me of Bubble Blend's vial swap, the one that didn't swap anything :D


On 6 September came the battery hunt. On a game screen where nothing moved, the phone was computing 61 frames per second. The culprit: a tiny "?" breathing in a corner of the screen, which forced the whole screen to redraw. The commit puts it better than I could: "This fourteen-point badge weighed more, all by itself, than the rest of the game put together." By the end of the day, the idle screen was down to 5 frames per second. It's a cousin of Bubble Blend's ghost music player.
And on 17 October, this chilling sentence: "Every new game on 1.47.0 and 1.47.1 stays at Capital level 2." A touch-up of the map had placed a battlefield three tiles from the castle. I had tested the touch-up on eleven existing games... but never on a new one. This time, the simulation raised the alarm.
My takeaway: a green test only proves what it looks at. Since then, every fix has to show that its test goes red when the bug is put back.
The Play Store, (almost) familiar ground
I thought Bubble Blend had shown me every Play Store trap. A few were left.
On 2 September at 4:23 pm, I released version 1.5.0. At 6:17 pm, the fix: the game closed as soon as it was launched from the Play Store. The tool that shrinks the code of release builds had removed a piece the local database needed. The same tool that had renamed Bubble Blend's fields, in another disguise. That same evening, 1.6.0 went out with Google's test ad IDs, and the commit just says: "Second time." Since then, a release build simply can't be produced without the real IDs.
There were also the declarations: my privacy policy denied the ads, then the in-app purchases ("a false statement, not a typo", says the commit), a bit like Bubble Blend's data safety form. And I found out that chests which could contain paid boosts made the game rated 18+ in Australia and Brazil, just like gambling games. Those boosts were taken out of the chests in the same commit.


Finally, there are the twelve testers. Just like for Bubble Blend, you need at least twelve for fourteen days. The twelfth arrived on 6 October, the release was planned for the 20th... and the counter dropped back to ten. The fourteen days count per tester, not from the day you reach twelve. Production access finally came through on 7 November.
My takeaway: Bubble Blend's release checklist spared me a lot of traps, but the Play Store always keeps one for the next game. And the best protection is a safeguard that stops the build from going out, not a line on a checklist.
What travelled between the two games
Having two games at the same time also means things moving in both directions, and not always the ones you'd expect.
On 21 September, I found out that Avalys was publishing with Bubble Blend's publishing key. It worked, and that's exactly what made it invisible: the key had rights on both games. If I had deleted Bubble Blend's repository, I could no longer have published Avalys. Thirty minutes later, each game had its own key, and a script now checks its rights without publishing anything.
The other way round, Avalys gave a lot. I often run several Claude sessions in parallel, and on 14 September their builds were tripping over each other. We created a queue that runs them one at a time. The next day, building was still making my machine unusable, with a lag of several seconds on every key press, until we dropped it to low priority. Bubble Blend adopted the queue on 9 October, "like Avalys", and since 2 November a single queue serves all my games. Bubble Blend also gathered its legal pages in one place after Avalys "paid exactly that price". And on 2 October, both games plugged into a shared "foundation" of rules, agents and tools, three minutes apart, and at the end of October Avalys moved most of its review agents into it.
All this back and forth taught me one last thing. From day one, Avalys's CLAUDE.md forbade Claude from listing itself as a co-author of commits. 217 commits did it anyway. Same with parallel sessions: after a first accident on 14 May, the rule banned the Git commands that touch other sessions' work. On 16 September, a routine script ran one anyway, and a migration vanished from the history. In both cases, it wasn't the rule that fixed the problem, it was a tool that enforces it.
My takeaway: Bubble Blend taught me to turn every struggle into a rule or a tool. Avalys taught me to prefer the tool, because a rule that nothing checks always ends up being forgotten by someone, human or AI.
The players, and a 3D map
Just like with Bubble Blend, it was humans who found what no tool could see. A tester who had never played a management game was tapping every tile and exploring at random: the start of the game now holds your hand, with a veil over the map that only lets the expected gesture through. A colour-blind tester couldn't read my error messages, written in red: since 25 September, there isn't a single line of red text left in the game, just cream text on a red background, with an alert icon.
Two players deserve a special mention. The first is a dedicated player, already a regular on Bubble Blend, who plays Avalys in long sessions. Her bug reports and feature requests have made both games better, and her game went through pretty much every sync storm told above: she was the one seeing "Two games in play" at every launch, the one who lost and then got back her level 42 Capital, and her level 44 Capital was the one we caught within the one-hour window. If Avalys's sync holds up today, it's largely thanks to her patience. The second is my son, a player who shows bugs no mercy :D A horde camped right next to a town that still let the town level up, a road drawn wrong under a foundry in his game, a friends list that didn't follow him when he switched Google accounts: he finds it, he reports it, and it ends up in a commit.
And then there's me. I play my own game a lot, and it shows in the commits. On 24 September, a telemetry review very seriously noted that "Franck's wood above the cap comes from the away-time video, stacked twice". Busted by my own tool :D
The latest twist is only a few days old. During the night of 31 October, a small emblem image, generated without any style instructions at all, came out with a 3D look far richer than the game's flat art. I immediately asked for a test on the whole map. The migration plan recommended releasing the game in 2D first, because the job "doesn't fit in the closed test". I decided the opposite. The 3D map shipped in the version of 1 November, in the morning. Turns out the AI can underestimate what we can do together, too.



My takeaway: players see what no tool is looking for, and some decisions remain mine, even when the AI's recommendation is a reasonable one.
What I'm taking away
Avalys has only just opened its doors to the public, but it already has its players. Four real dedicated players, including my cousin, the same one as on Bubble Blend, who has fallen in love with this game, my son, and that dedicated player who has followed me since Bubble Blend and whose feedback has improved both games. And me, catching myself playing it just for fun.
What Bubble Blend had taught me, and that I managed to apply:
- Write the rules before the code, and give the constraints before asking for an architecture: the tiny save file and the dice-free map came from that.
- Check what the AI claims, and have the work reviewed by eyes that didn't write the code.
- A piece of data has only one boss, right down to the game rules, which the simulator no longer copies.
- Keep an eye on what doesn't crash, with smoothness telemetry and simulations of entire games.
What Avalys taught me on top of that:
- A reviewer judges the execution, not the idea. When a rule needs patches, it's the rule you need to question.
- A management game is balanced by measuring, with a simulator that plays the real game and players who show you what you hadn't planned for.
- Sync has to be protected at every step, even the read.
- A green test only proves what it looks at. Every fix shows that its test can fail.
- Whatever you copy from one project to another has to be reread.
- A rule that nothing checks ends up forgotten: a tool beats a rule.
So if you're starting your second project with an AI, take your lessons with you, but keep an eye on the ones you think you've already learned. Those are often the ones that catch up with you!
And if you want to see the kingdom with your own eyes, Chronicles of Avalys is in open testing, on Google Play.