Skip to content

Repository files navigation

Hinge Flap

A native macOS build of Flappy Bird controlled by the laptop hinge. A quick lid movement of about 3 degrees produces one flap. Slow posture adjustments are filtered out.

Requirements

  • macOS 14 or newer
  • A MacBook that exposes Apple's lid-angle HID sensor
  • Swift 6 / Xcode command-line tools

Run

./script/build_and_run.sh

The project-local Codex environment exposes the same command as its Run action.

Hardware

Hinge Flap reads the undocumented Apple lid-angle HID device at usage page 0x0020, usage 0x008A, feature report 1. It needs a MacBook that exposes this sensor, and the app must run outside the App Sandbox. A Mac without the sensor gets a clear unavailable state.

There is no keyboard or mouse flap control in the shipped game. Maintainers can launch dist/HingeFlap.app/Contents/MacOS/HingeFlap --demo after building to exercise the scene on hinge-free test hardware.

Verify

./script/test.sh
swift test
swift build
./script/build_and_run.sh --verify

The HID identifiers and feature-report layout follow the public reverse-engineering documented by LidAngle and LidAngleSensor. The API is not App Store safe and may change in a future macOS release.

The game uses the classic bird, pipe, backdrop, base, score, game-over, and sound asset set from samuelcust/flappy-bird-assets. Its MIT license is bundled at Resources/FLAPPY-ASSETS-LICENSE.txt.

License

The Hinge Flap source code is released under the MIT License. The bundled Flappy Bird assets retain their separate upstream MIT notice in Resources/FLAPPY-ASSETS-LICENSE.txt.

About

A native macOS Flappy Bird game controlled by the MacBook hinge.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages