Playchilla logo

Laser Towers

I had a very productive weekend. Previously I had designed levels directly in xml/json with a standalone simplistic “level paint program”. I didn’t like this setup for many reasons, one being code maintenance in two places another being longer iteration times. Even though I really don’t like programming editors I decided to spend last weekend just doing that.

Level Format

I managed to remove all xml formats and convert them to json and build the editor in game. This means I can actually edit levels while playing them. It was totally worth the effort. I converted the xml because json is so much simpler and lightweight.

If anyone is interested this is how the level format looks:

{
	"name": "Algorithmic",
	"uid": "r2_algorithmic",
	"mapPos": [0, 0],
	"mapSize": [12, 12],
	"numberOfLives": 10,
	"seed": 5,
	"energy": 120,
	"easyWaves": 10,
	"mediumWaves": 20,
	"hardWaves": 30,
	"waveInterval": {"init": 7, "add": -0.2, "min":3},
	"level": {"init":1, "add": 0.4, "mul": 1.05},
	"waveSizeDef": {"init":5, "add":0.5},
	"waitDef": false,
	"waves":
	[
		{"queue": ["Xor"]},
		{"queue": ["XorSpeed"]},
		{"queue": ["Xor", "XorSpeed"]},
		{
			"wait": true,
			"size": {"init": 1, "add": 0.2},
			"queue": ["XorBoss"]
		}
	],
	"allowedTowers": ["bullet", "slow"],
	"tilesData": "sssssssssssssssspppsssssssssppppssssssspptppsssssssppttppsssssppprpppssssspptrrtppssspptppptppssspprpppprppsppttpppttppspptptpptptpprrpprrrpprpp",
	"overlayData": "00000000000000000x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b00000000000000000000000000000e"
}

On top of this I added an tree based EditView that allows me to edit instantiated level object on the fly. This was boring to do since it involved so much UI program (which I really dislike). On the right in the image below you can see the palette, all the different tiles and overlays (bases, entrances and exits). I think now it’s gonna be fun to create levels.

I will include the level editor when it is usable for and has less bugs.

New level & laser towers

So I built a level in my new editor and added a new tower type: Laser Towers. Those shoots beams through one or more enemies giving mass damage. Place it carefully to hit as many as possible.

Now go and play the new level here! Remember to leave feedback on what sucks and needs to be improved (and what you like).

Comments are closed.