itch.io is community of indie game creators and players

Devlogs

Level definition

Hondensteen
A downloadable game

The loading and saving of the level is handled by a custom editor, which uses two text files for that.

One file (the one seen on the top) defines the basic layout of the level and the loader script uses a mapping between prefabs and the characters used in this file to know which object to instantiate.

The other file (the one seen on the bottom) has custom attributes for the gameobjects that need it, currently only the guards use this feature to persist their rotation. Each gameobject that needs to save/load custom data implements an interface and the level loader calls the interface methods when needed.

Each "tile" of the level fits in a 3x3 (Unity units) cube. 

Read comments (2)