TL;DR I wanted to make it so I can use “vim” and “make” and “py.test” to dev/test Inform, check out what’s in progress by:
git clone --recursive https://github.com/spankminister/i7project
You should be able to just type “make” if you have make/gcc installed, and you may need to add the directory with inform6/ni to your path.
Long version:
I’ve been somewhat dissatisfied with the way Inform 7 is set up for development. I’m not blaming the tools-- I understand the rationale behind wanting to create a means for game dev with non-intimidating (to writers) syntax and a built-in IDE. But as a coder, Inform 7 is a programming language with syntax, scope, compiler errors, and everything that goes along with that. And making a program of any nontrivial complexity requires code organization, the ability to generate robust unit and regression tests, and the means to refactor and isolate functionality and responsibility. Most of the criticisms of my first game weren’t because of the prose, but because it was buggy. And because of the legacy of Inform 7 being a natural language manuscript, we have one big text file and the general attitude that one should send the “draft” to “proofreaders.” But really, no serious application today does QA by simply sending the “beta” to “testers” and telling them to do whatever comes to mind-- to really identify and isolate bugs, coherent test plans ensure that the parts of a program work separately, and then that they work together.
So, since I develop on OS X and Linux primarily, I wanted to make it possible for me to develop in a way that promoted good habits in terms of code reorg, unit tests, and so on. There’s a bunch of changes I made, including:
[] Inform can be invoked via “make” which will perform the I7 compile, the I6 compile, as well as glulxe built against cheapglk
[] Run Python style unit tests, such as specifying a series of commands that complete the game and checking the output for "*** YOU WIN **"
[] Source files go in the Projectname.Inform/Source directory with the .txt extension, upon make, all these .txt files are concatenated together to make the story.ni that actually gets compiled.
I’d like to go even further in the testing department, adding unit testing for scenes, threaded conversation, and connecting them all together to make more complex regression tests. Also, I think it would be cool to have an “Infinite Monkey” tester that randomly took verbs and nouns from the game and attempted to brute force complete the game, as an attempt to programmatically find bugs that could make the game unwinnable. Ideally, I’d be able to harvest actions and objects from the Index, but I’m not sure how to grab things programmatically out of it quite yet.
I’m applying this approach to my “rewrite” of my first game. I’m not throwing anything out, I’m just adding things into this project “cleanroom” style, and writing tests as I go to try and prevent the bugs that plagued the original from making their way in. I know a couple of people had been asking about command line development, hopefully this helps someone.