<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.fightorder.net/wiki/index.php?action=history&amp;feed=atom&amp;title=AI%3ADevelopment%3ATheMaps</id>
	<title>AI:Development:TheMaps - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.fightorder.net/wiki/index.php?action=history&amp;feed=atom&amp;title=AI%3ADevelopment%3ATheMaps"/>
	<link rel="alternate" type="text/html" href="https://www.fightorder.net/wiki/index.php?title=AI:Development:TheMaps&amp;action=history"/>
	<updated>2026-04-21T05:47:08Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://www.fightorder.net/wiki/index.php?title=AI:Development:TheMaps&amp;diff=1582&amp;oldid=prev</id>
		<title>Qrow: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://www.fightorder.net/wiki/index.php?title=AI:Development:TheMaps&amp;diff=1582&amp;oldid=prev"/>
		<updated>2026-02-24T06:08:39Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 23:08, 23 February 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Qrow</name></author>
	</entry>
	<entry>
		<id>https://www.fightorder.net/wiki/index.php?title=AI:Development:TheMaps&amp;diff=1581&amp;oldid=prev</id>
		<title>interaidev&gt;Paulomorfeo at 21:59, 22 October 2014</title>
		<link rel="alternate" type="text/html" href="https://www.fightorder.net/wiki/index.php?title=AI:Development:TheMaps&amp;diff=1581&amp;oldid=prev"/>
		<updated>2014-10-22T21:59:37Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[AI:Development|AI Development]] &amp;lt; AI Development - The maps&lt;br /&gt;
&lt;br /&gt;
=The maps provided by the AI Interface=&lt;br /&gt;
The SpringRTS engine has a 3 Dimensional game area (x; y; z) but it works by mapping the dimensions X and Z (the ones we see when looking from above) into several bi-demensional &amp;quot;maps&amp;quot;, each representing a different game mechanic. This page describes how the Interface exposes those maps to the AI.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Maps available ==&lt;br /&gt;
The game area is broken down into (at least) these maps:&lt;br /&gt;
* HeightMap - map of terrain heights.&lt;br /&gt;
* SlopeMap - TODO&lt;br /&gt;
* CornersHeightMap - TODO (complicated...)&lt;br /&gt;
* LosMap - map of where in the game area you have visibility (Line of Sight).&lt;br /&gt;
* RadarMap - map of where in the game area you have radar coverage.&lt;br /&gt;
* JammerMap - map of where in the game area you have radar-jamming coverage.&lt;br /&gt;
* ResourceMapRaw - map of where in the game area there is metal and/or other resources.&lt;br /&gt;
Additionally, there&amp;#039;s the game area which is where the units will exist, but is not &amp;quot;mapped&amp;quot; - units will be at position (x; y; z) in the game area but no map for it exists.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Interface exposure ==&lt;br /&gt;
Each of the maps is bi-demensional (x; z), representing the dimensions &amp;quot;x&amp;quot; and &amp;quot;z&amp;quot; of the game area (x; y; z). However, the Interface exposes each map as a &amp;#039;&amp;#039;&amp;#039;list&amp;#039;&amp;#039;&amp;#039; of values.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;List&amp;lt;float&amp;gt; heightMap = _Callback.getMap().getHeightMap();&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
This list will contain each row (dimension X) sequentially (Z0, Z1, Z2, ...). Therefore, each position &amp;lt;code&amp;gt;(x;z)&amp;lt;/code&amp;gt; of each map will exist in the list at the index &amp;lt;code&amp;gt;(x + z * {map&amp;#039;s width})&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Granularities ==&lt;br /&gt;
The game areas are large battlefields and the engine does not map them unit by unit. Instead it breaks down the game area in blocks - &amp;quot;granularity&amp;quot; (http://en.wikipedia.org/wiki/Granularity) - creating maps much smaller than the game area. Additionally, each map has a different granularity and, thus, a different size.&lt;br /&gt;
&lt;br /&gt;
The map HeightMap should be considered the main map and the sizes of all other maps (as described in the documentation) are relative to the size of that map.&lt;br /&gt;
&lt;br /&gt;
* HeightMap - main map (ex: 256x256)&lt;br /&gt;
* Game area - the game area will be the HeightMap * 8 (ex: 2048x2048)&lt;br /&gt;
* SlopeMap - 1/2 the size of the HeightMap (ex: 128x128)&lt;br /&gt;
* CornersHeightMap - TODO (complicated...)&lt;br /&gt;
* LosMap - size is variable per mod: see below&lt;br /&gt;
* RadarMap - 1/8 the size of the HeightMap (ex: 32x32)&lt;br /&gt;
* JammerMap - 1/8 the size of the HeightMap (ex: 32x32)&lt;br /&gt;
* ResourceMapRaw - 1/2 the size of the HeightMap (ex: 128x128)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== LosMap ==&lt;br /&gt;
The map of Line-of-sight has a granularity that is specified per game (&amp;quot;mod&amp;quot;). Each &amp;quot;mod&amp;quot; will specify the property LosMipLevel:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;int losMipLevel = _Callback.getMod().getLosMipLevel();&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
Raising 2 to the &amp;quot;power&amp;quot; of LosMipLevel will give the relation of the size of LosMap to the HeightMap.&amp;lt;br&amp;gt;&lt;br /&gt;
Ex:&amp;lt;br&amp;gt;&lt;br /&gt;
# LosMipLevel=0 | 2^0 = &amp;#039;&amp;#039;&amp;#039;1&amp;#039;&amp;#039;&amp;#039; | Size of the LosMap = size of HeightMap * 1/&amp;#039;&amp;#039;&amp;#039;1&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
# LosMipLevel=1 | 2^1 = &amp;#039;&amp;#039;&amp;#039;2&amp;#039;&amp;#039;&amp;#039; | Size of the LosMap = size of HeightMap * 1/&amp;#039;&amp;#039;&amp;#039;2&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
# LosMipLevel=2 | 2^2 = &amp;#039;&amp;#039;&amp;#039;4&amp;#039;&amp;#039;&amp;#039; | Size of the LosMap = size of HeightMap * 1/&amp;#039;&amp;#039;&amp;#039;4&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://springrts.com/phpbb/viewtopic.php?f=15&amp;amp;t=32674&lt;br /&gt;
&lt;br /&gt;
[[Category: AI Dev]]&lt;/div&gt;</summary>
		<author><name>interaidev&gt;Paulomorfeo</name></author>
	</entry>
</feed>