YeOldeDM / fief

Grand Feudal Strategy with a simple game play approach
MIT License
2 stars 0 forks source link

SYSTEM: World Generation #2

Open YeOldeDM opened 7 years ago

YeOldeDM commented 7 years ago

Initial Parameters:
*WORLD_EXTENTS*(Rect2?) LAND_MASS(float) FIEF_COUNT(int) FIEF_BUFFER(int) TOWN_DENSITY(float) TOWN_LIMITS**[min,max] *TOWN_BUFFER(int)

1) Place FIEF_COUNT Fief Centers within WORLD_EXTENTS. Ensure each Center is beyond FIEF BUFFER distance to all other Fief Centers.
2) Grow land around Fief Centers until (TotalTiles) * LAND_MASS are filled. Designate borders between Fiefs when two teams' tiles clash.
3) Generate (FiefTileCount) * TOWN_DENSITY (clamped by TOWN_LIMITS) town positions within each Fief. Ensure each Town is TOWN_BUFFER distance from any other Town.
4) Fill any empty tiles within WORLD_EXTENTS with Water.

YeOldeDM commented 7 years ago

Param *SEED(int)
Seed generation for worlds might as well be a thing :game_die: :rabbit:

YeOldeDM commented 7 years ago

Member Tiles(Dict): A dictionary holding tile position/fief ownership pairs. Tiles which are water (unowned) belong to team -1.

Some helper functions would be good for grepping tiles..

func get_tile(pos): func check_border(pos):