Tom P Worknotes

Löve 2D: Sokoban

My second month of learning Lua and Löve 2D went OK. I produced something more actually enjoyable than month one (a tiny blackjack game); a Sokoban clone.

Sokoban (which I believe translates as warehouse manager) is the ur-sliding block puzzle. Its rules often form the basis of mini puzzles in bigger games such as Zelda or Myst (the first to the spring to mind). It's a kind of game design atom but even in it's unadroned form its a brilliant and satisfying puzzle.

There's a standard level format so I was able to nab a bunch of premade levels and concentrate on the implementation side of things.

Anyway, I didn't have as much time as I'd have liked because of feb being a short month and half term and so on. But I was pleased to pull something together which various family members were able to actually play before the 28th.

From a learning point of view I started to wrestle in a bit more depth with Lua's Table data structure which offers some of the functionality of but has subtly distinct affodances to pythons Dicts and JS's Objects.

I had to restrain myself from indulging in refactoring and force myself to concentrate of getting somethign finished(ish) before March the 1st and I'm glad I did. I enjoyed the process and the end product enough that I'm thinking of revisiting the game mechanisms before the year is out.

Level select screen

A sokoban level A sokoban level A sokoban level A sokoban level

Brief reflection on where this is going

I'm enjoying the process of making these little games. Basically blitzing it, a few hours each week, focusing on done rather than perfect (or even good tbh), supressing the urge - developed over the last 20 odd years of maintaining and supporting codebases - to refactor everything nicely. The supression feels liberating.

Ultimately I want to make an original game out of all this so I'm starting to think about what properties that game should have. This article: To Kill a Dragon: Video Games and Addiction has some answers as to what I want to be concious of and avoid:

Even in hobbyist games, I have encountered this compulsion. I recently played Daniel Benmergui’s Dragonsweeper, from which I sense no malice at all. But I found myself addicted. I would play for 30 minutes, an hour more than I wanted to. Before I could rip myself out, my body had already hit the restart button, the game had already reformed, and I was already considering my first move. I was hooked. One gambler tells Schüll that to reach the “machine zone” is to maintain an “ever-present awareness of being in a destructive process…Even as part of one’s mind is hopelessly lost to it, lurking in the background is a part that is sharp and aware of what is going on but seems unable to do much to help.” Yes. That is precisely the feeling. I have felt it in pancelor’s Make Ten, and in my good friend Hao’s Bokuto Simulator. I name these games specifically because I am certain they hold no ill intentions. They are free games, made for fun, by designers I trust and like. And even here I have encountered compulsion, a dangerous dance with addiction.

I don't want ot make something that is engineered for this kind of "engamement". The games I want to ape are the ones that you play through and then they let you go, they stay with you but they don't feel like they have their hooks in you. Wilmott's Warehouse is a great example of a game that deliberately sets out to respect the players time and agency. Similarly 80 days, I've played it a few times through, both with my kids and by myself, and each of these playthroughs lives strongly in my memory, but returning to that world never felt anything but voluntary. Into the Breach is borderline, it has some compulsion inducing structures to the overgame but it doens't crate the "machine zone".

So anyway, as I make these games I'm going to try to meet the following goals:

That's just off the top of my head, I'm sure I'll come up with more as time goes one.