So I have been working on a map editor for Knights. Here is a screenshot (click to enlarge):
Some explanation is probably needed. First of all you have to understand how the dungeon generator in Knights works. Basically, there are a bunch of pre-designed 12×12 map sections, which I call “segments”. There are 259 of these segments defined currently. The game randomly selects a number of these and combines them to make a dungeon. The number of segments used depends on the dungeon type: for example, a Tiny dungeon is a single segment, a Basic dungeon is 4 segments (in a 2×2 arrangement), and a Huge dungeon is 9 segments (3×3). Each segment is then further split into a number of “rooms” which are the rooms you actually see in-game.
In the map editor screenshot you can see small images of the segments down the left-hand side. (There is a scrollbar so you can page through all the segments in the file.) Double clicking a segment brings it up in the main editor window (in the centre). Below that is a palette containing all the dungeon tiles that can be used to make the map.
The editor has three modes: Paint, where you can select tiles from the palette and “paint” them into the map; Switches, where you can edit the switches and their effects; and Rooms, where you set the boundaries of the individual dungeon rooms.
The switches are defined using a mini scripting language, which you can see on the right-hand side of the screenshot (each line represents one switch). In this example there are two types of switch, “Open” and “Shoot”. Currently you have to type in the switch definitions manually, but in future I may add some sort of GUI system so you can enter them in a more user friendly way.
The plan is to do an initial release of the map editor in about a week or so. This will be in a fairly early state so should probably be thought of as a “test” release, but at least it will allow people to start using the map editor and feed back to me any problems. If anyone makes any cool rooms with it then I will be happy to incorporate them into the game. Also, if anyone wants to draw some additional graphical tiles to use with the map editor, then that would be good too 🙂