Hacker News new | past | comments | ask | show | jobs | submit login
PuzzleScript – an open-source HTML5 puzzle game engine (puzzlescript.net)
241 points by octosphere 9 months ago | hide | past | web | favorite | 27 comments

A while back I wrote a puzzlescript detector for itch.io, all the browser based games that use it are automatically tagged. You can see them here: https://itch.io/games/made-with-puzzlescript

^ leafo is the creator of https://itch.io, which is about the coolest platform for indie game developers out there (deserving of respect alongside increpare's amazing puzzlescript). I personally like to think of itchio as almost an Internet Archive for video game culture, as well as serving a similar function for developers as MySpace did for bands in the 00's decade.

One of my favorite Puzzlescripts is Farbs' Dungeon Janitor: https://www.puzzlescript.net/play.html?p=6866423, along with his puzzlescript adaptation of Pac-Man: https://www.puzzlescript.net/play.html?p=6847686

I don't use their platform and I'm not much of a gamer, but one criticism I read online is that they intend to police their platform more heavily than Steam. The creator criticized Steam's game policy on Twitter [0]. Of course, it's their platform and they can do as they please, and if you share their views then you might view this in a positive light. If I were involved in that community I'd have some concerns of rules being selectively enforced, although I don't know if that has ever been an issue with them.

Personally, I've been favoring gog.com over Steam as of late; they have a decent amount of DRM-free indie games available. I think anyone can submit their game, although I'm uncertain of their content policy, and I wasn't able to find any information on it after a quick search.

It's also worth noting that the actual Internet Archive [1] has a large amount of games freely available. It's mostly retro games, but I don't think there's any restrictions against modern games. Of course you'd probably only upload your game there if you were making it freely available, since it's meant as an actual archive.

[0] https://twitter.com/moonscript/status/1004448157776793600

[1] https://archive.org/

Good on them! Steam used to be -the- platform where you'd find quality games. Now it's rampant with games like this[0] that would fare better in the naughty section of addictinggames.com

And itch.io's policy is essentially no hate-speech, which I think is totally reasonable to help harbor a healthy dev community. It's otherwise much, much easier to get your game up on itch.io than Steam or Good Old Games. It's completely free to upload even the earliest prototype of your game, without needing to wait for someone to approve the submission.


Hey, thanks for replying. There was a lot of interpretation of my tweet that wasn't true, I posted a follow up:


We don't "intend to police," our moderation policies have never changed.There's a lot of weird stuff on itch.io that will always have a place. We don't want hate speech on the platform.

It's easy to have a gut reaction of supporting free speech without understanding the implications of what that entails. Many of the people clamoring for free speech on gaming platforms still want games to be removed ('asset flips', things they deem low quality, etc.). With my tweet, people conjured up an idea of a morality police force which is secretly making decisions about things people are allowed to say. That image is easy to attack, but it's not even close to how itch.io works, or will ever work.

The reason why I criticized Steam's stance is because they're trying to avoid responsibility. I'm sure you're familiar with how discourse goes on the internet: people with strong negative opinions are going to put in significantly more energy into spreading their message than an average person who just wants to read around. Their amplified message does not represent everyone as a whole though. Sure Steam can ban 'trolling,' but that's too vague. I have a pretty strong feeling that their 'trolling' ban is going to end up policing the morality of message as well. And, their process is probably going to be even more secretive.

Hi leafo, thank you for taking the time to write a response to my comment, I genuinely appreciate it. I received a couple downvotes for my comments and I was a bit down about that, but I think your response is very reasonable.

Like I said, I'm not much of a gamer, but your response makes me want to give your platform a try. I think if you're willing to have an open discussion about something for which the outcome might be unknown, things are going well. I certainly wouldn't make any claim to know what the kinds of barriers and limits we should have might be. And I totally understand that it can be very challenging to manage and weight all factors. Realistically, you might get some stuff right and wrong at times. We're only human, after all.

Having been in the tech industry for a few years, my big piece of advice would be to try and be as open as possible. I always find it incredibly frustrating when companies try to cover things up (not accusing you of doing this in the slightest). I think as long as you communicate openly with the community, everyone sensible will see that and be willing to take the time to dig into things.

This puzzle game engine was written by Stephen Lavelle, who may be best known for Stephen's Sausage Roll.

Here's Sokogoban, a cute recent game made with the engine:


I recommend clicking the "hack" link at the bottom to see the code for the game.

that gave me a bit more trouble than the go one

Thanks for the link, that's really awesome!

It is great to see this pop-up again. Such a great toolset, deliberately limited, in such a way that anyone can create a game in an hour or so, but powerful enough that the games aren't all the same. You can put some genuinely interesting mechanics into it.

Stephen (the author) knows puzzle games. It is interesting to see his games, and the sophistication he has generated with this simple rule set. Terry Cavanagh (of Super Hexagon and VVVVVV fame) has also done some clever stuff with it.

For someone new to game design, it's a great start. And from there you can graduate to Pico-8!

Previous discussions in 2013 [0] and 2015 [1].


[0]: https://news.ycombinator.com/item?id=6501034 [1]: https://news.ycombinator.com/item?id=9376940

There was a game awhile back called "A Good Snowman is Hard to Build". The creator used PuzzleScript as a level editor/prototyper. He would make and play the levels inside the PuzzleScript engine, then import the completed level data into his own engine. I thought that was pretty cool.

Yup, here's the video at said timestamp: https://youtu.be/W_okgL6HJX8?t=24m15s

Stephen Lavelle/Increpare is the most impressive indie game developer out there by an absolutely landslide imo.

Beyond things like Puzzlescript he's just madly inventive when it comes to making games and interactive experiences of his own. Stephen's Sausage Roll and Slave of God (https://www.increpare.com/2012/12/slave-of-god/) stand out in particular to me but on the whole he strikes me as a guy who has tons of great idea and the talent to implement them. Only issue is he hasn't the time to devote to take most of them beyond being extremely impressive proofs of concept.

If you understand games as a system of rules, an engine that lets you simply describe those rules and then set up starting positions becomes very interesting. I've been playing puzzlescript games from the gallery, as they come out, for a while. Would love to see how far you could push this idea.

Who needs unity when there is puzzlescript and pico-8?

And before you say “it’s a different use case” that was a rethorical question.

This is so cool :D

> PuzzleScript allows you to express this succinctly: > [ > Player | Crate ] -> [ > Player | > Crate ]

I'm sorry. This just isn't succinct. You've immediately lost me. The idea is nice, and perhaps it works well within the realm of puzzle-specific scripting, but there's nothing here for a casual reader to interpret.

>...perhaps it works well within the realm of puzzle-specific scripting, but...

Yes, it is literally named "PuzzleScript". Also, if you continued reading, you'd find it is succinctly explained.

Okay, well maybe I've forgotten the definition of "succinct."

> briefly and clearly expressed

Brief, sure, clearly expressed? Absolutely not. There's more to puzzles than moving things around.

    [ > Player | Crate ] -> [ > Player | > Crate ]
This isn't succinct. This is brief. Puzzles, and games in general do more than move things around. So, if I wanted something to turn into a different item, where's the syntax for it?

There doesn't seem to be any.

The syntax is seems to be for moving things. Okay. What if I want something to slide over multiple tile spaces? Where's the syntax for this?

There doesn't seem to be any.

What if I want the item to progressively become more difficult to move, say for instance if I'm moving a snowball. Where's that syntax?

There doesn't seem to be any.

So, in short, an entire syntax has been developed for one feature: movement. And it doesn't do it well. Why would I use this?

On the off chance that you have a genuine interest in knowing the answers to your questions, and are not grandstanding, I will answer.

First differentiate between the syntax and the tool. This isn't a tool that supports every possible game. It is designed for creating movement-based puzzle games. Though it can support many others, that is its focus. You can certainly stretch it to do Tetris or Threes, but probably not Mario.

If you are involved in game technology, it is a masterclass in supporting a very large (but still restricted) class of games in a very small tool set.

So, specifics:

> if I wanted something to turn into a different item

    [> Player | Box] -> [Player | Contents]
assuming you open your box by moving into it, or

    [Action Player | Box] -> [Player | Contents]
if you want to press the action button.

> What if I want something to slide over multiple tile spaces

    [ > Player | Crate ] -> [ > Player | > Crate ]
    [ > Crate | no Wall ] -> [ | > Crate ]
The first line says moving into a crate sets the crate in motion. The second line says it keeps going until it hits a wall.

> if I want the item to progressively become more difficult to move

What does it mean to become more difficult, given that moves are atomic actions? (Back to the restricted domain of this tool.) But, for one possible design, we can do:

    [ > Player | LightObject ] -> [ > Player | > LightObject ]
    [ > StrongPlayer | LightObject ] -> [ > StrongPlayer | > LightObject ]
    [ > StrongPlayer | HeavyObject ] -> [ > StrongPlayer | > HeavyObject ]
Regular players can move only light objects, strong players can move either.

The ethos of the system is that to change state, you change object type. This is less restrictive than it sounds, because it is possible to layer objects. But it is still restrictive. And deliberately so.

> it doesn't do it well.

Based on the calibre of people who have used this, including for the rule development and level design for decently successful commercial indie games, it might be worth entertaining the notion that it might just be you. A more constructive and educational alternative might be to try and specify the same sophistication of rules in a more succinct syntax.

So, if I wanted something to turn into a different item, where's the syntax for it?

    [ >  Player | Crate ] -> [  >  Player | > Rock  ]     
What if I want something to slide over multiple tile spaces? Where's the syntax for this?

    [ >  Player | Crate | ] -> [  >  Player | | > Crate ]
What if I want the item to progressively become more difficult to move, say for instance if I'm moving a snowball. Where's that syntax?

You'll have to explain what "more difficult" means to answer that one!

The rules of the game are pattern matched onto the state of the game. A single rule defines a pattern, and a modification. "If the player is adjacent to a crate and has movement in the direction of the crate, add movement to the crate."

Looked fairly succinct to me. Can it be shortened any further?

I had a play around with this engine and found it quite fun in itself.

Actually I would hope you are trolling. If not, you definitely need to re-evaluate your choices as this may just be one of many opportunities for fun you are actively ignoring.

I work on game software for hobbyists and I think I make a fair point here. It's not overly critical, and I address some basic concerns above. It's nice software, but perhaps making a generous statement about its syntax.

I haven't been working on my game since my newborn has been my priority but I have an open-source tetris-attack like game built in eletron, typescript and phaser.

Its deterministic, has multiplayer, and frame to frame recreation to the tetris-attack mechanics


Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact