If you don't do that then large parts of the game world end up seeming like ice rinks with roads painted on them.
You can see it in one of his examples where the bézier curve has an inflexion point which crosses over itself on a sharp bend. I ran into this while writing Azoth [1] last year, when wanting to be able to overlay paths with blending into the background at the sides, and curving around existing features on a game map. To solve the problem, I simplified it, and there's an (animated) example of how I got it working here [2]
[1] https://github.com/ThrudTheBarbarian/Azoth
[2] https://github.com/ThrudTheBarbarian/Azoth/blob/main/Documen...
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
Emphasis mine - that's not really true
- Cars have differentials, so the wheel speed can differ between wheels
- Steering geometry isn't parallel! The tyres turn a different amount when you turn the wheel
- Unless you're going in a straight line, cars don't go where the tyres point! Tyres 'pull' the car towards their slip angle
What you will actually see in tracks in snow or sand is non-parallel tracks, describing curves of different radii. You can also see this in racetracks, where the path more closely resembles the limits of car physics without care for passenger comfort or tyre wear. The example 'fail' image looks not dissimilar from a hairpin turn.
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.
Real cities were all built in the past, for older vehicles, which moved at different speeds, and were controlled by drivers with different goals from today’s drivers.
So, if your game has bad and unsafe road designs, which have been partly retrofitted to reduce the worst problems, then that is accurate.
A game with optimal roads is not an accurate simulation of reality.
A professional modern road designer will simulate the expected movement of vehicles through a new or redesigned road, to try to discover major problems.
They look for problems with turning radius, visibility, stopping distances, and interactions with other road users.
I believe that a game designer could offer to do the same.
The game could draw a good algorithmic road shape first. But next offer the player an option to run a simulation of individual traffic movements, to discover serious issues, and let the player know about problems.
To the OP, I suggest this simulation approach, not trying to discover flawless algorithms. That’s not how it happens in the real world.
Several comments have suggested similar issues.
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.
Author please keep writing.
Finally, I am part of the 1%!
>A clothoid gradually increases curvature over distance.
This seems complete overkill? I remember smoothing between tangents of two circles to mostly solve roundabouts. I had to cheat for 3+ lane roundabouts but it worked for any semi-realistic road.
>Just simple rules stacking on each other that result in beautiful patterns. I can’t explain why, but seeing those structures always felt good.
I think in 2026 it's safe to blame your autism. I do. Nobody likes Factorio because it's a good game. We're here for the lines and grids.
Related: https://www.pushing-pixels.org/2014/04/04/the-craft-of-scree... (The craft of screen graphics and movie user interfaces - interview with Jorge Almeida...)
Of course the Romans didn't give a shit who's property rights they might be violating. I live in Lincolnshire UK, where Roman roads are still used. The last one that got changed was years ago when they had to put a kink in Ermine Street (now the A15) at RAF Scampton when they extended the runway to accommodate Vulcan bombers.
The cities I find the most interesting (for roads) are the ones which kept gridding out in new directions to follow the course of a river. Cities like Buenos Aires, New Orleans, and Saigon, where the original paths followed curves around the river bends, resulting in multiple intersecting grids.
The intersections and division boulevards between grids are, of course, the most beautiful and architecturally interesting parts of any city. They are where the blocks are strangely shaped and the buildings can't be rectangular, and usually where every inch of land is at a premium as well. It would be nice if a city-builder could simulate that aspect of urban growth: The shift from village center to grid, and old grid to new grid.
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
Some manager at Google should have gotten an appraisal for removing proper curves from Maps, because... who cares, they do not need them on US streets.
I've been trying to make this as easy as possible for non technical people to draw terrain in craftmygame (the game engine I'm building) here's what the terrain painting looks like in the editor so far : https://youtu.be/bFrUYM2t3ZA?si=tw1LqBWR7Uyn08lR&t=37
https://github.com/chrisdiana/TinyCity/blob/6c3a7337788655b5...
HN, keep being HN! We love you.
> 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.
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.
https://www.reddit.com/r/Skookum/comments/47sbri/richard_fey...
For now all I have to share is this explainer I made some years ago: https://xixixao.github.io/euler-spiral-explanation/
Road and rail curves are massive and it’s hard to understand just how big they are without having to actually walking them.
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.
Wonder if cubic parabola (used by some railways, and visually near indistinguishable from clothoid) has easier maths.
https://lizengland.com/blog/the-door-problem/
https://www.ign.com/articles/putting-doors-in-video-games-is...
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.
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.
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
Very nice article - good read !
To me, yes, then again I may end up with a basement full of model trains when I'm old.
Still annoys me to no end when the game model builds something unrealistic and would be an absolute traffic nightmare in the real world.
Bad/quick visual: https://pasteboard.co/5QgDdTVVSm1I.png
I live near the border with Germany, and these guys are used to short ramps and so just merge well below the speed other traffic are going, expecting others to yield. (And many locals also drive like that unfortunately.) So uncivilized.
These things are absolutely huge pieces of infrastructure that can take the space of dozens to hundreds of buildings.
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.
Why do you say it like roads are the only option? Its even far from the most effective option. You mean rails?
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.
This way, all drivers can already sort themselves onto the matching lanes without even having seen the signs yet.
The standardized Autobahnkreuz also has always identical ways to change directions, where the left lane leaving the highway is made for change in opposite direction or for turnarounds. So if you took the wrong exit, you can always save yourself by just driving that lane 3 times across the bridge.
If the traffic increases over time, usually the right exit lanes are doubled and that fixes the problem.
Rarely though there's different setups like around the A61 and A67 where the traffic around and towards Frankfurt city / airport is too huge for that system.
> Do 99% of city-builder players care what shape the corner radius of the intersection has? Most likely, no.
Maybe not... but out of all the players who care corner radius of roads in games, 99% of them probably are into city-builder!
One of the biggest problems with North American cities is their endless, car-centric suburban sprawl. SimCity games may be really fun to play but they seem to reinforce this problem and anyone who grows up playing them will not learn about alternatives for more livable cities.
New Urbanism, traditional neighbourhood design, streetcar suburbs, one-way streets, bike paths, walking paths, mixed-zone walkable villages (light commercial with residential), smaller single-family houses and duplexes, triplexes, houses behind houses. Many of these are older and more traditional techniques to yield higher density neighbourhoods without building up to large apartment buildings.
It would be really cool to see a game that focused more on creating these kinds of realistic and aspirational living spaces instead of the usual cookie-cutter suburbs linked up by huge roads and a large downtown core.
So the difference in scale between real life and the sims is 100% on purpose, as more realism makes the game worse. Just like they don't ask for a long permitting system for anything to get built, or demand a decade of discussion and probable lawsuits before you can move move a road, or rebuild an intersection.
They are visually very close because their curvature increseases approximately linearly along the curve but not exactly. Mathematically speaking if you wirte the cubic parabola as something like y = kx^3, the second derivative (which give the curvature) grows linearly with x which makes it behave similary in gentle transitions.
The problem is that the second derivative is not enough alone for having a true smooth curvature. The real curvature formula has in the denominator the first derivative as well (slope) making it not increase perfectly linearly along the curve. (denominator becomes larger and larger as x incrases)
But yeah, cubic parabola is basaically a good enough approximation. Might be a good solution for a system like this.
Sure, you have to have some facility with math to use clothoids, but I think the only other curve that will actually be simpler is circular arcs.
Beware if you post article's in there.
I also do graphic processing and now with ML, contact me if you ever want to share though, contact via my profile
January 29, 2026
7 min read

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.

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:

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:
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.
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.

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.
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.

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.
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.

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.
Hello there 👋 I share a new blog post once a month-ish.
If you find my work interesting and want to stay in the loop enter your email below. I guarantee I’ll never spam you.
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..
A "properly rounded corner" at an intersection as alluded in the article is one that's great for cars (as they don't have to slow down much or have a tight turn. However, they are awful as pedestrian crossings if you want to do a double crossing, as you have to traverse additional distance. They are also much more space-inefficient, which isn't viable in a densely built urban environment.
Everything in the article applies equally to trains and rails.
We get enough complaining about evil car-centric city designs on the posts directly about cars thanks.
Results can be seen on f.ex https://www.openstreetmap.org/#map=16/55.88242/37.72732
In more simulation-focused games, cycling and walking paths are often available, and you can use them, but they come with many of the same constraints they face in the real world. In practice, that means they are usually not efficient as the primary way to move large numbers of people across a large city.
Reading your comment, it sounds like you want a game that is realistic in most respects, but treats transportation differently, in a way that makes your preferred options the optimal strategy. That is going to be hard to find, since transportation is a core part of city-building sims, and developers tend to pick either realism or a more utopian/fantasy model rather than mixing both in a single game.
That's because SimCity is not a tool for preaching your personal opinions of what makes "more livable cities" to people who more often than not want to design semi-realistic, typical cities in an entertaining strategy game.
If you want to make your perfect city builder, go ahead, it's easier than ever now for somebody to create a game. Just don't expect everybody else to share your view of "aspirational", more so if you actively punish traditional city structures.
Most people consider that a benefit. It's just as livable as anywhere else. Just different.
Neither US or Europe do living areas well due to their historical constraints.
https://humantransit.org/2013/05/how-sim-city-greenwashes-pa...
Using circular arcs or even simple third-degree polynomials (like cubic parabolas) reduces many of those operations to trivial O(1) function calls, which makes them much cheaper to evaluate and manipulate procedurally, especially when you're computing it 60 times per frame
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.
This made me briefly nostalgic for the old glory days of Slashdot, which is the first place I recall that would cause the "hug of death".
you need "plop the growables" and "move it" mods at minimum to nudge all the buildings close together.
If you think Simcity and Cities: Skylines are realistic depictions, then ask yourself why Simcity famously has no visible parking whatsoever (or don't: the devs are on record saying they excluded it because it made the cities look terrible, there's no need to speculate here), or ask yourself why Cities: Skyline added car pokeballs (where drivers get out of the car and put the car in their pocket) or straight-up delete cars when traffic gets too heavy.
What you call "typical" and "traditional" is not in any way universal.
Or you haven't travelled a lot.
It's the opposite, no? Most city builders cheat to be able to be fun. Like, with the amount of roads one build in Sim City, half the map would have had to been parking lots to account for that amount of traffic. But that's boring gameplay, so they remove that constraint to make a fun game. Aka you never have to deal with the consequences of making your city car dependent.
Edit: See another comment from CalRobert about exactly this.
Cities Skylines with all the DLC and the right transportation mods gets pretty “realistic” in that you can build a transit paradise but the car still exists.
People are totally entitled to like what they like, and that's OK. Everyone has something that works for them, and this world has a great variety of options available but the "car-centric suburban sprawl" is linked to various negative mental and physical health consequences. Negative health consequences, IMO, isn't "just as livable".
As a simple example, when people walk more during commuting instead of drive, they tend to be healthier. There are other more nuance (but studied) impacts, such as increased car accidents, mental impacts from increased isolation, etc. In America, there is even a correlation between how car-centric a community is and how often individuals are willing to seek out healthcare (even when accounting for access and affordability).
https://imgur.com/a/procedurally-generated-buildings-that-or...
I wish they'd actually shown more/talked about it though.
Does that imply that the merge of two lanes is still too costly?
Also it seems the lane from south east to south west is missing :D it's somehow routed via north first and then goes around the circle.
And, of course, the fact that the areas you say "aren't better to live in" also tend to be extremely expensive doesn't make a lot of sense.
A well-built large city isn't just going to be 100% biking and walking paths, it's going to have streetcars, light rail transit, subways, and buses as well as roads with cars. The difference is that people shouldn't be forced to commute across the entire city to get to work because you decided to cram all of the commercial zoning into one downtown core.
https://raphlinus.github.io/curves/2021/02/19/parallel-curve...
My guess is a combination of tech being better and HN having lower volume vs peak /. (before digg&reddit).
The statement reversed, you might loose your joy because working in the game is no longer fun.
I get you but just want to say: careful what you wish for :)
Source: https://www.sciencedirect.com/science/article/pii/S026483772...
Yes.
This one https://www.openstreetmap.org/#map=16/55.88495/37.47959 was built from scratch not very long ago. Notice how merges/splits are spread as far as possible.
Isn't the point that they should be, if that's how I choose to build a city, and they don't have to be, if you choose to build it otherwise? The entire point of a sandbox city-builder is, I assume, that it's a sandbox, and not a dogmatic interpretation of a childish Reddit meme.
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.
A small errand that takes me 5 to 10min in my hometown takes me 45min to 2h in suburbialand. Worse, mutualizing errands do not even reduce the overhead of a single trip because infrastructure is usually made in such a car centric way that it makes it super inconvenient if not downright dangerous to walk from one huge parking lot to another one a couple of blocks away so you are kind of pushed to move your car, sometimes navigate a stupidly long loop to simply turn around and go on the other side of a stroad.
By the end of the day you realize you have barely done anything.
Funnily it makes it worse for both drivers and non drivers.
At home I usually opt to not take the car, not because it would be slow but because in many cases it is silly. It would be too short for the engine to even warmup and I would not have the chance to enjoy some time outside and/or exercise at the same time.
I totally see the impact spending so much time in the car and traffic has on my in law family's stress level and they do complain a lot about it while being seemingly unable to envision a better way of living and push for it at political level. It is also super bad on the security side of things because they often opt to take/make calls while driving for it to not make it time totally lost and aren't just as focused as they should be on the road.