Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Hi! We are glad that you like our game.

A creep is a number of textures that replace each other on a ground plane like frames. We also have something like a “build-up map” which is a low resolution grayscale texture where black pixels are free to build up and white pixels are not. It is generated at runtime from the creep textures and the position and size of towers in the game logic, and is used to check when the player wants to build something. This could be implemented in more lightweight way by using a bool[,] map instead of a texture, but Unity has some useful functions for dealing with textures, so we'll use them to speed things up.

(+1)

Oh, so the creep has a prebaked set of spread states and not generated at runtime in that shape. I see.

Yes, it's prebaked here, but realtime generation is somewhat similar. You can use a shader with a stencil buffer to form the shape of the creep, which will be filled across the ground plane behind it. In this case, the build map will be filled with the shape of this stencil layer instead of textures. It takes some time to create and set up, so we don't use this technique within jam time limits.