Skip to content

sliemeobn/flappy-swift

Repository files navigation

Flappy Swift

A DOM-rendered WASM game in ~100KB, written in Swift.

A technical demonstration of ElementaryDOM and ElementaryCSS rendering performance, implemented as a "Flappy Bird" clone. This project serves as a playground for exploring the capabilities and performance characteristics of DOM-based rendering in Swift.

Intentionally, Flappy Swift does not use Canvas or WebGL, but renders directly to the DOM instead. Every animation frame is going through the full reactivity-based reconciling/V-DOM logic without any special tricks or shortcuts.

>> Play it here <<

Build and Run

Requires Swift 6.1 or later

# Embedded Swift
./build-embedded.sh
npx serve Public

Or, alternatively, using "full swift"

# Requires SwiftWasm SDK (https://book.swiftwasm.org/getting-started/setup.html)
./build.sh
npx serve Public

About

A DOM-rendered WASM game in ~100KB, written in Swift

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published