i’ve just started working on a city building game like Cities Skylines, but i have no idea how i can make the road system.
I wanted to have cars following traffic rules like Cities Skylines and pedestrians walking on sidewalks, but i have no idea how i can make a road system for this.
Splines probably just won’t work, because you cant branch with them to create junctions. So i was thinking of a different idea:
What i thought of was making a new empty actor, and placing down vertices with edges between them. But how can you make vertices and edges in an actor?
With this idea you could have simple math determine what type of road there should be at a vertex.
1 edge connection to vertex: end of road / dead end.
2 edge connections to vertex: a point / node in a road.
3 edge connections to vertex: a T junction (3 road junction).
4 edge connections to vertex: a + junction (4 road junction).
Is using vertices and edges a good way of making roads?
And if so, how do you create vertices and edges inside of an actor?
Or should i be using a completely different approach?
But really i want to know how to make this myself and i want to know how something like Cities Skylines’ traffic works. I don’t really have the money for a plugin.
I’ve been trying to figure this out myself. Going to read through that pdf you linked. I am having some success with Splines. If you wanna see what I’ve got, I have a YouTube Channel. Once I figure it all out, I’m planning to make a tutorial series. https://www.youtube.com/channel/UCZT…-7wlzRiL69Mdzg
This is a massive question to ask, and to expect an answer that can be contained within a forum post is unrealistic. A system like this would be incredibly complex, try doing some googling. You’ll find that there are youtube playlist tutorials that supposedly teach you how to do something like this (I say supposedly because I haven’t taken the time to watch them).
Here’s one that I found after 5 seconds of research.
Again, what is asked here is an incredible undertaking - and you can expect to either need to pay for a plugin that does it for you already, or spend many, many hours building it yourself.
I understand that’s a complex subject, that’s why we look into forums. I’ve been searching for a week and couldn’t find a single consistent tutorial or video about complex road generation in runtime.
And anything new with this post ? Maybe you have found some direction in which you can point next person that one to learn a little more about roads system ?