Code Descending a Staircase

screen-shot-2016-11-14-at-21-57-45

 

Getting closer and closer to this Twine o’ mine Burnt Matches being done. Currently going back and forth through its various spaces making sure everything actually works, which had mostly been fine until I got to the staircase in the game. As I believe I wrote last time, a big part of the game for me has been doing various bits of spatial representation through text, and the staircase was one of the earliest things I put in that I really quite liked – you walk down an arbitrary number of steps by clicking link after link until you get to the bottom and find a door (the screenshot up there shows the screen after you’ve gone down all the stairs). It works pretty well to convey the idea of stairs with text and space rather than just saying “you walk down some stairs” or whatever. And that’s important to the nature of the game, because a big element is feeling like there’s effort involved to get through the various spaces – not challenging effort, more like “trivial effort” actually, but something that takes you time and requires determination.

Anyway today’s big nightmare was realising that because I want the player to be able to back through the facility they’re in and leave at any time, I actually needed to have it be possible to walk up the stairs as well as down them. That turned out to not be easy at all because the staircase is a moderately terrifying jumble of javascript that generates Twine code and inline CSS that generates the staircase itself. It ain’t pretty, and working out how to kind of write it “backwards” was harder than it was writing it forwards.

Eventually I did get it working (through rather more trial and error than a better person would have allowed), but it again strikes me as so funny some of the situations I end up with the text game. There’s so much “physical” stuff in the world of the game I fighting with Twine to represent, and of course you end up with these very fragile representations, like a flight of stairs you can go down but not up. Whereas in an engine like, say, Unity, if you make a set of stairs and an avatar, that’s that, the stairs are stairs in the good old fashioned physical sense.

On the other hand perhaps the sheer difficulty of representing these architectures in text (and space) will magically form some part of their aesthetic experience for a player? Maybe?

Probably not.

That’s okay. We stonemasons don’t expect to be recognised by you stair-walking dilettantes.

14 November 2016
← next words previous words →