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

Dungeon generation!! #14

Open
aelmosalamy opened this issue Dec 1, 2018 · 0 comments
Open

Dungeon generation!! #14

aelmosalamy opened this issue Dec 1, 2018 · 0 comments

Comments

@aelmosalamy
Copy link
Owner

ASCII Combat currently needs a "generate_dungeon" function, I will be adding a new attribute to all rooms called "gen" and basically this attribute is an array with 2 elements, the first element is the "generation method" it can be a specific number (This room can be found n times in the dungeon), it can be a percentage (This room have n/100 rarity to be found in a dungeon), or maybe it can be a room which unique (only once) or a room which have a special interaction (this can give chance to introduce new room ideas: Arena, Puzzle Room, etc.. I got some plans in mind ...

Anyway, generate_dungeon pseudo code

  • Loop through all room types in the ROOMS dict and use the gen attribute to calculate how many instances of this room should be in the array available_rooms array
  • Move rooms from the available_rooms array to the dungeon_rooms array while connecting them by automatically setting the NORTH, SOUTH, EAST, WEST, UP, DOWN for each room, Keep adding rooms until there is nothing in available_rooms

This is the next step after implementing combat!

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

No branches or pull requests

1 participant