yego.me
💡 Stop wasting time. Read Youtube instead of watch. Download Chrome Extension

Axe Ghost devlog - The bug that ruined the run


3m read
·Nov 8, 2024

My name is Thomas K. I'm working on a game called Axe Ghost. It's currently in development. There's a demo on Steam, and my good friend Rishad Buser, he plays the beta version of Axe Ghost, and when he's able, he streams his daily runs. Richard, by the way, is the brains behind Iban OB, the co-op to The Puzzler game. He made Cello Cello together with me, and right now he's working on Dubo, which is a minimal elegant ball-based puzzle game that he's making together with AJ Cink. Dubo also has a demo that you can play on Steam at the moment.

So Richard was playing the Axe Ghost daily challenge, and he was using two new special weapons for the first time. He was doing really well; he had the highest score that I think anyone has achieved in the game so far, and he had almost beaten Gamar, the end boss of the game. Upon doing that, he would have won the run and gotten the SC multiplayer. As all that was happening, it was going really well. He clicked end the turn, and the game froze.

"Uhoh, no, did I? Uhoh, are you still there, Gamar? Was I clicking too fast? Did I crash the game?" He handled it very diplomatically, but of course, this was no fun for anyone involved. So I went to work trying to figure out what was going on. First of all, I recreated the state of the game board just as the freeze happened to try and see if I could recreate it that way, but I couldn't. The next thing I did was to watch through his stream, and then in my development environment, I would follow through. I would replicate each of his steps that he took, and that way I could get it to freeze, but I didn't immediately see very clear what the problem was. So there was no error message or anything obvious like that.

I decided this was a good moment to create a more robust system, which recorded whole game runs, so that if anyone experiences a problem like this again, I can quickly get their run from them and then be able to play it back locally and more quickly find the problem. Because it took me a long time to recreate all of the moves from Richard's run, and I didn't fancy doing it very often. So I built this whole system, and that works well. The system works once more. I played through each of Rad's moves so I could save them all into that recording system, and thereafter I could play that back repeatedly and iterate through more potential solutions to the problem or more things to explore what was going wrong.

Eventually, I figured it out. I have this function that spawns robots. Now, robots are an enemy that appears late on in a run, and they're different from the other enemies, and they can't be destroyed. You know when the robots arrive; they make things a good deal harder. The code that I had in there checked the spawn for each of the potential spawn locations, 'cause those are up at the top of the grid just out of sight. It picked a random tile, one of those spawn tiles. It checked if the tile was empty, like if there was not something already on it. If it was empty, it would put a robot there.

But the way I'd done it was that I had this little loop. It would check a tile, see if it's empty, and if it wasn't empty, it would randomly pick another of the spawn tiles and check if that was empty and so on. In the event that all of those spawn tiles were occupied, it would just keep checking forever. I don't know what I was thinking at the time I'd written this. I like to think that I was kind of distracted and quickly wanted to get something working just to check that this one particular system worked, and that I would then go back and fix that properly. For whatever reason, that didn't happen, and so it ended up in what was the current build at the time.

This is how the code should have been. From now on, I'm not going to use any loops that say while true. Instead, I'm going to say for i in range 0 to whatever, and that can be some crazy high number if I need it to be. But at least this way, when things go wrong, it's a little bit easier to figure out why.

Anyway, Axe Ghost is on Steam. You can wish list it there. There's a demo; you can try out the demo. The demo has a leaderboard. You can see if you get to the top of it. I'll see you around.

More Articles

View All
Homeroom with Sal & David Sinclair, PhD - Tuesday, July 14
Hi everyone! Welcome to our homeroom livestream. Very excited about the conversation we’re about to have. But I will start with my standard announcements, reminding everyone that we at Khan Academy we’re a 501c3. We’re a not-for-profit; we can only exist …
15 Platforms That Can Make You RICH
The Internet made us rich. As blatant as that sounds, our path to wealth would have been completely different if the internet wasn’t around. Looking at the current landscape, there have never been more wealth-building tools and platforms available to the …
Vertices & direction of a hyperbola | Precalculus | High School Math | Khan Academy
Which of the following graphs can represent the hyperbola ( \frac{y^2}{9} - \frac{x^2}{4} = 1 )? We have our four choices here. Choices A and C open up to the top and the bottom, or up and down. Choices B and D, you can see, D here opens to the left and …
YC Fireside: Surbhi Sarna + Reshma Shetty and Jason Kelly - Founders of Ginkgo Bioworks
Hi, welcome Reshma and Jason and everybody on the call. Hi, my gosh, I am so excited to chat with the two of you, pioneers in the field of synthetic biology. So to kick us off, the audience today is going to be a mix of people with a tech background and …
Gmail Creator Paul Buchheit On AGI, Open Source Models, Freedom
It seems like Google has all the ingredients to just be the dominant AI company in the world. Why isn’t it? Do you think OpenAI in 2016 was comparable to Google in 1999 when you joined it? Are you a believer that we are definitely going to get to AGI? Wha…
How I trained myself to focus long periods of time (even when I dont want to)
When I was in 8th grade, 7 years ago, I was preparing for the high school entrance exam. I wanted to score as high as possible so that I could get into my dream high school. But the problem was, I could only concentrate 5 minutes, literally. After 5 minut…