SNAKISMS DIVISIOMS: Surface vs. Code

Screen Shot 2017-01-13 at 08.52.40

God that’s a bad title. Still, nothing I can do about it, right? Can’t change it now.

Anyway, I’m still making SNAKISMS – the plan is for there to be 20 of them in the collection. I wanted there to be 36 to match with PONGS and BREAKSOUT, but I couldn’t think of 36 so there’s aren’t. I tell myself that SNAKISMS is only “kind of” a sequel to those games, as it’s approaching the multi-pack idea in a different sort of way, much more themed. It’s a philosophical successor.

One thing about designing and making the various versions of Snake in the game has been trying to work out the sort of ontology (right word? not sure) that the philosophical concepts actually apply to, and how they should apply to them. This is kind of the main reason I wanted to make the games in the first place, because it would lead to thinking about these ideas. I though would try to write a least one post about one of those moments… and plausibly more if I’m a good person.

One clear division is whether the philosophical concept should be “only” reflected in the player experience of the game, or whether there’s also some sort of moral (or, okay, other) duty to have the concept represented in the code itself.

Consider “Nihilism”, which is just a blank screen obviously. There are many ways to display a blank screen in JavaScript/Phaser or other languages. I can’t just have a totally empty code file or, actually, just no file at all, even though that would be the ultimate representation of Nihilism – because if I do that then the game will crash/hang on the screen before the game loads, because it can’t find anything to load. I could just have an empty skeleton of a Phaser game that just sets the background to black and that’s all – although of course there’s already a vast amount of “stuff” implicated in there (all the built in variables and settings, say) that isn’t very Nihilistic. What I ended up with, which I kind of like, is that the Nihilism code extends (this is object oriented language for saying it builds upon the pre-existing code of) my default Snake implementation, but does so by basically erasing everything it does explicitly. So where the Snake implementation has a method called “create” that sets up the world, for instance, the Nihilism version explicitly empties out that method so nothing is created.

Or consider “Monism”, in which all elements on the grid of the game (the snake’s body, the walls, the score, the instructions) “behave like apples”. I wrote about this the other day, and I’m relatively happy with the way that the player experiences the monism in terms of how the game plays – everything can be eaten, makes the snake longer, awards points, and returns to the screen after the same delay in a random position. But as per some discussion that happened on Twitter yesterday, you can also take this philosophical angle closer to the code itself. My implementation is very haphazard “get it done” stuff, but it would be possible to rewrite the code so that, for instance, every apple-like object on the screen (including the apple itself) is literally made of the same code stuff, sharing all the functions and so on through (again) the beauty of object-oriented programming. That would be closer to a “true” implementation of the philosophical idea – even though the player wouldn’t experience this per se.

All of which is to say, it’s great to actually make these games because you get to think about this sort of stuff. And sometimes, though not always, you really do implement things differently to get at a kind of “truth” beneath the truth of player experience. In fact, one thing to be aware of moving forward is just how literate many people are with code and just how accessible the underlying code of my (JavaScript) games really is. So unlike more walled-in kinds of code, people really could check up on how philosophical my programming is. (Not very. Sorry.)

That’ll do for now. See you next time. Love ya.

 

13 January 2017
← next words previous words →