Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

Loading maps

Sign in to follow this  
Stefan Hendriks


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).



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


View the full article

Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!