
Combat Mode Development Series: Tile Map Editor
Combat Mode Development Series Tile Map Editor
A New Way to Create
We now have a functional tile map editor that we will be using to create combat maps for Lumora. This is convenient to use an in-game editor rather than that Lumora Studio editor because it will generate .json files that can be read with no need to implement special code to read the files. So far, we have used the editor to create a tile map for a Ship Deck to be used in the Combat Mode Tutorial for the Prologue of the Story Mode.

What a Tool
The function of the tile map editor is pretty straightforward: we open a new map that is filled with any single type of tile at the specified dimensions, then we have buttons to select between different types of tiles and a paint brush that can be adjusted in size to paint the tiles on screen. There are multiple elevation levels, currently 0-9, that tiles can be placed, and they can either be free-standing floating tiles that are separated by level, or they can have continuous elevation from the base level on up. We are planning on implementing a smooth sloping tool that raises the surrounding tiles at the diagonals of the tile to be raised up, allowing for the smoothe creation of hills or other terrain features.
In addition to painting tiles, we can also paint "empty" tiles to remove tiles from the map. One can use the fill tool to quickly replace a large swath of tiles with the selected type, and it can even work with the elevation levels to raise or lower large areas of tiles at once.
There are tools for setting player (+ ally) and enemy spawn points, and there can be multiple spawn points of each type set and when a Combat Mode is initiated, players and enemies can spawn on their respective points randomly if more than one is placed.
We also have functional camera controls for navigating all angles of the tile map while it is being designed. Clicking the "Set Default Camera Position" button will make the current camera position the position that the camera starts from when loading a combat tile map.
Total Control
In order to change the brush sizes, '[' will decrease the size and ']' will increase the size. To change the elevation level, page up will go up one level and page down will go down, but for Mac users we also have '<' to go down one level and '>' to go up one level, not requiring to press shift + ',' or '.' of course. Pressing the number keys will change which tile type is the current selection, while middle mouse clicking on a tile will pick that tile type as the active one. There are currently no hotkeys assigned for the fill tool, placing spawn points, or setting the Default camera position.
Collision!
We also have modes that allow for the placement of collision tiles, areas where the tile is considered impassible. They are indicated with red tiles overlaid on the selected tile, and remain highlighted red so long as the collisions mode is enabled. This tool does not currently work with the fill tool, and we will soon be adding collision to empty tiles at any given elevation to prevent movement to areas outside of the combat zone.
Also worth noting is that there is the ability to undo and redo actions, although this is a bit buggy, especially with the fill too and collision mapping.

Kicking the Can
Down the road, we plan to include the ability to load in structures or other game assets that take up a certain space on the tile grid, allowing custom collision mapping to assets to bake-in their collision for however many of the asset are placed without having. to set up collision for each. We want to improve the smoothness of camera movement during editing, including a smooth "focus on selection" by pressing the 'f' key. We will also try to implement tile face culling to dramatically improve the performance in rendering only the tile faces that can be seen by the camera for very large and complex tile maps.
