Downhill, its physics in Hazel

Hazel activities › Physics simulation · source on GitHub · hazeljs on npm

Ski down an endless slope. ⬅️ and ➡️ turn you a step at a time, from across the hill to straight down it; hold ⬇️ to crouch, faster when you point down the hill; the space bar pauses. Ski between a gate's flags for 50 points, jump off a ramp for 25 (high enough to clear the trees), and keep off the trees and rocks: a fall puts you in the snow a moment. Far down the hill, a snowball starts rolling after you. The course, each step of the run and the robot that skis it for you are all Hazel (downhill/rules/Downhill.hz).

⏳ Loading the rules…
0 m⭐ 0🚩 0🦘 0

This app needs JavaScript, and a page served over http (python3 -m http.server, then localhost).

The vocabulary the module sees (downhill/rules/preamble.hz). The listings are text, highlighted, until Edit in Hazel opens each in Hazel's own editor; an edit changes the next step (interpreted, so slower).

loading preamble.hz…
Downhill the course, made from its seed a stretch at a time; one step of a run (the heading and crouch, the snow's pull and drag, falls, jumps, bumps, gates); the snowball; and the robot that skis it
loading Downhill.hz…

hazeljs-examples · versions · Apache 2.0 (code), CC BY 4.0 (words, the icon) · by Matthew Hammer · an example for hazeljs