Grid Based Map Editor

An unfinished Unity editor tool to create grid based maps

Concept/Idea

This is a basic concept for creating grid-based maps using the unity editor. The idea came when I was playing one of my favourite games Legend of Grimrock. This is a dungeon crawler where the main party delves into a dungeon/prison. The movement in this game is locked to a grid. 90° turns and per tile movement. The same restrictions apply to the enemies in the game. Alongside some interest in extensible (de)serialization of map data, I started this project.

Features

- Serialization

The map can be saved and loaded from/to a JSON file. Tiles have associated GUIDs to know what object needs to be used to recreate the scene.

One improvement that can (and should) still be made is applying the memento concept. Now the Tile data is directly serialized to JSON, but if at some point I would like extra data to be associated with the tile, a memento representation would be useful.

- Unity Editor Tooling

I added some tooling within the unity editor to more easily create, edit and delete the grid based environement. This includes adding gizmos to visualize where new tiles can be created.

You can define a scriptable object that defines what part of a tile looks like. This can then be used to directly drag objects into the scene and have it automatically placed on the grid.

Tiles or any of its components can be rotated using the gizmos on the tile itself.

- Interactable Objects

There is also some interaction logic on the tiles. Currently, it's only limited to interaction on the same tile. But an editor for connecting inputs with outputs is definitely something interesting as well for the future.

- Player

There is a player object that can be placed on the map. The player is able to move around the map locked to the grid and interact with the tiles.

The player can also interact with stairs.