I was hoping to fix a freeze bug in Skin Deep before I wrote a post-mortem, but I might not find the time to do it before the voting ends. And as I hope everyone who reads this will be interested in playing, rating and above all commenting on the game, I’ll post this now.
I upvoted the theme “beneath the surface” as I thought that both the literal and deeper meaning of those words can be used as a basis for a good game. My thoughts when I saw the theme when I woke up at 7 a.m. (CET) revolved around what can be hidden behind the surface of people. Specifically I thought about the expression “Beauty is only skin deep”. From there, it was a short step to come up with the morbid idea of a surgery game where you peel the skin off a face.
Skin Deep screenshot
At first my idea was to use the game mechanics from Qix, where you move around freely on the playfield, and once you close a polygon, that part of the playfield is cleared.
Qix in-game screenshot
I though a bit about it, but then came up with the final idea where you can only move along premade edges, which I thought would be easier to implement and also a bit different. The interesting thing with the game mechanics in Skin Deep is that you’re your own enemy. The challenge is to not wind up in a dead end.
I ended up using most of the tools I mentioned in my I’m in post.
CoffeeScript as a programming language.
Sublime Text 3 for editing code.
MakeHuman, software for creating realistic 3D models of humans.
At first I tried exporting the 3D model into Blender and render it from there, but I didn’t find out how to get it to render properly, so I just took a screenshot of the MakeHuman window. MakeHuman rendered the eyes very dark, which just added to the creepiness of the game.
Even though I didn’t end up using Blender for any 3D editing, I still used it for creating the wireframe mesh. I’ve sometimes used Inkscape for editing 2D content for games, but the nice thing about Blender is that it’s easy to get the data out from it using its built-in Python API. And Blender could give me all the data I needed: vertices, edges and faces (polygons).
For the skin-less face, I created a mashup of anatomical images using GIMP.
I created the music in Caustic 3 on a Samsung Galaxy tablet. Listen on SoundCloud.
The sound effects were made in Bfxr.
What went right
For once I made a game that has both music and sound effects. Success! :-)`The music is very simple, just two major chords played slowly in different variations, some drums and very minimalistic bass. Still it gives the game a certain mood.
What went wrong
Since I’ve turned freelance, I don’t have an office to work in. My plan was to spend time at libraries and cafés, but I didn’t get around to it for several hours. I lost some inspiration when I was at home and felt I neglected my family in the other rooms. It took too much time to get started.
Over-engineering the algorithm and data structure for removing polygons. The playfield consists of polygons, ranging from 3 to (I think) 5 vertices, and when the line is closed, I need a way to figure out which polygons are inside it, so they can be removed. For some reason, I didn’t step back and think about the actual requirements, and (tried to) implement an algorithm that required each vertex to keep track of the edges connected to it, and each edge had to keep track of its (one or two) adjacent faces. I’m sure it would have been good for performance if there were millions of polygons, but for this game, I realized too late that I could just check if the center of each polygon is inside the polygon formed by the lines. I simply implemented this using Phaser’s Polygon.contains(x, y) method. Only problem was that this method proved to have a bug, which I found, fixed and submitted a [pull request](https://github.com/photonstorm/phaser/pull/766) for. And I still over-engineered it so the game has a bug that causes the game to freeze sometimes. Sigh. And I’m such a big proponent of KISS.
For next time: Include music. Plan to stay away from home. KISS FTW.