Loading maps

posted in Indienamic
Published October 06, 2017 Imported
Advertisement

For a long time we could have done without loading map as we used a Random Map Generator (RMG). Random Map Generation is awesome because you don’t need to worry about any dynamics from that part and can easily test some basic mechanics. For reproducibility and to actually build a game (you want to play on fun maps right? ? ) I needed something to load up into the game.

 

For now we pass a parameter to the game called map:<filename> which loads up the <filename> . If you don’t provide a parameter the Random Map Generator is used. And if you want you can now influence that also a bit via rmg:map=<width>x<height>;human=<starting credits human player>;cpu=<starting credits cpu player>

 

To do this we used the an AbstractFactory pattern and we had to extract some logic from our PlayingState class. More on that in the in-depth video (for Patrons only).

 

Demo

Do you like it? Any suggestions? Let me know!

 


View the full article

1 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement
Advertisement