top of page


M@IL is a driving game about delivering mail in a procedurally generated town and upgrading your mail truck. I worked with one other programmer on this for the final project of a game programming class.

For this game, I programmed the procedural town generation system and 3D modeled all the assets.

Town Proc Gen

To procedurally generate the town, I decided to go with a tile-based system. The town exists on a 10x10 grid, with the 3 tiles in each corner shaved off to make the map more rounded.

The first thing the generation system does is place roads, with between 2 and 4 roads being placed both vertically and horizontally. The only rule for road placement is that two roads going in the same direction can not be adjacent to each other.

From there, any tiles adjacent to a road tile are marked as potential building tiles. 8 of these tiles are then randomly selected as delivery locations, which are unique buildings. The remaining building tiles either become houses or fields, and all other tiles just become fields. If fewer than 8 building tiles exist (which occasionally happened with earlier, smaller versions of the map), generation is restarted.


When placing the tile prefabs, tile adjacency is checked to properly pick and rotate road tiles. Building tiles are also rotated so that they face an adjacent road.


Sample Map

R - Road Tile

B - Potential Building Tile

Empty Green Tiles - Fields


Fully generated map seen from above

Art Assets and Miscellaneous


All the tiles used by the generation system


A last second addition I made was making trees and snowmen get launched when you drive into them, which turned out to be pretty fun

bottom of page