Feature Proposals/Minimap

From Unvanquished
Jump to: navigation, search

This idea was initially proposed by Gireen on the forums.

Design decisions

  • How much information should the minimap display? There's much that we could display:
    • Positions of teammates. This presents a balance issue: normally, the Humans are only aware of one another's presence with the helmet equipped. One solution is to display only those positions of teammates that appear on the player's helmet radar.
    • Markers. A number of visual markers could be placed on the minimap:
      • Vsays could correspond to markers being placed on the map. Other games have successfully employed similar (see America's Army).
      • Labels placed by the map maker could be helpful to players in much the same way as the current location feature.
    • Vertical position of teammates. Display an up arrow if the player's teammate is above the player, a down arrow if the teammate is below, and a dot if the player is on the same level or same position vertically (see below).
    • Positions of enemies. Again, there is a balance issue with this. Which enemies do we display? The following options are available:
      • Display enemies visible by teammates. Would likely require frustum culling/raytracing to determine line-of-sight. Probably costly and expensive to send over the network.
      • Display enemies visible by teammates' radars.
      • Display enemies visible by teammates' radars who are within some range of the player. I.e., the player could not see enemies visible on a teammate's radar if they are across the map.
  • How do we stylize the minimap visually? There are a number of options:
    • As an accurate rendering of the map. In other words, precisely how the player would see the map if they were to fly above it and look directly down. The question remains in this case if we should omit certain details such as particle effects (e.g., leaky pipes or other effects) on the map.
    • As a representative map. I.e., stylized to appear as if the minimap were only a depiction of the actual map. There are many styles available here, such as line art or flat-shaded, simplified geometry.

Problem set

  • What do we consider above or below the player? If the vertical position of the player's teammates relative to them is displayed, do we consider raw vertical position in 3d space or divide the map into separate levels? If the map is to be divided into levels, how do we accomplish this? Should this be done manually by the mapper or procedurally? If it is done procedurally, under what conditions do we distinguish between levels?
  • How do we generate minimaps? There are a number of options:
    • Mappers author minimap imagery themselves. Mappers would do so by whatever means they please; e.g., flying above their map and taking a screenshot. This would be tedious, and in some cases, PVS may interfere with the process (i.e., flying above the map and having part of it not display because it is culled by PVS).
    • Imagery is automatically generated. There are two options for this:
      • Render images as a part of the map build process. It may be possible to export map geometry and lamp placement to a format readable by Blender, then run Blender in non-interactive mode using a custom script to load said geometry (preferably using an existing importer), do any remaining work (such as placing a camera and lamps), and render an image.
      • Render images at load-time. We have the ability to capture the framebuffer and save it to a screenshot file, so it should be fairly straight-forward to calculate a perspective or orthographic camera projection matrix above the map and either render to an off-screen buffer directly (which may require an OpenGL extension) or take the hackish approach of rendering a single frame then using the existing framebuffer-copying operations (however that works) to save the framebuffer to a buffer that is then used as a texture. This should require no effort on the part of the mappers; no associated metadata would be necessary.

    Regardless of how we author imagery, we must then figure out how to map image data to the game's world space. Imagery generated by mappers by hand would be particularly difficult to map to game space if the extents of the game world do not match the bounds of the map; e.g., if there is some empty space off to the side of the map and the mapper's image does not have a matching empty region, the mapping would not be 1:1.