An atomic piece of dialog, which you (the player) acknowledge by selecting an action or pressing ok, is a single "event" in my system. Events are strung in a queue to create an EventGroup.

Events primarily cause 2 things to happen:

  • The player gains something (stats or experience going up, key item achieved, story progression)
  • A currency (time or energy) is spent

In abstract game design, a choice must have consequences for it to be meaningful - so something has to be spent for something to be gained. However, what I was working on yesterday was more about:

  • Easily creating events.
  • Exporting them.
  • Importing them into the game.

We separate the data from the logic (engine). The fastest way to bulk edit 1000s of entries of events is through tabular software. Traditionally I have used Excel but lately have been using Google sheets for future collaboration and transparency. Excel is superior due to keyboard shortcuts and because it's easier to write an exporter tool yourself with VBA or pywings.

Creating & exporting events

Here's a rough screenshot of what the events look like right now.

I use a JSON exporter and export the contents as an array. This took about 15 minutes to install and correctly set up.

Importing the data

This was much harder. Due to its use on the web, you can't just import any random JSON file using the import statement and you can't use FileReader unless the user selects the file (which is not the use case here). The long and short of it is protection against certain vulnerabilities.

I was avoiding the Fetch API because I didn't want to start a server. In the end, I had to give up just opening the file as a file, and now run it through a development server on WSL using this reference: CORS request not HTTP.

(And that also means I'll be using the Fetch API.)

Story stuff

I've switched the opening maybe 3-4 times - first you were opening a package, then discovering something valuable that you trade with a privateer for a bump up in your immigrant class (forging a new identity). The privateer is arrested while in space with you and your best friend but you get away and crash land into an abandoned mine, which you fix. You then start a delivery business with your new credentials.

Opening 1 started as far as the package inspector, Opening 2 was crash landing in the abandoned mine, Opening 3 was you doing last-mile transport stuff, and now Opening 4 is you leaving as a trader, no longer as a pure delivery person.