Saturday, 2 November 2019

[DOT] New Shadow System

I've added some additional visual flourishes to DOT Debug

I realised that by tweaking my procedural tiling system, I could easily get the game to add shadows to walls.

Looks quite neat if i don't say so myself.

Early builds of the game I used hand placed tiles, which looked neat, but was such a maintenance nightmare whenever I wanted to modify the level layout. plus it added a lot of overhead for new levels. Moving to a procedural tile system is so much better

Basically, when a level starts, a 2d structure is created, which stores which objects exist at what 32x32 square of the map. That 2D structure is essentially the level. indicating free spaces, walls and error tiles. (since the game is gridbased, this works perfectly).

Then the tiling system goes into place for every point of the level, it decides what to put there. if it's blank space, it puts a floor tile which varies depending on the level. if it's a wall, a black tile is placed. and if it's a error tile a red tile is placed.

if it's a blank space, with a wall above, or to the left, then it places a shadow tile.

Here's some updated screenshots