Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+1)

Wondering how to do arithmetic? Here's how to get the difference between two numbers:

:: x y sub > sub 
:: x   sub > sub pos 
::   y sub > sub neg 
::     sub >
(1 edit)

I’m going to be honest, I have no idea how to read what you’ve posted in these comments. Is this something that would make sense if I wasn’t in the itch emulator?


Related question: do any of the symbols have inherent meaning or functions? It looks like two of them are the same symbol as as the “run operation” and “undo” buttons, but when I use them they seem to operate exactly like any other symbol.


Edit: I read the longer guide on Pocket Rewriting, and it looks like there are some additional functions I need to play with and understand. Still, some additional clarification on the notation system used here would be appreciated.

(6 edits)

Thanks for your questions, I'll expand on the docs.

do any of the symbols have inherent meaning or functions?

They don't, there's really just two things in multiset rewriting, rules and symbols.

It looks like two of them are the same symbol as as the “run operation” and “undo” buttons, but when I use them they seem to operate exactly like any other symbol.

That's just so you can customize them :)

Still, some additional clarification on the notation system used here would be appreciated.

A line starting with :: indicates a rule, symbols are just names that could be shapes in tote, the caret(>) indicates the start of the right-hand side of the rule, that's it :)


Above are the rules for the subtraction operation, now if I put some things in the bag(8-3):

And press evaluation a few times, I get the result 5:


Amazing, thanks for typing all that out! That makes perfect sense.

BTW, there appears to be a glitch in the browser version. If you set the rule to "runs on timer" and add the necessary ingredients, it seems to run twice. So setting the first default rule to "timer" and adding a triangle and circle results in two squares instead of one.