
I run a go-kart parts business.
So naturally I ended up building a 3D go-kart workshop into the website.
Because apparently simply selling the things wasn't enough.
Kart Shed lets you walk around a workshop, fit real kart components, take the kart onto the track and see how different parts affect the way it drives.
You can try Kart Shed here.
Once the basic game worked, I made the mistake of looking at the kart properly.
That is usually how these things start.
The kart looked like a kart. That wasn't quite enough.
The original model did the job, but beside a real rental kart it was missing some of the details that make the shape believable.
So I started adding them.
- Side pods were repositioned.
- Pod skids went underneath them.
- The front bumper got deeper and flatter.
- The rear bumper was reshaped.
- Flat-bar front stays, mounting hardware, clamps, bolts and number-panel fasteners were added.
Nothing individually dramatic.
Together, though, they changed the silhouette enough that it stopped looking like a generic game kart and started looking much more like something you'd actually find at a rental circuit.
There was one small problem.
Every extra piece of geometry has a cost.
19,040 triangles became 26,476
Before the bodywork changes, the visible kart contained around 19,040 triangles.
Afterwards it was 26,476.
That sounds like exactly the sort of sentence that should be followed by:
“And then the browser caught fire.”
Fortunately, triangle count is only part of the story.
One of the numbers I was watching more closely was the number of draw calls.
In simple terms, every time the browser has to tell the graphics card to draw another object or material, there's some overhead involved.
You can have a reasonably detailed model that runs nicely if it's organised sensibly.
You can also have a much simpler scene that performs terribly because you've chopped everything into hundreds of separate objects.
The useful result was that the kart became substantially more detailed without the number of meshes and materials suddenly exploding.
That gave me room to improve it without ruining the experience on an ordinary computer.
Then I found a harder problem.
How do you make a worn kart look worn?
Kart Shed doesn't just have cosmetic parts.
Components have condition.
- Tyres wear.
- Chains wear.
- Brake pads wear.
- Engines deteriorate.
Those numbers affect the kart itself.
What I wanted was for the player to start recognising that visually as well.
A kart that has spent its life being abused shouldn't look identical to one you've just repaired.
Easy enough.
Make everything rusty.
Except that's not particularly realistic.
Rental kart bodywork doesn't magically turn brown because the brake pads are shot.
And I didn't want to fake it by damaging the bodywork when the actual wear data belongs to individual mechanical parts.
So I tried making the components themselves tell the story.
Three visual states
The important components now have their own visual treatment.
Found
A part you've dragged out of the kart graveyard should look used.
Chains can appear rusty-brown. Tyres are greyer. Engine components look slightly tired.
Repaired
Repairing a component brings it visually back toward a good state.
Chains become brighter and metallic again. Tyres become darker and cleaner. The mechanical parts start looking like somebody has actually done some work on them.
Worn out
Once something is properly knackered, subtlety stops being helpful.
The chain becomes dark and caked. The engine accumulates visible grime. Tyre surfaces become pale, rough and grainy.
That worked very well close up.
From the other side of the workshop?
Not so much.
The annoying problem of distance
This became one of those development problems where the computer is technically doing exactly what you asked.
The differences were there.
You could see them clearly when standing beside the kart.
But from across the bay, the repaired kart and the found kart could still look almost identical.
Why?
Because the bodywork dominates the image.
The chain is tiny. Most of the engine is partially hidden. Tyre texture differences become a handful of pixels.
This is where realism starts fighting usability.
Make the rusty chain realistically rusty and nobody notices.
Make it bright orange and the player notices immediately, but now the kart looks like it's been parked at the bottom of the North Sea since 1987.
So I ended up giving some parts their own visual curve.
The gameplay condition stays exactly the same.
Only the visual response changes.
That gives me more control over what the player sees without secretly changing the underlying wear numbers just to make the graphics work.
There are really two systems
This was the useful lesson.
At first I'd treated condition as one value:
Part condition = how it performs + how it looks
That sounds logical.
It isn't always the best design.
There are actually two questions:
- How worn is the component mechanically?
- How clearly does the player need to see that condition?
Those don't have to follow exactly the same curve.
The game can know a tyre is at 65% condition while the graphics exaggerate the visible wear slightly so the player can actually tell.
Nothing dishonest is happening.
You're just translating a number into useful visual information.
It's the same reason racing games don't necessarily simulate every physical effect completely literally.
The player has to be able to understand what's happening.
The rabbit hole continues
The funny part is that most people playing Kart Shed will never know any of this happened.
They'll just see a kart that looks a bit better.
They might notice that an old chain looks rough.
They might realise the tyres they found behind the shed aren't quite as nice as the ones they've repaired.
That's the point.
A lot of development work disappears when you've done it properly.
You notice the bad version.
You generally don't notice the fix.
Which means I have now spent a completely sensible amount of time modelling wear on a virtual rental kart attached to a parts shop.
Good job, buddy.
Try Kart Shed
You can play Kart Shed here.
Build the kart, find some parts, take it onto the track and try not to upset the marshals.
And if the 10mm socket disappears while you're working on it, that isn't a bug.
That's realism.