Blaugust #18: goblins and treasure

PuzzleScript is a nifty tool by increpare that has been on my radar for a while, and last night I took the time to learn how it works. Over the course of a couple of hours I figured most of its features out, and produced my first (tiny) game with it.

I therefore present, GOBLINS and TREASURE:

goblins-and-treasure
Click to play in a new window. PuzzleScript games require keyboard input and so sadly only work in desktop browsers and not on mobile.

You control the little orange-headed fellow and have to collect all of the yellow coins, while avoiding being touched by the goblins. It’s pretty simple stuff. I also figured out how to add red levers, which open otherwise locked doors.

PuzzleScript is a really great tool for making match-three and Sokoban style puzzle games. It’s all done in a very simple markup language, with ASCII art to represent the graphics and levels. For example, here’s the rule for collecting a coin:

[ >Player | Coin ] -> [ >Player | ]

The pattern contained in the square brackets on the left side of the arrow is checked for each turn, and if it’s found, is replaced with the pattern on the right-hand side. The > symbol signifies movement. So this rule is read as, “If the Player moves into a square with a Coin, replace those squares with the result of the Player movement and remove the Coin”. And for switches that open doors:

[ >Player | ClosedSwitch ] -> [ Player | OpenSwitch ] 
[ OpenSwitch |...| Door ] -> [ OpenSwitch |...| OpenDoor ]

“If the Player moves to a ClosedSwitch, replace it with an OpenSwitch. If there’s an OpenSwitch in line with a Door, replace it with an OpenDoor“.

The sprites used for each tile are likewise defined in plain text, by specifying a palette and then writing them out, paint-by-numbers style. Everything is a fixed 5×5 pixel size, which is pretty small, but just large enough to roughly express what you want. Here’s my goblin — please excuse my rudimentary pixel art skills:

Screenshot 2015-08-18 13.48.24
Not too shabby for three colours and only 25 pixels!

It’s all that simple. There’s some really great documentation, and you can add rigid bodies, pushing/pulling of objects, have things move towards or away from the Player, or randomly, have multiple player objects, perform animation, play sounds. There’s everything you need to make a puzzle game, and, as a nice touch, the documentation even points out what things are difficult to implement, and suggests workarounds.

I can definitely see myself either polishing up GOBLINS and TREASURE or making some new things in PuzzleScript, it’s a great system. It’d be especially good for prototyping ideas quickly, or for presenting small gameplay mechanics. I’m really glad tools like this, Twine and FlickGame exist; getting more people making more games can only be a good thing.

Leave a Reply

Your email address will not be published. Required fields are marked *