Peek into the new engine

Demonizer’s engine is getting an overhaul for the next update, version 1.5, which I’ve been working on since July (along with client work to fund myself). For the game’s 1st birthday, I want to write a little about what this does for me and how it works.


As I mentioned before, the shmup genre is growing again, and I have ideas for further development to try to keep up. But the currently released engine is complex and easily broken, so adding content to that takes far longer than it has to. And I had enough ideas on how to do things better that a new engine iteration felt like a more productive endeavor.

Already my biggest gripes are gone from this code. I follow the programming model intended by Lua and LÖVE instead of fighting them. The dodgy, not well thought out imitation of Unity’s script system was replaced with simple function calls. The monolithic map data structure is now a few flat lists, holding only the data needed to draw sprites or spawn objects or what have you. The big bug-prone “AI controller” script was untangled and cut up into handy behavior modules.

Thanks to simpler subsystems with fewer inter-dependencies, I can code and make content with confidence that I won’t always be stuck with a lot of bugs afterward. After 1.1 I dreaded working on the game anymore. Now I’m excited for it again and cursing my day job when it pulls me away.

What’s new?

A new engine is a prime opportunity to expand the game’s capabilities. It wouldn’t be worthwhile if I only did the same stuff better.

The #1 problem I wanted to fix was the limited control over the AI. The old system was designed around a common routine - walk a fixed path at fixed speed and fire at a fixed rate - with awkward hacks inserted to allow minor variations and changes. I broke this up into component functions which AI character routines can pick and mix.

I complemented these with a path point scripting system, a less verbose and more visual option for doing complex actions at specific points. An AI runs each script on itself upon passing through the associated path point. The script calls functions from a small API to choose a different path, jump over a gap, skid to a halt, switch weapons, spin around and fire, gesture, flash an emote, and so on.

In this contrived example, the enemy is alarmed, then uses a few different attacks. The scripts along the path make it start and stop firing at different rates. All of the script API operates on the object itself, so I could use environment-setting to make the syntax simpler than normal Lua code.

This is how it looks in action.

Other additions aren’t too exciting, but can and do make my dev life easier. I moved character stats into a LibreOffice spreadsheet, which I export to CSV files for the game; spreadsheet operations like sorting and formulas are useful for bulk editing and game balancing. Building objects by hand in code is replaced with something I should have taken from Unity - prefabs, made in the map editor and the contents copied into new objects in-game.

What am I doing with all this?

With the new systems and better code, ideas for the game can flow freely again - maybe a new heroine to play with, an extra level or two, new enemy attacks that are more controlled, more dynamic, and more impressive.

At the top of the list is 1.5 Arrange Mode. In this mode humans with blue hearts will also turn around and fight for you after capturing them. You’ll use your main shot to shield a turned human and boost their attack power, or your focus shot to assign fellow succubi to do it. The more they defeat their former comrades, the more bonus you’ll get if they make it off the stage alive.

Here’s an early peek at the turning mechanic.

If all goes well, look forward to version 1.5 by Spring 2022. Thank you.

Get Demonizer

Buy Now$12.00 USD or more


Log in with to leave a comment.


Amazing work. Keep it up!


A game that just keeps on giving, thanks for all your work. It seems shmup devs really care for their games, Graze Counter is getting a GM edition, Blue Revolver update is still in the works and now Demonizer ♥