Art of Roads in Games

2026-02-0821:05611207sandboxspirit.com

How games implement roads

Roads Cover

Not sure if it’s just me, but I often get a primal satisfaction whenever I see intricate patterns emerging out of seemingly disordered environments.

Think about the galleries of ant colonies, the absurdly perfect hexagons of honeycombs, or the veins on a leaf. No architect, no blueprint. Just simple rules stacking on each other that result in beautiful patterns. I can’t explain why, but seeing those structures always felt good.

Humans do this too. And for me, one of the most fascinating patterns we’ve come up with is the roads.

Sometimes I imagine aliens from faraway galaxies discovering Earth long after we’re gone. Forests reclaimed by nature, cities reduced to rubble, yet between them, a faintly pattern is still visible - the road network. I like to think they will feel the same way I do when looking at nature patterns. - “Man, someone really thought this through.”

I’ve got to say, roads have fascinated me since I was a kid.

I still remember playing SimCity 2000 for the first time when I was about five or six years old. I didn’t understand much. Definitely didn’t know what zoning, taxes, or demand were. But roads fascinated me from the start.

I think roads lie at the heart of every city builder. It’s the fabric on which cities are built. Since that moment, I’ve played almost every modern-themed city builder out there. In the meantime, I’ve also started noticing them in the real world. Examining them in more detail.

Roundabouts. Interchanges. Overpasses. Merge lanes. Noticing every intricacy.

Despite every game bringing an improvement over the one before, something always felt… off.

SimCity 4 added elevation and diagonal roads. SimCity 2013 introduced curved roads. Then came Cities: Skylines with a ton of freedom. You could know freeplace roads and merge them into intersections at any angle, build flyovers at different elevations to construct crazy, yet unrealistic, interchanges. I think this was the largest breakthrough.

But something was still nagging me. Highway ramps were unrealistically sharp or wobbly, lanes that were supposed to be high-speed bent too sharply at certain points, and the corner radii of intersections looked strange.

CS2

I mean look at this. This is probably what highway engineers have nightmares about.

And then came the mods. Mods changed everything. The great community enabled a new kind of freedom. One could build almost anything: perfect merge lanes, realistic markings, and smooth transitions. It was a total game-changer. I am particularly proud of this 5-lane turbo roundabout:

Alt

But even then, mods didn’t feel completely natural. They were still limited by the game’s original system.

Cities: Skylines 2 pushed it even further, with lanes becoming even more realistic and markings as well. I think at this point, a non-trained eye won’t know the difference from reality.

Then I stopped stumbling around and started asking why? I tried to understand how engineers design roads and how game developers code them.

That’s when I ran straight into the fundamental issue - right at the base of it. And it comes to something every developer knows about and loves:

The Bezier Spline

If you’re a Unity or Unreal developer or played with basically any vector graphics editing software, you already know them well. Bezier curves are an elegant, intuitive, and incredibly powerful way to smoothly interpolate between two points while taking into consideration some direction of movement (the tangent).

That’s exactly what roads are supposed to do, right? Of course, developers naturally think they are the perfect tool.

They’ve got their beauty, I need to admit. But hidden beneath the surface lies an uncomfortable truth.

When Bezier Splines fall short

You see, the shapes of roads in real life come from an underlying essential fact: the wheel axles of a vehicle. No matter how you drive a car, the distance between the left and right wheels remains constant. You can notice this in tyre tracks in snow or sand. Two perfectly parallel paths, always the same distance apart maintaining a consistent curved shape.

Cars don’t follow abstract splines. They ride some imaginary tracks.

Here’s the issue with Bezier splines: they don’t preserve shape and curvature when offset.

At gentle curves, they kinda look fine, but once you have tighter bends, the math falls apart. In mathy terms: The offset of a Bezier curve is not a Bezier curve.

When game engines try to generate a road mesh along a Bezier spline, the geometry often fails at tight angles. The inner edge curves at a different rate than the outer edge. This creates “pinching,” self-intersecting geometry.

Here is the best example of how they start to fail in extreme scenarios.

CS2

To sum up: Bézier curves are unconstrained. The freedom they enable is exactly the “Achilles’ heel”. Real roads are engineered with the constraints of real motion in mind. A car’s path can’t magically self-intersect.

Kindergarten math

Ok, so what preserves parallelism? If you’ve already been through kindergarten, you’re already familiar with it: It’s the CIRCLE.

It has almost like a magical property: no matter how much you offset it, the result is still a circular arc. Perfectly parallel with the initial one. So satisfying.

Bezier vs Circle

Scrapping Bezier curves for Circle Arcs also yields a nice, unexpected bonus. To procedurally build intersections, the engine has to perform many curve-curve intersection operations multiple times per frame. The intersection between two Bezier curves is notoriously complex. On one side, you have polynomial root finding, iterative numerical methods, de Castelaju’s method + bounding boxes, and multiple convergence checks vs a simple, plain O(1) formula in Circle Arcs.

By stitching together circular arcs of different radii, you can create any shape while adhering to proper engineering principles.

The Next Level

But this is not the end of the story. Circle arcs have issues as well (Oh no). The problem with circles in infrastructure is that they have constant curvature. What this means is that when entering a circular curve from a straight line, the lateral force jumps from 0 to a fixed constant value (determined by the radius of the circle). If you were in a car or train entering at high speed into this kind of curve, it would feel terrible.

Civil engineers have to account for this as well. So then, what curve maintains parallelism when offset and has a smoothly increasing curvature?

Introduce you to: transition curves - most famously, the clothoid.

A clothoid gradually increases curvature over distance. You start almost straight, then slowly turn tighter and tighter. The steering wheel rotates smoothly. The forces ramp up naturally, and a passenger’s body barely notices the transition.

These curves provide comfortable rides at high speeds by maintaining parallel offsets and continuous curvature changes.

And they are also… a math nightmare. Differential geometry. Integrals. Oh my… Which is probably why most games don’t even dare.

But that’s fine.

Vehicles move slowly on city streets. For intersections of urban roads, circular arcs are more than a decent choice.

Does everything I just rambled about matter? Do 99% of city-builder players care what shape the corner radius of the intersection has? Most likely, no. Then why bother?

First, because of curiosity. As any other nerd overly obsessed with the nitty-gritty details of a very specific subject, I just wanted to see how I would implement it. Like challenging the status quo.

Second, even if established titles might not accurately render roads, they are still light-years ahead of what solutions an indie developer can find online. The tutorials and assets for this are just sad. I personally got bored with grids, and I just wanted to built a better solution to share with anyone who wants to build a city builder.

Sad assets

These assets ^ make me sad.

In the next blog post, I’ll discuss more technicalities and dive into how I’ve built my own solution. If you want to follow along or get notified when I release this asset, scribble your email below.


Read the original article

Comments

  • By rob74 2026-02-098:265 reply

    > I think roads lie at the heart of every city builder. It’s the fabric on which cities are built.

    To paraphrase the article, this is what urban planners have nightmares about. Roads (as in: things made for cars) aren't the fabric of a city, streets (as in: things made not only for cars, but also for pedestrians, cyclists, public transport etc.) are. See also: https://en.wikipedia.org/wiki/Stroad

    • By kqr 2026-02-098:498 reply

      I had never considered there is a difference between the two words, but Wikipedia backs it up:

      > The word street is still sometimes used informally as a synonym for road, but city residents and urban planners draw a significant modern distinction: a road's main function is transportation, while streets facilitate public interaction.

      Even with this clarification, though, I think you unfairly characterise the quote from the article. Modern society has an insane demand for transportation. Roads – the medium on which we transport things – are the fabric on which cities are built. Not just inside the cities, but the vast network of roads outside the city, that feed it.

      Before the 1900s, we weren't able to build cities far from water because of their demand for transportation. We can today, and it is only because of roads we are able to do that.

      • By spacedcowboy 2026-02-099:482 reply

        I think American society is very much road-focussed, having lived there for a couple of decades. I think UK (and European in general) society is very much street-focussed.

        A lot of that comes down to geography - the UK is a high-density population compared to the USA but the impact on our lives is significant. In the US, I would drive everywhere. Literally everywhere - to the shops, to the library, to the beach, everywhere. Yesterday I took my son to his archery practice, we walked along the coast road for about 20 minutes, and picked up a "Mr Whippy" 99er ice-cream (yes, even in the cold weather) along the walk back. It was pleasant, and healthier.

        • By direwolf20 2026-02-0912:041 reply

          USA cities are low density because they are road–focused

          • By retired 2026-02-0912:262 reply

            The United States emerged during a period of abundant frontier land, which normalized the idea that ordinary people could own large, independent plots. This contrasted sharply with Europe’s older, land-constrained settlement patterns. That early culture of space and ownership later interacted with industrialization, the automobile, and government policy to produce the low-density development that characterizes much of the U.S. today.

            • By dayjaby 2026-02-0918:06

              Another interesting fact about plot sizes in Europe: You can see within an area which kind of inheritance law was in place: If farming plots are large, usually the oldest son inherited everything. If they are small, they were evenly distributed.

              Source: https://www.sciencedirect.com/science/article/pii/S026483772...

            • By gwbas1c 2026-02-0914:473 reply

              When you go into the Northeast, a lot of narrower roads were planned for slow-moving horse-drawn carts.

              • By rzwitserloot 2026-02-0915:24

                The vast, _vast_ majority of such infrastructure was turn down in the 60s to make way for the almighty automobile.

                The number of places in the north american continent that retain their street focused infrastructure is pretty much countable on one hand, and most of that is being terribly managed.

              • By exhumet 2026-02-0915:471 reply

                Exactly go Worcester, Providence and Boston and be in awe at how fucking horrendous the maze is.

                • By bakies 2026-02-0916:25

                  Boston is only horrendous in a car. Walking around and taking public transit in Boston is very nice. OTOH Providence feels like it's designed for cars, much easier to drive there but always need the car around and their highways and roads are terrible. There's a ton of highway to split the city. Worcester is less highway constricted but still definitely need a car to get around and I still can't figure my way around.

              • By hollerith 2026-02-0914:521 reply

                Horse-drawn carts are not any narrower than cars are, and many place (e.g., the Marina District of San Francisco) designed in the horse era have very wide streets.

                • By gwbas1c 2026-02-0918:01

                  Pretty much any car that's bigger than a subcompact is wider than a horse drawn cart.

        • By NoboruWataya 2026-02-0917:44

          This may be true, but I think the points made in the comment you are responding to are nevertheless true for UK and European cities as well. Roads have been a fundamental part of the development of modern towns and cities throughout the Western world.

      • By troupo 2026-02-0912:01

        > Modern society has an insane demand for transportation. Roads – the medium on which we transport things – are the fabric on which cities are built. Not just inside the cities, but the vast network of roads outside the city, that feed it.

        This is a very American point of view IMO.

        Cities are built on streets first and foremost. Otherwise you end up with strip malls separated by endless swaths of car parks.

        As for transportation, we have to separate cargo from people, and inner city from inter-city.

        For people inside the city you have multi-modal transport options. Walking, biking, busses, trams, subways, commuter trains, taxis, individual cars, ferries.

        For intercity people you have trains, planes, boats, busses, individual cars.

        Most inner city cargo can be handled by smaller trucks going from warehouses to specific places in the city. And for smaller cargo like mail I've even seen small scooters and cargo bikes.

        For inter-city you once again have multi-modal transport (depending on the city). Trucks, rail, cargo planes, boats.

        Even the US was built on railways, not on roads. Roads are the "backbone of cities" only if you make them one, as the US has done

      • By rob74 2026-02-099:07

        Yeah, maybe I'm overly pedantic, but the author is also overly pedantic about the curvatures of streets/roads in games, so... :)

        But, to continue with the pedantry: the Romans already built cities far from (navigable) water. There have been roads since antiquity, then since the mid 19th century it was first the railways that made it easy to transport passengers and goods over large distances. The current version of roads being the main/only form of transportation only came about in the 1950s.

      • By bluGill 2026-02-0914:17

        Slight correction: It was the 1830s when the railroad arrived that we started to be able to build cities far from navigable water. (navigable is important - if your water can only support small boats your city will be smaller than if it can support large ships). Trucks in the 1900s allow the same thing, and have enough advantages that we would use them for smaller cities, but large cities are still going to get rail transportation. And water transport is still powerful enough that the largest cities still likely need it even though it isn't a strict requirement.

      • By fastasucan 2026-02-0910:013 reply

        >Modern society has an insane demand for transportation. Roads – the medium on which we transport things

        Why do you say it like roads are the only option? Its even far from the most effective option. You mean rails?

        • By red-iron-pine 2026-02-0917:551 reply

          rail-roads

          is in the name mon ami

          • By spacechild1 2026-02-0920:191 reply

            Not in other languages. In German, for example, it would very weird to think of railroads (Bahn/Eisenbahn/Bahnstrecke) as roads (Straßen). Would you also claim that a hedgehog is a pig?

            • By BobaFloutist 2026-02-0922:121 reply

              But autobahn is a road, no?

              • By spacechild1 2026-02-100:41

                Yes, but "Bahn" actually means "track", "path" or "lane". "Bahn" in the sense of "railroad" is an abbreviation of "Eisenbahn" (literal translation: "iron tracks"). So "Autobahn" has nothing to do with railroad, it just means "car track".

        • By retired 2026-02-0914:131 reply

          Railroads are roads.

      • By trinari 2026-02-099:061 reply

        I hope the water comes to the city through a pipe and not with trucks on roads.

        • By fenykep 2026-02-099:451 reply

          I believe they have referred to the transportation possibilities the water allows rather than the possibility to transport water (which was possible at scale way earlier)

          • By direwolf20 2026-02-0912:05

            We finally have water–powered cars?

      • By S3verin 2026-02-0916:021 reply

        Roads are important for a good transportation infrastructure. However, cities in north america are overreliant on them. In European cities public transit is also important and in my opinion even more important than roads. Cars are not useful in cities compared to public transit / bikes / walking if the city is designed for humans and not cars. ( and yes, you still need roads for delivery and people who sometimes have to transport heavy things).

        • By bluGill 2026-02-0918:27

          There is a lot more than people to move around a city. Transit is more visible and yes europe does well there - but freight is less visible and europe isn't doing as well there.

      • By cogman10 2026-02-0918:49

        > Before the 1900s, we weren't able to build cities far from water because of their demand for transportation.

        Incorrect.

        In the 1800s the train took off as a primary form of transportation. By 1869, we'd completed the first intercontinental railway in the US which ultimately opened up the economy between the east and west.

        Sears flourished as a company because of the train.

        It wasn't roads which ultimately opened up mass transport, it was rail. It wasn't until the 1950s that rail was ultimately de-prioritized and roads were prioritized.

    • By wongarsu 2026-02-0910:42

      The same insights still hold true for streets and paths. Of course a single human or even bicycle can move with fewer constraints than a car, but a stream of humans won't. When we design pedestrian infrastructure with sharp corners people either cut through on the inside, creating desire paths on unpaved surface, or the inside section that lies on the paved path but outside the circle-section-path becomes a low-traffic zone, a place where people sit down or put up food carts or whatever

      In remembering that cities are not roads alone, but also streets, paths and tracks, there is a lot of potential for this approach to building all of them

    • By Ef996 2026-02-099:152 reply

      Yep, good point. I am myself a huge fan of livable oriented infrastructure (bike lanes, pedestrian paths, public transportation) but the hard truth is that roads were initially designed for carriages and later for cars. A though I recurrently have is how would a city designed from scratch by a civilization that uses only bikes and walking look like?

      • By vladms 2026-02-099:281 reply

        Why should you use only bikes and walking? Cars/trucks have a role to play, it's just not the most efficient to move the majority of the people from one point to another. Simple examples: ambulances, firefighters, police, cranes.

        • By Ef996 2026-02-099:42

          True. I mostly meant not personal vehicles, so jut buses, trams etc. I supposed emergency services will use those dedicated lanes. or maybe civilization is so advanced those will be served via flying only. Idk just since fiction thinking.

      • By phatskat 2026-02-1116:16

        Roads as in? I recall hearing once (with no current source nor desire to research) that most city streets were originally at least _used_ with pedestrians in mind. Whether they were created for carriages or not, the advent of the automobile really messed up a lot of how people primarily used streets

    • By BrtByte 2026-02-0912:041 reply

      Urban planners lose sleep over stroads for very good reasons but from a simulation and tooling perspective, streets still need a shared geometric backbone

      • By laci37 2026-02-0914:40

        I don't think that much is shared between streets and roads. Roads need all the details about curvature in the article so car traffic flows efficiently. Compare that to the beautiful but narrow streets of a Mediterranean town. Buildings are rarely parallel, angles are odd, but everything is on a human scale, and it just feels good to walk around.

    • By flomo 2026-02-099:05

      I will just say the Streets of San Francisco were almost all built by civil engineering principles, even those from the 19th century. If you want some sim SF or NYC, this guy is on the right track by not having fakey roads.

  • By acherion 2026-02-095:102 reply

    The author might get a kick out of an upcoming game called Junxions, which is a sandbox game to just do that... create road junctions.

    The subreddit is here: https://www.reddit.com/r/Junxions/

    Sure they teased that they've made their own solution, but I think Junxions should scratch the itch of most of us here interested in this kind of game.

    • By Ef996 2026-02-098:013 reply

      Hello, I am the creator of this road system. The thing is that I myself don't even know what I want to do with it. lol. Maybe an asset or a game (a bit scared to jump in a full fledge game to be honest).

      I am a fun of Junxions my self which follow closely. But the approach in my system if very different. Junxions creator uses the same kind of node base/bezier shapes paradigm where intersections happen as node graphs and not automatically as collisions between road segments. It's hard to explain but I am planning to dive into more details on why those two approaches are different in my next blog deep dive.

      • By Lichtso 2026-02-0910:173 reply

        > The thing is that I myself don't even know what I want to do with it.

        Embrace the next challenge: Instead of roads on parabolic (Euclidean) geometry, have roads on elliptic (non-Euclidean) geometry, like the surface of a sphere. Plus, on a sphere every line is already a circular arc anyway (no matter if straight or bent, the difference is just the center, radius and normals). Thus, this system of circular arc segments really lends itself to such a space.

        Little prince style micro planets with their own miniature infrastructure will always have a special place in my heart. Half a year ago I started with laying out the basics https://github.com/Lichtso/bevy_ellipsoid_billboard https://github.com/Lichtso/bevy_geodesic_grid but got distracted by fixing some engine bugs in Bevy along the way. That reminds me I have to update to the newest engine version ...

        anyway you can find some of the roads on spheres stuff here: https://github.com/Lichtso/bevy_geodesic_grid/blob/main/src/... it can not only generate the extrusion mesh but also calculate how the mesh overlaps with a geodesic grid of triangular tiles on the surface.

        • By JamesTRexx 2026-02-0917:43

          Go full science fiction and enable vertical or even upside-down roads for a 3D experience. :-)

          Imagine an environment where ground/walls/ceilings always have gravity and one can build literal city mazes in horizontal and vertical directions. All that traffic going everywhere, oh my..

        • By Ef996 2026-02-0910:421 reply

          Thanks for references! I initially considered bevy for this but I was a bit scared it was not mature enough. How do you find it now?

          • By Lichtso 2026-02-0916:33

            Really depends: In some areas it is quite advanced (rendering) and in others it is lacking / underdeveloped (editors / tooling). But there is an incredible amount of progress and also churn in keeping up with that.

            https://thisweekinbevy.com/ https://bevy.org/news/

        • By murkt 2026-02-0916:04

          Sounds pretty fun! Do you have any screenshots to show?

      • By phatskat 2026-02-1116:19

        Honestly if you made your system a plugin or mod for Cities, I’d consider reinstalling it. I got in early and realized that my patience for city building had waned since the days of SimCity 2000, and I’ve not seen roads in CS that ever looked appealing to me. Watching ridealong streams of sharp turns or cars moving in a way that would make my kidneys hug the sidewall of my abdomen really hurt the experience for me.

        So if you’re ever feeling alone about noticing, you aren’t.

      • By ImHereToVote 2026-02-108:151 reply

        Are you using SDFs for your road system?

        • By Ef996 2026-02-1012:19

          Nope. But I mean aren't functions of circles essentially some kind of SDFs in 2d? Or at least those of disks.

    • By BrtByte 2026-02-0912:09

      If someone just wants to zen out building perfect merges, Junxions looks great. If someone wants to fight Bezier math demons at 2am because offset curves keep exploding… this article probably hits closer to home

  • By abcde666777 2026-02-094:065 reply

    There's so many things in games that are taken for granted at play time but which actually take a lot of thinking and work to get right. Roads for instance aren't something which your typical player will look too closely at... but they will notice if they look or behave in a way that seems wrong.

    I've been playing Kingdom Come 2 of late, and I find it's natural to just kind of take the world they've created for granted - just like we do the real world. But when you actually stop and look you have to consider that every one of the finely crafted details was built by someone's sweat and tears, be it artists, programmers, or designers at edit time.

    No wonder it's an industry of crunch, the work involved can be uniquely daunting.

    • By shalmanese 2026-02-094:291 reply

      Another area of hidden complexity is doors in video games. Almost no game has life sized doors because they introduce gameplay issues, almost all doors in video games are at least 30% bigger than in real life and you see an overabundance of sliding doors vs swinging doors because of the complexity swinging doors bring to video game physics.

      https://lizengland.com/blog/the-door-problem/

      https://www.ign.com/articles/putting-doors-in-video-games-is...

      • By bestham 2026-02-096:422 reply

        This was also confirmed by a Valve developer recently about a bug in HL2:

        https://mastodon.gamedev.place/@TomF/115589925206309168

        • By account42 2026-02-099:00

          Also in their VR titles Valve made all doors swing in both directions because that feels more natural to players when there is no haptic feedback from not being able to push open a door.

          The scale difference mentioned in gp isn't just doors though but any structure you can pass through. Many games houses with larger interiors than exteriors and video game ventilation ducts are comically large.

        • By yoricm 2026-02-098:10

          That's an impressive bug hunt. Same code, different behavior. I can't imagine how much time the guy spent on finding this one. And how much satisfaction once he finally nailed it.

    • By LanceH 2026-02-0916:06

      > There's so many things in games that are taken for granted at play time but which actually take a lot of thinking and work to get right.

      I have a small list of these things in game dev. Over the years, I found some games that were more playable (in my opinion) than I thought they deserved to be. Kind of like a well written book with a bad story.

      For me at least, the number one most important thing is how well the character -- person, car, spaceship, whatever -- moves. Does it handle well, as expected. I'm at the point where I think this may be the single most important aspect of a game that finds itself in a competitive space.

      I think blizzard stands out for this with Overwatch and World of Warcraft. They avoid the jerky start and stops with their characters. Their characters feel both performant and natural at the same time, adhering to reality but breaking physics as necessary (air strafing for example).

      Building out roads correctly feels like an offshoot of this for games which include cars. A car should be able to navigate a turn without going through weird contortions as it hits pinch points, or unnatural wiggles when roads join.

    • By asimovDev 2026-02-0912:30

      I absolutely love how Skyrim's world is built. A lot of details that would fly past most players' attention are quite thought through. How roads connect, where do rivers intersect, where do lakes get their water from, in which direction do they flow etc.

    • By amatecha 2026-02-0920:52

      Ah yeah, this is actually part of why I never complete games.. I spend so much time messing around looking at all the cool little details, exploring the environment and generally "experiencing the place" moreso that pursuing game mechanics or completing levels/quests/etc. ... some of my favorite games, I've played probably like 1/4 of lol

    • By BrtByte 2026-02-0912:13

      Yep, the most impressive work in games is the stuff players never consciously think about

HackerNews