Engine… ering

E♥E isn’t the first game I’ve ever written, but it came with the first engine I’ve ever written. I’m not a professional programmer but I wanted to see how that would go down.

Initially, it was supposed to just be a text-only engine, running in the console or maybe some sort of fake console wrapped up in a window.

Over time though my vision of it changed and I ended up using some pre-defined elements. Despite that initially, I wanted to do everything on my own. But then the scope of ideas outgrew my capabilities and I ended up with something a bit bigger than initially anticipated.

Untitled Diagram(1)

Since I wanted E♥E to not be hardcoded into the engine I’ve opted to make it very data-driven. In essence, the game is stored in the elements on the left, while the engine is on the right. The engine does not support any of the game mechanics on a hardcoded level.

In fact, all of the game’s logic is stored in the Automata, which is a collection of Finite State Automata described in the Esoteric Scripting Language (ESL), something I’ve designed on my own too.

The ESL isn’t a big deal… it’s a very simple language, Polish Notation (a.k.a. Prefix Notation), but it’s Turing Complete and capable of everything I need to write the game, and then some. I’ve developed features for it I’m currently unsure if they will be used for E♥E.

And the Data allows larger chunks of text to be written and stored easily. As well as miscellaneous data in the form of, mostly, jagged CSV files.

The engine itself is composed of two primary elements. One that is my work – the Interpreter. And one that is not my work – the Web Browser view.

The Interpreter reads the Automata files, processes ESL, accesses the Data files, maintains the game state/memory, controls the Printer and receives user interaction though Esoteric Query. It is the logic layer of the Engine.

The Web Browser, on the other hand, receives an HTML document from the Printer, displays it using CSS, handles the JavaScript behaviours and receives user input. In essence, it is the presentation and user interface layer of the Engine.

It might not be the best engine in the world, but this one is mine.

Leave a comment