Skip to content

About

Example physics game using Flight (TS/RS)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

202 Commits

Folders and files

Repository files navigation

Horse Stacker

Horse Stacker is an end-to-end Flight showcase implemented twice:

  • typescript-web/ is the complete browser game built with TypeScript and Flight's web host.
  • rust-winit/ is its native Rust and winit counterpart, mechanically translated module-for-module.

Both applications use the canonical models and audio in assets/. Their implementations stay independent so each one remains an idiomatic, self-contained example of its Flight API.

TypeScript web application

cd typescript-web
npm install
npm run dev

Move the pointer or use ←/→ to position the yellow marker. Click or tap anywhere on the page, or press Space, Enter, or ↓, to reveal and place the object.

Checks

cd typescript-web
npm run build
npm run validate:assets
npm run validate:game

The gameplay validation runs 64-object level, balanced, and teetered placement scenarios using the shipped timing and surface-placement rules. It also checks the weighted prop distribution, both hen variants, finite body state, contacts, distinct 2D colliders, supported pile height, zero-impulse physics activation, horse-height calibration, and farm-edge falloff.

Rust winit application

The native application in rust-winit/ mirrors the browser game across the full source surface: scene construction and GL rendering, model extraction and instancing, free-plane aiming and the landing preview, Flight 2D physics, both game modes and result count-up, particles, audio orchestration, terrain sampling, windmill motion, records/preferences, and the five-screen Flight 2D UI. Browser-only responsibilities have named winit/native substitutions rather than being omitted.

The Rust modules deliberately mirror the TypeScript file and declaration names, translated to Rust's standard snake_case, so the two implementations can be read side-by-side as an API showcase rather than merely producing the same visuals.

cargo run --manifest-path rust-winit/Cargo.toml

Flight is pinned to an exact source revision while its Rust/TypeScript parity work is in progress. See rust-winit/README.md for the current port status and checks.

Model credits

Music credit

  • “The Mountain's Happy Song” by Elijah_K, sourced from Free Music Archive and licensed under CC BY.
  • “Farm Early Morning (Loop),” “Bodyfall Wood Double Thud,” “Flashlight Turn On 4,” “Fanfare Arpeggio Resolution,” and “Ta Da Brass Fanfare 1” sourced from Free Sound Effects.
  • “HORSE3” whinny compilation sourced from Free Sound Effects and cued as four short reaction clips in the game.

About

Example physics game using Flight (TS/RS)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages