Home
Posted on 12/24/2021
Tags: Games, Programming
PuzzleScript is a way to make tile-based games that run on the web. It was created by increpare.

An interesting tidbit from the credits page: PuzzleScript's creator is/was flatmates with Terry Cavanagh, who made a bunch of popular and creative games: VVVVVV, Super Hexagon, and (my favorite) Don't Look Back.

The PuzzleScript games I've seen usually have Sokoban elements: pushing/moving crates to solve puzzles. The wrong moves can make a level unbeatable so another core element of PuzzleScript games is unlimited undo by pressing 'z'. Explore the gallery and check out increpare's portfolio of games.

Notable Games




Sokoboros

(backup)
I enjoyed this game the most. Sokoboros combines elements of Sokoban and Snake. The game's name is a clever pun that combines "Sokoban" and "Ouroboros"!



Atlas Shrank

(backup)
I enjoyed this game where you play as the Greek Titan Atlas who has been shrunken down and needs to escape a series increasingly complex of rooms.



Legend of Zokoban

(backup)
This Zelda-inspired game is made by Joshua Minor. Joshua's twitter feed has led me to many interesting projects and ideas, including PuzzleScript and PICO-8! If not for him, these posts wouldn't exist. According to LinkedIn, Joshua's been an engineer at Pixar for 21 years at the time of writing. How cool!



Collapse

(backup)
Terry Cavanagh made this game. I'm reminded slightly of Don't Look Back: the main character is navigating a hellish and dangerous world to retrieve something beautiful.



Love and Pieces

(backup)
Love and Pieces is made by Lexaloffle / Zep, the creator of PICO-8!


Some Technical Details



PuzzleScript source code (backup) reveals some cool details:
- PuzzleScript has its own web-based code editor. I particularly like how it displays colors for the sprite pixels defined in text.
- Instead of hosting its own database of games, it integrates with GitHub's gist API. Every game is just stored in a gist in a user's GitHub account. For example, Atlas Shrank's gist is here. This is an interesting and clever way to avoid hosting your own server.
  - The code to post a new gist can be found in the shareClick function here.
  - The code to load a gist can be found in the getData function here.
  - play.html loads whatever gist id is appended to the url (which looks like: https://www.puzzlescript.net/play.html?p=6994394)
  - I think there's a risk loading content this way: it could look like the website owner published content when really it was published by someone else. The content could be offensive or harmful. To mitigate this, if I use this technique in a project I will probably show a disclaimer on the website that this content is from an external user with a direct link to that user's gist.