Engine Rewrite
Well, the engine has been rewritten.
Originally, I simply threw together an awful mess of Reveal.js, marked.js, vue.js and animate.css.
It was a true mess - however, it was enough to prove the concept and work out a bit about the architecture, and the requirements I would expect to have for a decent non-linear adventure story. Interactive Fiction based on web tech should be capable of more than flipping through random pages. Dropdowns, text inputs, and dynamically changing fields are all things that I ended up making use of in the original prototype.
With all that in mind, the new engine, custom built for the game, is fairly different.
Firstly, it doesn't have any of the features of those libraries that I didn't use, or really want, which trimmed down about 450kb of assets. Which is non-negligible when it comes to loading times.
Instead, we're left with an engine that mostly recognises plain HTML5 markup, but with enough dynamism that tapping into it and manipulating for the exact use cases of Choices works.
We've completely dropped Markdown - we never needed it. As a writer, I have a tendency to get caught up in typesetting, and HTML works fine for that. Instead of interpolation, I introduced a new element that can load data either from a dataset variable, or from localStorage. It also supports default values just fine by default. Using a value block inside the HTML looks like everything around it, so it isn't a big deal.
Because we're being less dynamic, and more structured with fairly semantic structure, the output works a hell of a lot better with my screen reader. As my screen reader is more primitive than most, I think it's fair to say that it should work with the vast majority out there. It requires double-tagging links with both an ID and the dataset goto variable, but that doesn't seem overly verbose.
Finally, because the engine now supports everything and isn't fighting CSS at every turn, we can add any kind of element. Images, videos, figures. We can also add animation to all of these, and whilst it's tempting to change that up a lot, that's probably a bad idea for readability, so I've adopted a few standards. Choices tend to fade in from the bottom, and story text from above. Certain actions have their own animations. (Sidenote: The animations seem to work better on mobile than desktop, which was a surprise. Certain animations seem to bailout early on desktop for slower computers. Ah well, can't have everything.)
I'm continuing to maintain the engine separately, because though it was written just for this game it should be generic enough and to my own tastes to allow me to experiment with other Interactive Fiction further down the line. If Choices doesn't manage to burn me out with the massive number of interweaving decisions it is looking to have... You can see it here.
Get Choices
Choices
Status | In development |
Author | s4b3r6 |
Genre | Interactive Fiction |
Tags | Fantasy |
Languages | English |
Accessibility | Subtitles, High-contrast |
More posts
- Mapping ChoicesApr 13, 2021
- Engine Rewrite... 3Apr 12, 2021
- Engine Rewrite... 2Jan 14, 2021
Leave a comment
Log in with itch.io to leave a comment.