gekro
GitHub LinkedIn

Highway Dodge

Play a lane-changing driving game: dodge the traffic on a 3, 4 or 5 lane road and pick up fuel drops to keep going.

Score 0

Best -

Lives 3

Fuel 100%

Press Left or Right (or A and D) to change one lane. On a touch screen, swipe sideways on the road, tap on the side you want to move to, or use the two big buttons. Drive into the amber fuel drops to refill; the fuel gauge falls all the time and the drive ends when it is empty. Bumping into a car costs a life and the car cannot be hit for a moment. Space or Start begins, Escape or P pauses. The cars come in rows, and there is always a free lane next to the one you are in for the next row. Sound is off until you turn it on.

How it works

Traffic is made one row at a time, at least 210 units apart. The game keeps a list of the lanes you could be in at each row, and only makes a row if every one of those lanes has a free lane to move into, either the same one or the one on either side. A driver who only looks at the next row and moves into a free lane beside theirs can never be trapped. Changing a lane takes about an eighth of a second. The road speeds up from 140 to 220 units a second on Easy, 170 to 270 on Medium and 200 to 330 on Hard over the first 90 seconds. Your score is the distance in 12-unit steps plus 10 for each fuel drop.

As-is, no warranty. These apps are free under their listed license and run entirely in your browser. Use at your own risk — don't blame me if your PC catches fire, your dog runs away, or the math turns out wrong. Verify anything that actually matters. None of this is professional financial, medical, legal, or engineering advice.

© 2026 Rohit Burani · MIT · Built at gekro.com · View source ↗

Guide

How to play

You drive the blue car with the ring on its roof up a road with several lanes. Other cars come down the road toward you in rows. Change lane to slip past them. Amber fuel drops sit in the lanes too. Drive into one to refill. The fuel gauge falls all the time, and the drive ends when it is empty or when you have bumped into too many cars. Your score is how far you have driven plus 10 for every fuel drop.

Controls

  • Keyboard: Left and Right arrows (or A and D) change one lane. One press is one lane, and holding a key does not keep going. Space or the Start button begins. Escape or P pauses.
  • Touch: swipe sideways on the road for one lane, or tap on the side of your car you want to move to. The two big buttons under the road, at least 56 pixels square, move one lane each press.
  • Mouse: click on the left or right side of your car, or use the two buttons.
  • Pause: Escape, P, the Pause button, or switching to another tab. The game stays paused until you press Resume, P or Space.
  • Sound: off until you press the Sound button. The sounds are short, quiet tones.

When you bump a car you lose a life, that car is gone, and your car is dimmed and cannot be hit for 1.6 seconds.

Levels

LevelLanesLivesRoad speed (start to top)Fuel used a secondFuel drop in every
Easy33140 to 2202.2 percent4th row
Medium43170 to 2702.8 percent5th row
Hard52200 to 3303.4 percent4th row

All numbers are the game’s own units: the world is 320 wide and 480 tall, each lane is 56 wide, and speeds are per second. The road speeds up from the first speed to the second over the first 90 seconds. A drop adds 30 percent of a tank, up to a full tank.

Seeing the game

Cars are told apart by more than colour: each has its own roof marking (a stripe, two dots, a chevron, two side stripes or a small box) and the three shapes are a car, a long van with a pale box on its roof and a short one. Your car is the one with a ring on its roof. The fuel gauge says “FUEL LOW” in words as well as turning a different colour. The canvas has a text label with your score, fuel, lives and lane, and a message line says when you pick up fuel, bump a car or pass every hundred points.

With reduced motion set on your device, the road is 20 percent slower and your car is shown steadily dimmed after a bump instead of blinking. Nothing flashes.

How it works

The engine is a pure function: step(state, move, rng) advances the game by exactly one 1/60 second and returns a new state. The page runs it from a fixed-step clock, so a 60 Hz phone and a 144 Hz monitor play the same drive, and a stalled tab cannot fast-forward it (one frame is cut off at 50 ms).

  • Lanes. A move changes the lane you are heading for at once, and the car slides there at 420 units a second, which is 56 / 420 of a second per lane. The crash test uses the car’s real position, so you can clip a car while sliding past it. The test for this is compared with a brute-force check of overlapping boxes on 4000 random pairs.
  • Rows. Traffic is made one row at a time, 210 or more units apart, and never fills every lane.
  • Fuel. It falls at a steady rate for the level. A drop is in a free lane that you could reach.
  • Speed. It rises in a straight line from the start speed to the top speed over 90 seconds.

Why there is always a way through

For each new row, the game works out the lanes you could be in: the lanes that were reachable at the row before and that are one step away, or the same, and free. A new row is only kept if from every one of those lanes there is a free lane to move into, either the same lane or the one on either side. If twelve tries fail, the row is left empty. This means a driver who looks only at the next row, and moves into a free lane beside theirs when needed, can never be trapped.

The tests check this with a separate count. For each level they make 800 rows from 25 seeds and, with a different piece of code, follow every possible path through them from the starting lane. A path always exists. They also work out the time between two rows at the top speed: after counting how long the biggest van overlaps your car and the small forward and back wobble of each car in a row, the free time is at least twice what a lane change needs.

Then they drive it. A driver who looks one row ahead drives 120 seconds on 30 seeds at every level, at the normal and the slower reduced-motion pace, and never takes a bump. A planner that looks five rows ahead and goes for fuel whenever the tank is below 85 percent drives 300 seconds on 20 seeds at every level and pace with no bump and no empty tank. A driver who ignores fuel runs dry in at least 15 of 20 Medium and Hard drives, so the fuel drops really matter. A driver who never changes lane crashes or runs dry on every seed, so the check can fail.

Privacy and storage

Nothing is uploaded and there is no account. Your best score for each level (and for the slower pace used with reduced motion) is saved in your browser’s local storage under one key, as small whole numbers inside a small JSON object. The page address holds your level so you can share it. Clearing site data removes the scores.

Limits

  • Cars all travel in the same direction and come in rows. There are no overtaking cars, no police and no power-ups.
  • A drive you leave with Restart or a level change still counts toward your best, because the distance was really driven.
All arcade games →

Free to play, no ads, nothing uploaded. These games are original and are not affiliated with any other game or brand.