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.
- macOS 14 or newer
- A MacBook that exposes Apple's lid-angle HID sensor
- Swift 6 / Xcode command-line tools
./script/build_and_run.shThe project-local Codex environment exposes the same command as its Run action.
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.
./script/test.sh
swift test
swift build
./script/build_and_run.sh --verifyThe 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.
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.