Editor


This update adds an editor palette. I'll expand on this later for creating levels, for now it will allow you to tinker with how Unending levels are made.

Press P to open the editor palette. When you left click you'll paint or delete anything in the game, depending on what brush you have selected. Right click to set your brush to what's under your mouse. On the palette you'll see familiar symbols from the game - those are all buttons, go click them, experiment.

At the bottom of editing mode is a description of the current brush selected. This will require a bit of a deep dive into what the objects in Undending are actually made of.

Each item in Unending is a 32 bit number. Normally we use numbers for simple math, but we can break up those 32 bits into other numbers and simple states. These are used to describe each item in the game.

The 1st 10 bits are reserved to give us a number from 0 to 1023. We're packing a 10 bit number into a 32 bit one. This is the Actor Number. The actors so far are:

0: BOX (boxes and decoys)
1: WALKER (plus symbols)
2: TURNER (tadpoles)
3: TURNER_TUFF (fat tadpoles)
4: SLIDER (bone shaped)
5: DOOR (generates a side room)
6: BULLET (goes straight and dies when it hits stuff)
7: TRAP (spiky)
8: SPLITTER (splits into tadpoles)
9: REKLAW (walker with reversed walking rules - doesn't quite work, try multiple together to see why)

It's highly unlikely I'll ever need 1024 actors but the breathing room allows for some creativity in the far future. Subsequent bits are used as on-off switches. I could use more bit-packing trickery, but these values are core concepts in the game and I want them readable whilst there's still bits unused.

Direction: UP, RIGHT, DOWN, LEFT. All objects have a facing direction, which is one of these four bits. The need for four all of them will become clear later.
Team: US for the player, THEM for the enemy. Having a team means having an Actor Number. This informs the enemy movement as well as rules for swapping and attacking.

BLOCK is used to stop pathfinding. Enemy boxes are given BLOCK so enemies behind them sleep. They have a better chance of killing the player if they're not rushing a choke point.
M_DIR is used to mark objects that use multiple directions like the trap and slider. The direction bits are repurposed for these objects. M_DIR items cannot have a hook attached because they don't have a rotation.

There are currently 4 passive abilities - states that transform the way an object behaves:

WALL Cannot be attacked or walked through. The passive WALL on its own creates a wall. It can have other passives applied to it, but not SPAWN which requires a team designation to activate.
BOMB Hits adacent tiles next to it (but not what attacked this object) when it dies - the hits clear WALL passives.
SPAWN Can no longer move. Spawns a copy of itself (without the SPAWN passive) every 4 turns.
HOOK Dragged along when adjacent object it's facing moves.

There are still bits remaining for more mechanics in the future. I imagine most ideas will end up in the Actor list, making the passive abilities easier to read and keeping spare bits available.

It will be a while before I can get a level editor running. With the current ruleset it will mean having a rectangle room of any size with a DOOR to kill as the finish. Unlike in Ending I can stick the door wherever the hell I like. More than one door. Or try a door with a hook, I had a go myself - that's a fun puzzle when it's attached to you.

If you find some delightfully fun behaviour, post a screenshot. I rarely think of everything. That's why I get the computer to do it for me.

Get Unending

Buy Now$4.95 USD or more

Leave a comment

Log in with itch.io to leave a comment.