SkyHop build log - WordPad
✕
C:\ar9av\builds\SKYHOP.TXT
  1. Desktop
  2. Build Log
  3. Games

Build log · Games

How I built SkyHop

An 8-bit side-scrolling biplane game: hold to climb, release to dive, watch the fuel

Screenshot of SkyHop running in the portfolio
SkyHop, running on the desktop. Open it yourself →

1.Why I built it

SkyHop is a small 8-bit biplane game. I wanted a one-button flyer with pixel-art sprites generated by gpt-image, a fuel gauge to keep you moving through pickups, and a Convex leaderboard of top pilots.

It is deliberately compact. The whole game is one component of about 200 lines, which makes it a useful reference for the basic shape of a canvas arcade game.

2.How it works

One-button flight model

The plane has only vertical motion. Each tick adds LIFT (0.55) upward while the button is held or GRAVITY (0.28) downward when it is released, and clamps vertical speed to MAX_VY = 6. The asymmetry is the feel of the game: you climb faster than you fall, so short taps hold altitude.

The sprite frame follows velocity. Above 1.5 px per tick upward shows the nose-up frame, below that the nose-down frame, otherwise level, and a crash frame on death.

Spawning from a weighted table

Every 55 to 105 ticks a new object enters from the right. The kind is chosen from a six-slot array, [balloon, balloon, bird, bird, fuel, cloud], which is a cheap way to get weighted odds. Balloons drift upward, birds fly toward you faster than the scroll, fuel cans restore 35 points, and clouds have a zero hit radius so they are scenery only.

Collision is circle against circle using Math.hypot. Fuel drains at 0.06 per tick, and touching the top, the ground or an empty tank ends the run.

Parallax with flat rectangles

The background is drawn with fillRect only: four sky bands, stepped green hills that scroll at a quarter of the ground speed, and dashes in the dirt that scroll at full speed. Wrapping each hill's x with modulo arithmetic makes the strip endless. The canvas is 640 by 400 and scaled with image-rendering: pixelated and imageSmoothingEnabled = false so pixels stay crisp at any window size.

Fixed timestep and leaderboard

The loop runs the simulation at a fixed 60 Hz from accumulated frame time, so a 120 Hz screen does not fly twice as fast. After a crash, a name field autofocuses and the score is sent to a Convex mutation that trims the name to 16 characters and rejects non-finite or out-of-range values. The leaderboard query keeps only each name's best score.

3.Try it

Hold Space, Up, W or the mouse to pull up; release to dive.

More from the build log

SkyHop · 2 min readAll 29 builds