Well, Doc Brown might not have needed roads where he was going, but apparently, we do.
And we're going to need to figure out how to make them work properly!
As HAND IN HAND continues to grow, I've been spending more time working on one of the most important parts of any city builder.
Traffic.
When you think about what makes a city feel alive, it's not just the buildings or how many people live there.
It's the movement.
Cars driving through neighbourhoods, trucks moving around industrial areas, and eventually buses and trains carrying people across the city.
Without that movement, even a large city can feel pretty lifeless.
The trouble is, getting traffic to behave properly is turning out to be quite an adventure.
The World's Most Unnecessary Traffic Jam
One of the screenshots from my latest testing session shows something pretty entertaining.
An entire line of vehicles backed up along a perfectly ordinary two-lane road.
There's no obvious reason for it.
No complicated highway interchange. No massive intersection. Nothing particularly unusual about the road at all.
Just a whole bunch of cars apparently deciding they're not going anywhere today.
Congratulations. I've invented traffic jams without even needing traffic.
Clearly, there's still some work to do.
The early traffic system has been good enough to get vehicles moving around the city, but as the population grows, some strange behaviour is starting to appear.
Vehicles can get backed up, block one another, and occasionally create situations where nobody seems able to move.
And since traffic is such an important part of making the city feel alive, I want to get this right.
Keeping the Roads Simple
From the beginning, I've wanted HAND IN HAND to be a city builder that's relatively easy to understand and play with friends.
That's why I decided early on to have electricity and water distributed through the road network instead of requiring players to build separate networks of power lines and underground pipes.
Roads connect everything.
Buildings need road access to receive utilities, and the roads also connect those properties to the outside highway network.
So naturally, the road system is becoming one of the most important pieces of the entire game.
But I don't necessarily want to turn road construction into an overly complicated system.
For now, I'm sticking with a straightforward two-lane road, with one lane travelling in each direction.
No elaborate collection of road types or complicated construction tools.
Just roads that players can place, connect, and use to build their towns.
The complexity, at least for now, is mostly happening behind the scenes.
Teaching Traffic Where to Go
The first challenge is getting vehicles to behave like vehicles.
They need to know which direction they're travelling.
They need to stay on the proper side of the road.
And they need to figure out how to get from one location to another.
That last part is becoming particularly interesting.
Routing.
If a vehicle wants to travel across town, how does it decide which roads to take?
What happens when intersections connect several different streets?
And how do we prevent vehicles from getting stuck behind one another?
These are the sorts of things I'm working through right now.
The current system generates traffic based on residential development.
Each residential building produces a certain amount of vehicle traffic per game day, depending on its development level.
Since one game day currently takes 10 seconds of real time, the number of vehicles can increase fairly quickly as a town develops.
A small Level 1 residential building contributes less traffic than a larger, more developed property.
That gives the city a way to become busier as the population grows.
But now I need to work out how to balance all of that movement so the roads don't simply fill up with cars that refuse to go anywhere.
A Few More Vehicles
I've also started expanding the types of vehicles appearing around the city.
We've got a few different passenger cars, along with some work vans and trucks.
But I want the vehicles to do more than just drive around looking busy.
One of the more interesting things I'm working on is a fire truck.
Remember when I introduced fire stations and decided to keep the original system fairly simple, using a coverage radius instead of actual emergency responses?
Well, I'm starting to revisit that idea.
The fire response system I'm working on would allow buildings to catch fire.
If a burning building is within the coverage area of a fire station, a fire truck can leave the station, follow the roads to the building, and put out the fire when it arrives.
Then the truck returns to the station.
But if the truck doesn't arrive in time, the building could burn down or the fire might spread to a neighbouring property.
That's the basic idea I'm experimenting with.
It adds another reason for road networks to function properly, because now traffic isn't just about making the city look alive.
It could actually affect whether an emergency vehicle reaches its destination.
And considering the traffic jam I've just managed to create, that might be a problem!
Buses, Trains, and Getting People Moving
Another thing I've started thinking about is public transportation.
Right now, most of the traffic comes from residential development.
But what if players could reduce some of that traffic by providing other ways for people to get around?
I'm working on the idea of introducing buses.
Players would build bus stations, and buses would travel between them.
The surrounding areas would receive a traffic-reduction benefit based on access to that service.
That gives players another way to manage congestion without making the road-building system itself more complicated.
I'd also like to introduce trains eventually.
Passenger trains could help reduce road traffic, while freight trains could play a role in moving goods around the region.
There's plenty to figure out before any of that is ready.
For now, the priority is making sure the cars we already have can actually drive around the city without bringing everything to a standstill.
One problem at a time.
And Finally... Bridges!
There's another road-related problem I've been working on that goes all the way back to one of my earliest experiments.
Bridges.
If you remember my first attempts, the road didn't exactly cross the river.
It followed the terrain right down into the water, across the riverbed, and back up the other side.
The cars didn't seem to mind, but it wasn't exactly what I'd call a successful bridge.
Well, I'm happy to report that we finally have bridges that actually cross the water!
I've put together a simple bridge model in Blender and added some new logic to the road-building system.
Now, if you start a road on land, extend it across a body of water, and finish it on land again, the game can recognize the crossing and use the bridge model instead of following the terrain underwater.
And it works!
Mostly.
There's still a rather amusing visual problem with the bridge model.
Depending on which direction you build it, one side looks like a solid bridge structure, while the other has open supports and pillars.
So the bridge doesn't look quite the same from both sides.
Not exactly ideal, but at least we're no longer sending traffic along the bottom of the river.
I'll need to revisit the model and get that cleaned up.
Leaving Room for Boats
While working on the bridges, I've also been thinking about something else I'd eventually like to add.
Boat traffic.
Ferries could transport people between different parts of the region, while cargo ships could provide another way to move goods.
That means I need to think ahead a little.
If we're eventually going to have ships travelling along the waterways, the bridges need enough clearance underneath them.
There's no point building a perfectly good bridge now if a future cargo ship can't fit under it.
So that's another consideration as I continue working on the bridge system.
It's funny how one feature can start creating requirements for several others before you've even built them.
Getting There, One Road at a Time
The road and traffic systems are still very much works in progress.
There are traffic jams to figure out, routing to improve, new vehicle types to experiment with, and bridges that could use a little more attention.
But the cities are starting to feel more alive.
There's movement on the streets, traffic building up as neighbourhoods grow, and roads finally connecting developed areas across rivers.
Even with the occasional ridiculous traffic jam, it's encouraging to see all these systems coming together.
Now I just need to figure out why an entire street full of cars has decided to stop moving.
Where we're going... we definitely need roads.
And preferably roads that actually work.