MapView

From BZFlagWiki
Jump to: navigation, search
Picture Frame.png This page contains the design document for an enhancement or feature. It is a work of collaborative development, and may not represent the final design. If you are not part of the development or design group, please post comments and suggestions on the talk page and not in the middle of the design.


Overview[edit]

Map view is an idea to provide more information to players in the HUD to help with dodging shots. It is a cleaner design then what has previously been called "full screen radar"

Problem[edit]

Given BZFlag's dependence on 2d game-play, it has become increasingly common for some players to use larger and larger radar views in order to get more visual information about the top down view of shots. This information is useful in lining up long shots and for getting out of the way of incoming shots. In order to maintain a clean UI the size of the radar and chat panel in the game limited so that they do not "Crowd out" the 3d view and minimize it's importance. There are gaps in the useful size of the radar, 20 to 30% is useful when the 3d view is needed, full screen is useful when aligning up shots, but sizes like 80 and 90% are rarely useful since they fall in-between the 2 useful cases. On some smaller screens there may not be enough visual information in the limited radar screen for a person's preference. Also in many cases a large radar is only useful when it is made transparent, as a solid background will block the 3d view.


There is a need for a new way to display radar like information for the identification of shot trajectory, while still maintaining a clean UI and not minimizing the importance of the 3d view.

New Map Mode[edit]

MapView is a new radar mode that will change how the map data is drawn. When MapView is enabled (from key events) the normal radar panel border will not be drawn and the radar data will be drawn as an overlay on the 3d view. This will allow the use of the full screen for radar-like data but allow the 3d view to show. The user will be able to configure an opacity for the map view background that will default to 0% (invisible) to 25%(smokey). There is no point in going to higher capacities as they would block out the 3d view an make it useless. A new BZDB variable will provide an offset for the center of the map view to the center of the screen in the vertical axis. This will allow the user to configure the map view so it does not interfere with other elements.

This arrangement also lets the chat bar extend across the entire screen instead of being tied to the size of the radar panel. Optionally the user can configure the chatbar to be hidden if they do not want it.

Implementation[edit]

Keys[edit]

There should be 3 key events, MapViewOn, MapViewOff, and MapViewToggle. The default key bindings should bind only to MapViewToggle, the other 2 modes are to be used by people that want to bind them to key-up and down events to provide a "momentary" button to show the map view instead of a toggle.

Drawing[edit]

MapView should use the majority of the normal radar drawing modes, except for showing the "fancy tank" at the origin. Drawing will also enforce a transparent background on the map and not use any of the radar opacity settings. It should also have 2 major modes that control the rotation of the map drawn, one for fixed Y+ as "up" and one that makes the tanks' current direction as "up". These settings should be bzdb vars and are not expected to change during game-play. A separate "mapZoom" should also be used to set the scale of the map view independent of the normal radar view.

Sample Image[edit]

MockUPMapview.png

This is a mock-up of what the idea should look like. It shows the map not getting in the way of the 3d view.