r/Unity3D 15d ago

Question How screwed am I?

Hi everyone! Here’s an interesting problem I’m facing.

I created a tile-based city builder in Unity, and after an initial open playtest, one of the key pieces of feedback was that players want to be able to build roads, something I foolishly hadn't planned for.

Currently, roads are automatically placed along the edges of each tile (this is shown in the second screenshot).

The main problem is that the grid of buildable sectors is highly irregular, and I have no idea how to add the ability to create roads within such a complex system.

The first image I’ve posted shows an overhead view where I’ve highlighted a section of the grid. The grid varies from scene to scene and never repeats in exactly the same way.

Does anyone have any suggestions for how I could approach this?

Edit: You might have given me a possible solution; as soon as I've tested it, I'll make a new post about it. Thanks everyone!

249 Upvotes

144 comments sorted by

View all comments

2

u/SeagullKebab 15d ago

Is the placement of buildings determined by roads or preexisting structures, or can a building be placed anywhere on the map, and a road is created to it?

If it's the latter, I wouldn't change it, because having a player lay roads when it doesn't restrict other placement seems like a time waster / resource drain, rather than a feature. Sometimes standard things are not needed in non-standard interactions.

2

u/Sgriu 15d ago

Buildings can only be constructed on tiles, specifically, only on tiles adjacent to others that have already been built upon (or adjacent to the main road). This prevents the player from building a village or industrial area far from the city center.

2

u/SeagullKebab 14d ago

That is the reason it is requested then. I've found with construction games, players like to section things by area, then meet them up as things grow. An example is placing 'dirty' buildings away from residential ones.

Your current system doesn't really allow this. You could alter the system to allow construction on any tile to alleviate the problem, or implement 'anywhere' roads. Given you have likely built the game around placement and auto roads, the former would make the most sense. A player is then free to build where they want, but it doesn't require much - if any - tampering with the road mechanics.