Enter NEONengine

Reading time: 4 min

Hello world!

What is NEONengine?

As you have probably surmised from the previous post, NEONengine is the C port of the framework that powered NEONnoir, and progress is already underway!

The Blitz Basic source has proved more and more challenging to work with as the project grows bigger as I add enhancements. The next game in the series is unshackled of an impending release date, so I want to add all the features I had to cut before. Small trifles that nobody missed like sound effects, animations, picking up stuff from the scene, you know, really unimportant things.

Adding them to the Blitz Basic engine was becoming very tedious, primarily due to the nature of the language, the archaic debugging tools, and the slowness of the development loop. I was starting to dread every time I touched the codebase to add something. Blitz served its purpose admirably for this game and, more importantly, introduced me to a fantastic community of people, some of whom I now consider friends. But alas, it’s time for me to retire this language.

Rewriting the engine from scratch is not a big deal. The structure and components are understood, the data it gets fed, and the tools to create that data are (mostly) unchanged. The obvious choice of many professional Amiga game developers is assembly. There’s just one problem: I don’t know assembly.

This is where two outstanding engineers came to the rescue. KaiN has created and maintains ACE: a codebase and tools that let me create Amiga games in a language I’m far more comfortable in, C.

The only downside is that ACE only supports OCS and ECS, and I need AGA more than a chrome job needs his Coral. Luckily, Vairn maintains a fork of ACE that works in AGA, and I can use a full 256-color palette for my game.

Well done, both of you; you are the wind beneath my wings.

What’s the next step?

NEONnoir is, at its heart, a simple game. There are some primitives that everything else is built on, and these are:

  • Loading and drawing images to the screen.
  • Mouse movement with dynamically changeable pointers.
  • Arbitrary regions or hot spots that are mouse aware and will do something when you click on them.
  • Text rendering with word wrapping, left/center/right justification, and vertical alignment.
  • The NOIRscript interpreter.
  • Playing sound and music.
  • Loading the data file.

From these “primitives,” we get all the other major systems:

  • The dialogue system.
  • The location/scene management system.
  • Interacting with a scene.
  • Localization system.

While I left out a few other things, this is basically it. The logical first step is to get feature parity with the old engine. Luckily, I have a non-trivial game that I can use to ensure that everything works, even the weird edge cases.

Once I reach parity, I can tackle the new feature I want to add.

So, what’s done already?

I have a good starting point! I can load images, play music, move the mouse, and interact with hotspots. This means that I can run the game up to the main menu.

Text rendering will be my next task considering how core it is for a narrative-focused game. In Blitz, the text rendering code was substantial and a big part of the codebase. ACE has font rendering routines, but I will need to build on top of that to get my multi-colored fonts and text layout to work with it.

Reading the data file will follow, with the NOIRscript interpreter coming after that. Check out the source code here if you want to follow my progress.

Anything else?

Sure! As mentioned above, I have a laundry list of features I’d like to add in future iterations:

  • Playing sound effects.
  • Creating and playing animations.
  • Picking and moving objects from a scene.
  • Palette cycling animations.
  • NOIRscript v2. Ideally, compatible with the current bytecode but more like C than assembly.

Like the original, the source code for NEONengine will be open-sourced, as will the updated editor and tooling.

See you next game!