Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#5061 closed enhancement (fixed)

Random map CityPainter

Reported by: elexis Owned by: elexis
Priority: Nice to Have Milestone: Alpha 23
Component: Maps Keywords:
Cc: Patch:

Description (last modified by elexis)

It should be possible for random maps to fill a given Area with entities of given templates resembling a city.

The difference to createObjectGroups is that the space is used up as much as possible.

https://trac.wildfiregames.com/raw-attachment/ticket/5061/citypainter.jpg

https://trac.wildfiregames.com/raw-attachment/ticket/5061/citypainter2.jpg

https://trac.wildfiregames.com/raw-attachment/ticket/5061/screenshot1821.jpg

Attachments (3)

citypainter.jpg (817.0 KB ) - added by elexis 6 years ago.
citypainter2.jpg (861.9 KB ) - added by elexis 6 years ago.
screenshot1821.jpg (895.4 KB ) - added by elexis 6 years ago.

Change History (10)

by elexis, 6 years ago

Attachment: citypainter.jpg added

comment:1 by elexis, 6 years ago

Description: modified (diff)

by elexis, 6 years ago

Attachment: citypainter2.jpg added

comment:2 by elexis, 6 years ago

Description: modified (diff)

Danubius and Fortress are imagineable use cases of existing maps, see Phab:D1286, Jebel Barkal even more, see #5040.

The frequency of the buildings can be computed using roulette wheel selection: https://en.wikipedia.org/wiki/Fitness_proportionate_selection

comment:3 by elexis, 6 years ago

Milestone: BacklogAlpha 23
Owner: set to elexis

A simple frequency-based approach doesn't work at all, since the larger the obstruction, the less area is available for placement, so the chances of picking the right tiles is too low. It's much easier to use tileclasses to ensure minimum distances between buildings and fill the remains with houses.

by elexis, 6 years ago

Attachment: screenshot1821.jpg added

comment:4 by elexis, 6 years ago

Description: modified (diff)

comment:5 by elexis, 6 years ago

In 21472:

Refactor distributePointsOnCircle into distributePointsOnCircularSegment, refs #5061.

comment:6 by elexis, 6 years ago

Resolution: fixed
Status: newclosed

In 21485:

CityPainter for random map scripts that fills the given area randomly with the given templates, fixes #5061, refs #5040.

comment:7 by elexis, 6 years ago

In 21488:

Jebel Barkal random map, fixes #5040.

Features:

  • a mountain created in atlas, refs #4816
  • a procedurally generated city, refs #5061
  • scripted city guards and reoccuring gaia attackers
  • attacker composition depend on the remaining buildings of the city
  • random irrigation canals that indirectly increase the distance between the two teams

Needs map description and player feedback to become complete.
Hill based on the Napata Reconstruction hill created by Skhorn of rP21364.
Consulting By: Sundiata, Skhorn

Note: See TracTickets for help on using tickets.