The result of this effort was a very simple game prototype.
As an abstraction of JavaScript, it does not provide any features that JavaScript does not already have rather, it provides fewer built-in methods. The syntax is much more complicated and less readable. The problem is that Harlowe is not more efficient and forgiving. It is easier to see now how these abstractions have helped me focus more on the design and functionality of my projects rather than debugging trivial errors that usually amount to missing punctuation. I am currently working with my son on a game in plain (“vanilla”) JavaScript after several years of experience working with web frameworks. Svelte aims to allow developers to write and structure an application in a way that may be easier for a human to design and maintain, while compiling to plain (and efficient) HTML, CSS, and JavaScript to keep computers happy. Rich Harris, the creator of Svelte, has made a strong case for frameworks that focus on the developer experience over the expectations of a browser. Even modern JavaScript frameworks such as Vue, React, and Svelte introduce different syntax styles and templating. Web frameworks such as Ruby on Rails and Django have allowed people to create powerful web applications in other programming languages and markup. Is there a case for using something other than plain HTML, CSS, or JavaScript? Twine does provide an interesting layout to review. Remember, all of this was to create something that was going to be exported in HTML5 (as well as CSS and Javascript) anyway. This also required me to deviate from HTML, the markup language of the Internet, and to implement Twine’s templating instead. That meant I had to dig into the Twine Wiki to try to convert my JavaScript to the Harlowe syntax line-by-line. Though I initially wrote my countdown feature for Twine in JavaScript, I had difficulty getting it to connect to the DOM elements in my scene. I dare you to disable JavaScript in your browser and try to visit your favorite websites. Though JavaScript may have its quirks, it has powered interactivity on the World Wide Web since the 90s. The problem with trying to create an alternative scripting language is that the web already has one. Of course, you can still use HTML and JavaScript in Twine, but you lose the linking and “macros” that are supposed to make Twine an easy platform for creating non-linear narrative games. In the Add a New Format tab, paste in the file path to format.js and click the green Add button. Click the Formats button in the right sidebar of Twine. In Twine, return to your project library by clicking the house icon in the lower-left corner of the Twine window. Take a look at this masterpiece: ](if: $state is "second chance")]] (unless: $state is "started")