### Use marching squares for tile rendering.

Posted:

**Sun Jul 23, 2017 9:01 pm**This is a solution to some of the problems presented in FFF-199.

The gist of marching squares is that instead of drawing a Land tile and a Water tile, instead you draw the tiles in between Land and Water. In a 2D game, every tile is visually placed between 4 terrain-grid-squares (the current tiles).

Oddly enough, it seems the current tile system is just a complex version of marching squares, where each tile relies on itself and 8 neighbors (see Moore neighborhood), instead of 4 neighbors (see Unaligned rectangular neighborhood).

Here's a gif:

\

Here's a working demo: factorio-tiles

Here's a reddit post: Here's how water and grass *should* interact. Just click and drag.

The gist of marching squares is that instead of drawing a Land tile and a Water tile, instead you draw the tiles in between Land and Water. In a 2D game, every tile is visually placed between 4 terrain-grid-squares (the current tiles).

*You can implement this without making many new visual assets*. The current tiles are perfect.Oddly enough, it seems the current tile system is just a complex version of marching squares, where each tile relies on itself and 8 neighbors (see Moore neighborhood), instead of 4 neighbors (see Unaligned rectangular neighborhood).

Here's a gif:

\

Here's a working demo: factorio-tiles

Here's a reddit post: Here's how water and grass *should* interact. Just click and drag.