• entries
9
2
• views
754

881 views

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!

There are no comments to display.

## Create an account

Register a new account