Hello everyone,
I’m working on a game project in PlayCanvas, and I’m developing a procedural city generation system.
Here is the link to the game demo: CamaGame - PLAYCANVAS
I would like to know if any of you have any code examples, solutions or resources for creating a city with dynamically generated buildings and roads.
If you have already worked on this type of project or if you have any ideas to share, I would really appreciate it! Thank you in advance for your help
Hi @Amir_AFKIR and welcome!
The pages below may be useful for you.
Hi Albertos,
Thank you very much for your feedback, I will analyze these tracks from now on.
I wish you a great day!
1 Like
Hello,
I am having significant difficulties with generating buildings. Currently I’m using MVT data from Mapbox to create buildings via vertical extrusion. However, this approach results in visual artifacts on the side face textures, and it limits the possibility of reproducing more complex shapes like the Eiffel Tower or the pyramids. Additionally, artifacts often appear when buildings straddle two pieces of land.
My initial idea was to generate each building as they appear on Mapbox maps, then classify the building types (houses, buildings, town halls, businesses, etc.) to apply specific textures to them. But it seems that this strategy will not be enough to obtain the expected result.
I’m currently thinking about an approach based on an asset kit, like the “City Kit (Suburban)”, positioning each house according to Mapbox coordinates. That said, we would still have to adjust each asset to match the dimensions indicated in the Mapbox data, which worries me a little. The problem is that a simple scale will not be enough, because it will also abnormally change the size of doors and windows. We must therefore find a suitable strategy.
Before I get started, I’d like to know if any of you have tried a similar approach and if you have any advice to share.
Wishing you a pleasant day.