Version 0.1 – LGJ 2021


Did you ever want to write a visual novel in Emacs Lisp? Half a year ago, I didn't even ask myself that question, but now it has become a possibilty… more or less.

The Good

Towards the start of this jam, I released Tsukundere version 0.3.0, which comes with many major improvements over version 0.2.x used last year during the Yuri game jam and especially version 0.1 used back in the Autumn Lisp Game Jam of 2020. Apart from being able to support games written in languages, that are not Scheme, it comes with many improvements. Somewhat notably, it uses the entity, component, system pattern, which makes it easier to inherit functionality from already existing parts without the actual "inheritance" usually associated with objects or records. Scripts can now be stacked in a way, that doesn't break saves (just the compatibility with older saves). And we finally have real menus, courtesy of Nicolò Balzarotti, who did most of the implementation.

On a less technical note, I was also finally able to scrape enough free assets to make a completely free game (as in freedom). I am cheating a bit, because some of the assets I'm using are informally licensed, which means that while the creators want them to be free, certain jurisdictions could still make them unfree in practice, because they have not expressed that in enough legalese. Pretty fitting for a dystopia, no?

The Bad

Spring came a bit too fast for all the text improvements I had planned. Perhaps I'll be able to somehow work gettext and fontconfig into Tsukundere in time for the Autumn Lisp Game Jam 2021, but I wouldn't get my hopes up too high. I already missed two jams I planned on submitting a work for back in February, because 0.3.x just wasn't ready yet. On the other hand, I don't feel like using Lokke for my autumn submission.

The Ugly

Remember when I said at the start of this document, that I would write my novel in Emacs Lisp? That's exactly what I did. Thanks to some clever trickery I coded into Tsukundere, it loads, but some of that code is certainly much too ugly to expect others to write without a deep understanding of Tsukundere, Emacs Lisp and in particular the Guile implementation of Emacs Lisp – or alternatively enough drinks, not that I had any. I'm also certain, that I unearthed quite a number of bugs in that last one, some of which will hopefully be fixed soon. In particular, I don't think your average Visual Novel developer should be expected to come up with a reasonable implementation of setf, much less within the span of a week. Some smart person will likely find the problems with mine soon enough.

Why Emacs Lisp though?

We all know, that the only correct answer to the question "Why?" is "Why not?" Always. But let's put our contrarianism aside and ask for actual reasons to code in Emacs Lisp in 2021. One feature, that I really miss, especially when working with Tsukundere code, is the Lisp-2-ness of Emacs Lisp. Being able to bind a variable both as a variable and as a function is like a blessing when it comes to person types, which would otherwise require syntax rewriting. Perhaps I'll one day emulate that with Tsukundere's entities, but there was a sense of nostalgia, when I was just able to move Yuu to a different position and then have her talk like a character in Ren'py.

When it comes to the smaller stuff in technical terms (but more so important in social terms!) like coding conventions, function names, etc. I think I coded so long in Scheme, that my Emacs Lisp code starts to resemble it. I remember, I used to feel much more strongly about sigils like "?" or "!" inside Emacs Lisp code back in ye olden days of Emacs 24, because I wasn't yet used to that style (looking at the internals of dash.el made me mad… well, it still does, but for different reasons). I sincerely hope no one claims the percent sign as a library prefix, though, because that would seriously fuck my configuration.

Another benefit of using Emacs Lisp as an implementation language, is that you can use Emacs without anything attached to give you code completion and what not (I recently replaced the unfortunately named company with corfu, but that's besides the point). Using Geiser is nice and all, but it requires an active REPL and then Emacs complains, that it's still open when you want to close the window. Not to mention, that inside Guix I often code in environments, that aren't fully set up for execution, so I don't really care, that Emacs can't execute init! as long as it's able to tell me, that it's a function of no arguments.

Maybe at one point in the future, when Guile Elisp (and Guile Emacs) replace the real thing, we can have the best of both inside our very text editors. For now, I'm fine with having just a glimpse of that inside my own code.

Files

dystopia-0.1.1.tar.gz 17 MB
Apr 25, 2021
Digital Deluxe Tarball – contains all dependencies 295 MB
Apr 25, 2021

Get dystopia.el

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.