April 2026 Betrayed Alliance Update

What’s new in the last 2 months? Last update I showed off some work on new areas and battles. The last couple of months have seen a lot of work on systems and implementation of puzzles.

And as always new artwork, animations, etc. If I didn’t have any artwork, it would be hard to share anything at all! So let’s start with that.

New Artwork

Programming

Flags

I’ve not hidden the fact that I am quite an amateur when it comes to programming and get by on this project by the skin of my teeth. I spent the better part of a day on Spring break updating many of the global variables in the game into binary flags. This is something no one will ever notice, but it is more efficient and is something I really should have learned earlier, but somehow couldn’t wrap my head around. Despite my dumb-brain, I’ve finally took some time to learn about flags and have properly integrated them into the game. I’m hopeful this will save me parts of a kilobyte of memory. But as the saying goes (and is especially true in SCI0), every bit helps!

“Out of Heap Space”

Flags weren’t the only “under the hood” work I spent too much time on. I also discovered why the demo sometimes has the “out of heap space” error/bug. This has been something lurking in the back of my mind for some time, and I knew the day would come when I’d have to figure it out – and that day came when I couldn’t even walk around the game for more than 5 or so screens before it would crash. Somewhere, somehow, I had memory fragmentation and it had gotten critical!

After hours of searching on my own as well as puzzling it out with AI’s surprisingly bad rabbit trails, I discovered an anomaly that indicated what was wrong. Long story short, I had an in-room script running in many rooms that was only conditionally being set with the setScript: command. Apparently, without this, the script doesn’t get properly unloaded, causing subsequent memory fragmentation. With this discovery, a HUGE anxiety about memory management in the game has been lifted.

Speaking of programming, I learned a new trick while working on this room. I wanted the player to be able to interact with the weapons in the ground, but there are so many that I worried programming it would be a chore. Then I learned about the kernal call (GetDistance), which measures the distance between two points. Somehow I had never used this before?!

All I had to do in the end was set up a basic “for” loop, calculate the distance between ego and all the swords, keeping the nearest one and boom, no fuss, no multiple control colors, or ridiculous nested “ifs” or switch statements. So this update, I’m happy to announce I’m slowly becoming a slightly better programmer, despite the learning curve looking more like midwestern plain than the Colorado Rockies.

Krug

A bit more about the statue with the swords all around it. That is a statue of Krug, one of the three great apprentices. There is an item associated with him, and when designing it, I recalled a Magic The Gathering card from when I was younger called “Amulet of Kroog.” Since Krug is so similar to Kroog, I thought it would be a fun hommage to the card art by Margaret Organ-Kean to design the item after the artwork on the card.

Other small upgrades

If you’ve played the demo of Book 2, you know there is a place where the characters can pass items to each other. In that build, if you needed to give 4 items, you’d have to type each one individually. One change I’ve made is to reuse the inventory system (which its clickable items for descriptions) but instead of viewing the item, pass it to the other character. This way, it will be a bit less cumbersome if you have to pass a large handful of items at once!

As always, there’s always a lot more that is getting done under the hood, and many things I just don’t want to share because they are puzzles/spoilers. I always feel a tension in sharing too much or not enough, but the past few months were really quite productive and Spring break saw a LOT of time for development.

The last week of April will see a lull as I’ll be on a weeklong class trip, which is also why this update is a little earlier than usual. But after the trip comes exams, then we’ll be in summer, where I am ready to blast off on development like the Artemis II.

See you soon!

Leave a comment