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

Lot generation #21

Closed
Uriopass opened this issue Aug 6, 2020 · 6 comments
Closed

Lot generation #21

Uriopass opened this issue Aug 6, 2020 · 6 comments
Projects
Milestone

Comments

@Uriopass
Copy link
Owner

Uriopass commented Aug 6, 2020

Making buildings is cool, but where do we put them ?

There are many approaches to partition space for construction terrain.

  1. Partition like Cities:Skylines, where the side of the roads are cut into rectangular pieces which are then used by predefined homes that occupies a certain amount of rectangles.
    image

  2. Partition the way buildings are made in Paris, where faces from the road graph are detected and extruded to form little quads or triangles which represents the buildings. No pathway needed since they are all directly on the road.

image
image

  1. Just place houses randomly and check if they don't intersect anything, which is the current approach but is not very satisfying.

  2. A mix of 1 and 2
    1 for suburbs and 2 for city center

5?) ??
I probably want to go with option 1 for Egregoria 0.2 since I got a reference (Cities Skylines) and the region where buildings are placed are rectangular which is easier to manage for buildin+pathway generation than an arbitrary convex polygon

To check out: some discussions on zoning
https://forum.paradoxplaza.com/forum/threads/my-proposal-for-a-better-zoning-system-less-gaps-bigger-plot-sizes-intuitive-usage.883848/

@skairunner
Copy link
Contributor

Going with #1 with an eye towards making it less artificial sounds like the right choice here.

@Uriopass
Copy link
Owner Author

Uriopass commented Aug 6, 2020

What do you mean less artificial ? Find a way to make the zones less rectangular ? My guess is since this is just for zoning, you end up not seeing it on the map since buildings inside those rectangles can have any shape.
Here's a screenshot from C:S, notice how you can't see the grid:

suburbs

I do agree I think I'll go with n°1

@skairunner
Copy link
Contributor

skairunner commented Aug 6, 2020 via email

@Uriopass
Copy link
Owner Author

Uriopass commented Aug 6, 2020

From the thread:

This system is completely viable, and could work just fine code-wise (I have spent approximately 200 hours reading through the source and modding for C:S). The lot-generation is likewise pretty trivial, as there are lots of real life papers and information on how to generate them (My major in college was Land Surveying and Civil Engineering).

I wish they'd left a link to those amazing papers !
EDIT: found this in the meantime which I'll have to read some day.

I point my finger at Cities XL where you could just choose from a variety of plazas and fill spots in dire need of beautification.

I think I have to get a look at Cities XL too

Transport Fever doesn't use predefined grids, but uses an algorithm to offset an imaginary grid parallel to the road, meaning that when you select a lot the outline has the same bend as the road. That allows for more space efficiency and a general better look.

And transport fever, which I actually have but didn't get to play it yet

I also need to change my vocabulary:

Parcel: Zone between roads
Lot: Zone where a building/house can be placed

@Uriopass Uriopass changed the title Partition free space into terrain Lot generation Aug 6, 2020
@Uriopass
Copy link
Owner Author

Quick update;
Looked at Cities XL and the zoning is entirely manual, you chose from differently sized lots and just place them.
They also have an advanced algorithms for filling parcels with roads and zones which looks pretty cool but is super out of scope.

Looked at transport fever, which has a "place city" town as it's a game focused on transportation and not on city management. However I couldn't see anything related to zoning, they just have a cool city generator I guess.

In the end, I think I'll go the C:S route and plop some rectangles with some funky heuristics.

@Uriopass Uriopass added this to the 0.2 milestone Aug 11, 2020
@Uriopass
Copy link
Owner Author

Looks good to me with the map of Paris:
image

And with some curved roads:
image

@Uriopass Uriopass moved this from To do to Done in Scale 0.2 May 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Scale 0.2
  
Done
Development

No branches or pull requests

2 participants