Game Development Community

Well-defined map edges

by Drew Hitchcock · in RTS Starter Kit · 03/03/2006 (12:23 am) · 1 replies

This is more of a "tips and tricks" type post than a real "resource," but I don't feel that this technique is 100% obvious, so I thought I would post it anyway.

It has always felt kind of sloppy to me that the only thing that designates the edge of a map in the RTS kit is that (with added resources) the camera can be made to stop when it leaves the mission area. To me this feels arbitrary -- it doesn't seem like there's any reason for the camera to stop at that particular place.

One solution to this is to create a 256x256 100% black texture, put it in your data/terrains directory, and simply paint a large black border around the edge of your mission-area in the terrain editor. This at least creates a well-defined edge to the map, which makes it clear that the player can't scroll beyond that region.

It looks like this:
static.flickr.com/49/107109084_92f92f4cd1.jpg
It's not perfect, but it works.