MinimapLook beta
Interface of @v12-engine/client
export interface MinimapLookThe game's say over the minimap (GameView.hud.minimap), and what it changes of it while the game runs (client.hud.setMinimap)
Members
allyColors
allyColors?: boolean | {
own?: string;
ally?: string;
enemy?: string;
};The dots by side instead of by player: the player's own, their allies', their enemies' (as the classic RTS button has it: green, yellow, red), or in the colours the game gives. By player when left out. A dot the game colours (entity) keeps its colour
dotsEvery
dotsEvery?: number;Seconds between two drawings of the entities' dots: 0.1 (ten a second, as the genre's minimaps go) when left out, 0 for every frame. The view and the pings are drawn as they move whatever this says
draw
draw?: (context: CanvasRenderingContext2D, toMap: (x: number, z: number) => {
x: number;
y: number;
}, client: GameClientApi) => void;Draws something of the game's own, over the fog and the dots: a lane, a zone, an objective. toMap puts a point of the world on the map's canvas, in its pixels
entity
entity?: (entity: EntityView) => MinimapDot | undefined;How each entity in view shows, decided as the dots are drawn (dotsEvery): a flag carrier, an objective that blinks
layers
layers?: readonly MinimapLayer[];Layers of the game's own, drawn in order, each in its place among the minimap's (MinimapLayer)
resolution
resolution?: number;Pixels of the picture of the ground for each cell of it: more is a sharper minimap, 1 is a pixel a cell. When left out, enough for a picture of about 512 pixels a side (8 on a map of 48 cells, 1 on one of 512)
size
size?: number;The minimap's width and height, in the HUD's pixels (of 1600 by 900): 212 when left out. What sits beside it (HudPlaces.minimapWidth) moves with it, unless the game placed that itself
smooth
smooth?: boolean;Whether the picture is smoothed as it is scaled onto the minimap. Yes when left out; no for a look of pixels
terrain
terrain?: boolean;Whether the picture of the ground is drawn under the dots: yes when left out; no for the dots on a dark field
whole
whole?: boolean;The whole map, with what is beyond its bounds of play darkened and a line round them; only the bounds (GameMap.bounds) when left out, filling the minimap: the land past them is scenery, never played on