Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Populate levels randomly #17

Open
akien-mga opened this issue Aug 2, 2015 · 2 comments
Open

Populate levels randomly #17

akien-mga opened this issue Aug 2, 2015 · 2 comments

Comments

@akien-mga
Copy link
Owner

I'll have to check again how it was done in Bomberman, but my initial idea would be to let the user define the level height and width, and then create it automatically by:

  • Filling all edge tiles with indestructible tiles
  • Filling all (2m, 2n) tiles with indestructible tiles, with m,n integers
  • Define exclusion zones around the player starting points (four corners)
  • Populate the rest with:
    • Crates (high probability)
    • Bushes (low probability)
    • Nothing (low probability)

For future levels where there might be characteristic interactive elements, those could also be referenced with relative position (center tiles, 20% of the level width to the left and right, etc.) to be placed and generate exclusion zones.

Another approach would be to intervert steps 3 and 4, and just clean the exclusion zones afterwards.

@akien-mga akien-mga added this to the 0.2 milestone Aug 2, 2015
@bojidar-bg
Copy link

BTW, in bombermine they have some 10x10 (or some other size, who knows...) pre-made presets, and then they just use them to make the level. 💣

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
@akien-mga @bojidar-bg and others