• Advertisement
  • entries
  • comments
  • views

A Terrain Minimap with SlimDX and DirectX 11

Sign in to follow this  



Minimaps are a common feature of many different types of games, especially those in which the game world is larger than the area the player can see on screen at once. Generally, a minimap allows the player to keep track of where they are in the larger game world, and in many games, particularly strategy and simulation games where the view camera is not tied to any specific player character, allow the player to move their viewing location more quickly than by using the direct camera controls. Often, a minimap will also provide a high-level view of unit movement, building locations, fog-of-war and other game specific information.

Today, we will look at implementing a minimap that will show us a birds-eye view of the our Terrain class. We'll also superimpose the frustum for our main rendering camera over the terrain, so that we can easily see how much of the terrain is in view. We'll also support moving our viewpoint by clicking on the minimap. All of this functionality will be wrapped up into a class, so that we can render multiple minimaps, and place them wherever we like within our application window.

As always, the full code for this example can be downloaded from GitHub, at https://github.com/ericrrichards/dx11.git. The relevant project is the Minimap project. The implementation of this minimap code was largely inspired by Chapter 11 of Carl Granberg's Programming an RTS Game with Direct3D, particularly the camera frustum drawing code. If you can find a copy (it appears to be out of print, and copies are going for outrageous prices on Amazon...), I would highly recommend grabbing it.


Read more "

Sign in to follow this  


Recommended Comments

Great tutorial Eric!  If you'd like some more exposure, we'd love if you also submitted it as an article -- but no pressure of course! smile.png


My only reservation about submitting this as an article would be that it depends quite a bit on my custom framework.  I don't know how well it would stand alone.

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement