recursive box game/toy prototype.
Go to file
HyperOnion 0f1b2f0d54 update readme. 2023-06-28 16:18:58 +02:00
assets add demo video. 2023-06-28 15:15:19 +02:00
js clean up world constants to make more sense. 2023-06-28 16:16:26 +02:00 update readme. 2023-06-28 16:18:58 +02:00 add todo list and todo item. 2023-06-28 15:15:19 +02:00
favicon.ico get basic graphics set up. 2023-06-24 14:15:27 +02:00
index.html add autosave and world reset button. 2023-06-28 15:15:19 +02:00
style.css get basic graphics set up. 2023-06-24 14:15:27 +02:00


the player character is currently the dark green square. creating new tiles creates them where you're standing, so you have to move out of the way to see them.

moving onto boxes makes you enter them. right now, this doesn't change your position; in the future entering a box from e.g. the left side will make you move to its left edge.

moving outside of the edge makes you exit the box you're in, if you're currently inside a box. this also doesn't change your position yet. if you exit at a position where there's another box in the one you exit into, you'll immediately enter that box.

there's a demo video at /assets/demo_video.webm.


  • arrow keys: move around.
  • QWEASD: paint with RGBYCM colors, respectively.
  • ZX: paint with background colors.
  • CV: paint with black and white.
  • G: create grass.
  • space: create box.
  • backspace: delete/clear/empty tiles to your left and right, and where you're standing.

how to play

run a server in the root directory and open index.html in a web browser.

more info & thoughts

the program currently autosaves to the web browser's localStorage every 3 seconds. it also tries to load a world from there when you first load the page.

the term "box" is used in the code both to refer to a set of tiles organized in a certain spatial structure, and to a kind of tile which contains such a space (or any specific instance of that kind of tile). this might sometimes be confusing.

i've noticed 2 different directions in which i might want to take this: a game focused on resource management & renewal; and a toy for drawing stuff.

the latter might make more sense within an infinite tree space, than in this more finite one.

the former feels to me like it wants to be created within the thematic context of life, growth, plants. it would probably be hard to include animals in such a game, in a way that makes them both relevant to gameplay, and doesn't make simulated specieist violence a useful strategy for game progression.

i think such a game would benefit from conserving mass throughout most transformations between different resources. look at nodecore for an example of a game that does this a lot.

i don't know how ease of box acquisition might affect gameplay in such a game. newly created boxes could be empty, which would mean that they only provide more space; they could contain tiles, which would mean that creating new boxes would create new resources.

prepopulated boxes could either contain (on average) more or less mass than what went into creating them.

if less, it makes the effective price of creating a box cheaper, as long as you can afford a certain "threshold cost". if more, it might concentrate strategy around creation, content extraction, and disposal, of boxes. unless the amount of mass created is tiny in comparison to the box creation cost. boxes could potentially also contain worlds which are interesting to explore, and not necessarily easy to extract fungible resources from.

to the extent that mass is conserved, it would make sense gameplay-wise to make transformations of different materials have inverses made up of other transformations. (this would possibly create a group.) the reason for this is that otherwise there would be materials which can't be created from any other materials, and materials which can't be destroyed by turning them into other materials.