Mud builds up on your bike as you race downhill in Handlebar. The harder part was loading the forests ahead at 200 km/h.
Handlebar is a first-person downhill game where hard brakes and jump landings leave fresh mud on your bike. Its developer,
handlebardev, found that loading the forests fast enough at 200 km/h was the tougher problem.
Handlebardev stores the mud in a single 256 × 256 render texture. Each hard brake or jump landing adds new marks. The bike’s materials use that texture, and older marks fade at set intervals. Since nothing else in the world uses it, the mud has little effect on performance.
Loading the mountain took more work. Each level takes place on a cone-shaped mountain with a 3 km radius. The original system kept checking the bike’s position to decide what nearby scenery to load. At 200 km/h on older hardware, it could fall behind and spend time loading scenery the rider had already passed.
Handlebardev split the mountain into a grid. During generation, the game marks which cells it expects to need along two likely routes. One follows the winding trail, including forests that come into view across a turn. The other runs straight downhill from the summit for players who ride off-road.
While you ride, the game uses that information to load cells ahead of you and unload those you’ve passed. It has fewer decisions to make when the bike is moving at speed.
The art helps as well. Handlebardev kept the environmental assets low poly and used spherified normals and vertex-painted ambient occlusion for much of their shading. That helped get dense forests running at 60 fps on Android hardware.
You can see more of Handlebar here:
Working on effects in Unity?