Coding From Scratch! #010 - Procedural City Builder

preview_player
Показать описание
In this stream we coded a simple procedural city building tool (or the foundations at least - pun intended, I'm not ashamed...). The user can draw regions of the city, and roads and buildings will be automatically generated to fill the space. We walk through the whole thought process and programming required. So jump in, and follow along!

Bonus! A 30 minute tangent where I help somebody debug their college project =P...


Рекомендации по теме
Комментарии
Автор

Great stuff!

I don´t know if its tackled in the second episode (haven´t watched yet), but for concave polygons to fix the normals pointing in the wrong direction I checked each line pair for intersections and if there is one, the second nromal is pointing in the wrong direction so it just gets flipped. The code for that is longer than calculating everything, but it works.
Regarding the overhangs on the buildings, I first classified the buildings as only lots (because suually buildings are not standing face to face) and then I also only used the BuildingWidth for calculating the number and then devide the space evenly between all lots. That way the lots are slightly bigger but you don´t have a constantly switching overhang.

Nova
Автор

Let us know if you have suggestions for future episodes!

straybasilisk