Everroad
Devlog

Where Everroad began

The first entry in our devlog. Who we are, why we're making a calm little driving game, and a look back at how rough the very first version was.

Hi, I'm Rein. I write the code for Everroad. My wife Revathy is the artist and creative lead, so she decides how Everroad should look and feel, and I try to get the computer to agree with her. Our two dogs, Zoe and Zelda, handle morale.

We've been working on Everroad for a while now without saying much about it. That changes today. This devlog is where we'll share what we're building, what broke along the way, and how things work under the hood. Some posts will be short. Some will have code in them. All of them will be honest about the parts that went wrong, because those are usually the best stories.

Since we're starting a little late, this first post looks back. Here's where Everroad came from, what it looked like at the very beginning, and how it got to where it is now.

A game for the end of a long day

By day, Revathy is a business analyst at a bank and I'm a software engineer. Like a lot of people, we finish most days with our heads still buzzing. Our way of switching off has always been doing something with our hands. We build puzzles, we paint, and we play with the dogs until everyone's tired.

Revathy has always been the creative one. She draws, she paints, and she loves working through ideas at her drafting table. Her real passion is photography and cinematography. She runs her own photography site, Solis, and shares her work on Instagram at @weyersandco. I've admired her work for as long as I've known her, and over the last few years I've more or less become her assistant. She's far more creative than I am, and I think that's exactly why we work so well together.

She's also been drawing for my games for years. It goes all the way back to my first game in 2021, where she painted the textures for cartoon wooden planks, of all things, and a few character cosmetics too. So making a game together felt natural. We just needed the right idea.

That idea came from something we were both missing. Most of what we play with friends is competitive. We love it, but it's loud and stressful, and after a few rounds you need something to come down from it. We wanted a game you could put on after a long day, after a tense session with friends, or on an evening when you're feeling anxious and just need your brain to rest. Something you could enjoy on your own or with friends, where nothing chases you and nothing is timed.

There was a bit of nostalgia in it too. Years ago, when The Crew came out, you could pick two points on its map, maybe a hundred kilometres apart, and spend the best part of an hour just driving between them. Doing that with friends, chatting and taking in the scenery, was an absolute blast. It was a road trip, not a race. Everroad is heavily inspired by that feeling. Just you, the road, and wherever it happens to go.

The first prototype

The first version started on a day when I decided to give procedural terrain a go, just to see what was possible. Up to then I'd mostly been a Unity developer, with very little experience in three.js, the library that draws 3D graphics in a web browser. I wanted to see whether I could build land that generates itself as you drive, in plain JavaScript, and whether it would run well.

It worked, more or less. It was called Meander back then. There was a road, painted onto the ground with a white line down each side and a yellow dashed one in the middle. The car was a few red boxes stacked on top of each other. The trees were green cones on sticks in four shades of green. There was fog, a simple sky that faded from blue to white with a sun in it, and a speedometer. Even then, it could drive itself.

The very first prototype. A red box of a car, cone trees, and the same road we drive today.
The very first prototype. A red box of a car, cone trees, and the same road we drive today.

Then I showed it to Revathy and had her play it. It looked awful, honestly. But something clicked for both of us. Not knowing what came next was exciting. What's around this bend? What's over that hill? What will the land look like in a minute's time? Even in that bland little world, we kept wanting to see a bit further. We wanted to colour it in, and fill it with atmosphere and emotion.

Off the road in an early build, with mountains far too big and jagged for the calm game we wanted. We ended up preferring rolling hills.
Off the road in an early build, with mountains far too big and jagged for the calm game we wanted. We ended up preferring rolling hills.

There was a long list of problems. The physics was rough, the models were pretty awful, and everything was bland. We also weren't using a traditional game engine. In Unity you get physics, lighting and a whole toolbox for free. Here, I had to write a lot of that myself.

That's why, to this day, Everroad has no real gravity. The car doesn't fall onto the road. It's placed on it. The prototype did it like this, and the idea hasn't changed much since.

the car, sitting on the ground
// ask the ground how high it is under the front and the back of the car
const front = heightAt(x + forwardX * 1.4, z + forwardZ * 1.4);
const back  = heightAt(x - forwardX * 1.4, z - forwardZ * 1.4);

// then tilt the car to match the slope between them
car.pitch = Math.atan2(front - back, 2.8);

Real gravity would mean writing proper physics for it, which may come in a later update. For a calm drive, though, it works surprisingly well.

Building all the engine-like pieces ourselves has been challenging, but it's also been a lot of fun. With a photographer and cinematographer in the house, the camera was always going to matter, and getting the cinematic camera working was a real rush. The first time it swept up into an aerial shot and glided over our bare, untextured hills, I didn't say anything for a while. It still looked rough back then, but you could suddenly see what it might become.

Every road grows from a seed

This is the part people ask about most. There's no map in Everroad, and nobody shaped the hills by hand. The whole world grows from a single number called a seed.

The seed goes into a small function that turns it into a long run of numbers. They look random, but the same seed always gives the same ones. Those numbers feed something called noise, which is randomness that changes smoothly. Plot ordinary random numbers on a graph and you get spiky static. Plot noise and you get gentle rolling hills. Almost everything in Everroad is built from it.

const random = seededRandom(seed); // the same seed always gives the same numbers
const noise = makeNoise(random);   // smooth randomness, like hills on a graph

The road is a good example. The game keeps asking one question. If you're this far along the road, how far left or right is it?

the road, from the very first prototype
function roadX(z) {
  // long, lazy bends, roughly a kilometre apart
  const sweeps = 240 * noise(z * 0.0011, 0.5);

  // smaller wiggles on top of those
  const wiggles = 50 * noise(z * 0.0047, 7.3);

  return sweeps + wiggles;
}

z is how far down the road you are, in metres. Multiply it by a tiny number and the noise changes slowly, which gives you wide sweeping curves. Multiply it by a bigger one and the bends come quicker. Add the two together and the road starts to look like it was laid into the land by someone who liked driving.

Here's a fun fact. Those two lines are from the first day of the prototype, and they're still in the game. Everything else has been rewritten many times, but the road you drive today still starts with that same pair of curves.

The real version adds more layers on top. Mountain passes add hairpins that zigzag up to the top. Desert stretches straighten everything out. Country lanes add quick little bends. The same idea runs through everything else too. The height of the hills, where a lake sits, which side the sea is on. They're all answers to "what's here?", worked out from the seed and where you are.

That's also why the road never runs out. The game doesn't store the world anywhere. It just keeps asking the question as you drive, a little further ahead each time.

The things we got wrong

Every game has a pile of ideas that seemed great until we actually saw them. Here are a few of ours.

The trees. The prototype's trees were cones on sticks. Slide across to see how far they've come.

The trees in the first prototype, and a spring grove today. ThenNow
The trees in the first prototype, and a spring grove today.

Getting there took a detour. At one point every tree picked its own colour. Orange next to pink next to green. It sounded lively on paper, but on screen it looked like a circus. Now colour comes in whole groves, like the blossom above in spring or a hillside of orange in autumn. Summer stays green.

The cheetah spots. We wanted a bit of texture in the grass, so the ground shader drew little dark tufts across it. From the driver's seat they looked exactly like cheetah spots. We tried small pebbles along the verges instead, and those went too. The ground is plainer now and looks much better for it.

The towns. For a while Everroad had towns. Proper ones, with traffic lights and even a red-light camera. Then we played it and realised the towns were the least relaxing part of the game. Waiting at red lights, in a game about not having to be anywhere.

Caught on camera at 101 km/h through a red light. Not exactly the relaxing drive we had in mind.
Caught on camera at 101 km/h through a red light. Not exactly the relaxing drive we had in mind.

We took them all out. In their place are scenic lookouts, gravel lay-bys with a name sign, a bench and a view. They're big enough for a few cars to pull in together, which matters for something we'd like to do later.

The traffic that wouldn't leave you alone. The other cars used to overtake you. In practice, they rammed you. So now nobody overtakes, ever. Traffic hangs back at your pace, and nobody honks at you for taking it slow. That one felt important.

The referee. Some of the cars have a turbo, and our first turbo sound was a whistle. Every time you lifted off the throttle, it sounded like a referee stopping play. It's now a soft, smooth spool tucked underneath the engine, where it belongs.

The headlights. I built two proper headlight beams, one from each lamp, the way real cars light up a road. It looked worse. We went back to a single soft pool of light, and nobody has missed the clever version.

Where it is now

Here's what a drive looks like today.

And it all runs in a web browser. Friends who tried it didn't believe that part.

What's next

We'll post every few weeks. Next up is how we got all of this running smoothly in a browser, and the constant tug of war between making Everroad as atmospheric as possible and keeping it smooth.

If you'd like to follow along, there's an RSS feed, and we're always around on Discord. You can also play Everroad right now on a computer.

Thanks for reading. See you on the road.

Rein, Revathy, Zoe and Zelda