Area System[]
Overview[]
All areas except for towns will be dynamically generated. This reduces level design requirements and provides more game play. Areas will be generated by a world seed and an area seed, so the same area can be generated within the same game.
Definitions[]
- Areas are composed of 'Area Tiles'
- Each Area Tile is a 20x20 grid of normal tiles
- A normal tile is 32x32 pixels
- Each Area Tile will belong to a theme, such as forest, desert, etc.
- AT - sometimes used to abbreviate Area Tile
Area Tile Details[]
As mentioned in definitions, all Area Tiles are 20x20 regular tiles, or 640x640 pixels. Each Area Tile will have a theme so semi-coherent levels can be generated.
All possible exits will be represented by the tiles:
Dead Ends:
Two Ways:
Three Ways:
Four Ways:
Area Generation[]
- Choose starting piece from dead ends
- Set size to 0
- Choose a 2/3/4 way AT
- Attempt to attach current AT to previous AT in this order: NESW
- If attachment failed, return to Choose AT step
- Verify that all exits from the new AT are valid or empty
- if not, return to Choose AT step
- Increase size by one
- Chance to quit = (Size - 7) * 15
- If random number < Chance, then quit
- Else return to Choose AT step
Return to Main | World Overview