Mapgen: Difference between revisions

From Spring
Jump to navigationJump to search
Abma (talk | contribs)
No edit summary
Abma (talk | contribs)
No edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
spring 92.0 will contain a simple map generator. To test it, spring has to be started with a script.txt which contains two lines:
Spring 92.0 will contain a simple map generator. To test it, spring has to be started with a script.txt which contains the line:


<code><pre>
<code><pre>
MapName=gen-123;
[GAME]
MapSeed=123;
MapSeed=123;
</pre></code>
</pre></code>


where MapSeed is a random number and MapName a string for the mapname. The map have to not exist. Currently it only can generate a Greenfield like map.
Where 123 can be replaced with any number to generate another map.
MapName should not be present in script.txt


The generated map will be fairly generic map, aimed at TA-like mods.
It currently takes into account the amount of players and the allies.
Future work will add lua bindings, allowing maps to be generated from lua.
This way, mods could supply their own map generator.


for details see:
for details see:
https://github.com/spring/spring/commit/974e5b42c5bcde30a704218448aa288764642d55
* {{Sourcelinkhash|974e5b42c5bcde30a704218448aa288764642d55}}
* https://github.com/MadrMan/spring/commits/mapgen


[[Category: Development]]
[[Category: Development]]

Latest revision as of 03:21, 23 August 2013

Spring 92.0 will contain a simple map generator. To test it, spring has to be started with a script.txt which contains the line:

[GAME]
MapSeed=123;

Where 123 can be replaced with any number to generate another map. MapName should not be present in script.txt

The generated map will be fairly generic map, aimed at TA-like mods. It currently takes into account the amount of players and the allies.

Future work will add lua bindings, allowing maps to be generated from lua. This way, mods could supply their own map generator.

for details see: