Game Development Reference
In-Depth Information
Using offscreen rendering for a minimap
There are generally two ways of creating minimaps. One way is to let an artist draw a rep-
resentation of the map, as shown in the following screenshot. This usually ends up beauti-
fully as it gives considerable freedom to the artist when it comes to style. The method is not
that viable during development when scenes might be changing a lot, or for games with
procedural content where the end result is not known beforehand.
Minimap with unit marker
In those cases, taking a snapshot of the actual scene can be very helpful. The resulting im-
age can then be run through various filters (or shaders during rendering) to get a less raw
look.
In this recipe, we'll achieve this by creating a new ViewPort port, and FrameBuffer to
store a snapshot of a camera. Finally, we'll create NiftyImage out of it and display it as a
GUI element.
Search WWH ::




Custom Search