Skip to content

add mapgen #46

Closed
wants to merge 1 commit into from

2 participants

@MadrMan
MadrMan commented Jan 5, 2013

Added the possiblity of generating maps to spring.

When a MapSeed is added to script.txt, the generator creates an archive in memory using the name given in MapName.

I've added a CVirtualArchive class which is an archive that can be created and manipulated during runtime (unlike the existing ones which require files to be on disk)

CMapGenerator contains all the base code for map generation, such as creating the actual archive and putting the smf, smt, and mapinfo.lua in.

CSImpleMapGenerator is a simple example generation class (to be improved upon) which generates a flat landscape and places spawnpoints.

In the future, a lua-based map generator could be added for example, so map scripts could be used instead of actual maps, which are much smaller and would add a ton of variety.

@abma
Spring RTS member
abma commented Jan 6, 2013

merged: 974e5b4

@abma abma closed this Jan 6, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.