nielssp.dk

Arq Devlog #10: Interiors

Previous: #9: Slash animation

In devlog #6 I added some tiles for creating buildings. I've made it possible to enter those buildings:

Entering and exiting buildings.

I implemented this by adding an “inside”-flag to a player's position and a “door” property to tiles. If a tile is a door, standing on it will flip the inside-flag. The world map now consists of four layers:

  • Exterior
  • Exterior objects
  • Interior
  • Interior objects

The object layers are for placing transparent tiles on top of the background (e.g. trees). The renderer switches between the interior layers and exterior layers based on whether the player's position in inside or outside.

Layers
Exterior layers on the left, interior layers on the right. The purple X-tiles block movement and the purple arrow tile is a door tile.

I use Tiled to make the world map and manage the tile set. So far it has worked pretty well and has the option of saving both maps and tile sets to JSON that I can easily load both in the backend and frontend.

Next: #11: Various graphical updates

Comments