Avoid the cubes while the speed progressively increases! Can you beat the rainbow level?
Winner of the 2022 React Open Source Awards in the category Fun Side Project of the Year!
The game is inspired by an old flash game I used to play in the late 2000s called Cubefield. My version is in full 3D and built with React, THREE.js and react-three-fiber to glue them together.
I went for a synthwave aesthetic, including some self-composed music, which the visual effects are synced to (so turn the music on!).
High scores are stored by the Mobius wrapper in highscores.json, with a
namespaced localStorage fallback for standalone development.
The development process will be detailed on my website.
-
Left: A, LeftArrow
-
Right: D, RightArrow
Touch devices have on-screen controls.
This fork includes a Mobius package:
mobius.jsonis the install manifest.index.jsxis the Mobius wrapper. It probes the packaged build, requests fullscreen/immersive shell chrome, bridges high-score storage, and emitsapp_ready,error,run_ended,high_score, anditem_updatedsignals.build/is a prebuilt CubeRun static bundle served by Mobius under/app-embeds/by-id/<app_id>/.src/is the editable third-party game source. Gameplay knobs live insrc/constants/index.js.icon.pngis the Mobius home-screen icon.
Install URL:
https://raw.githubusercontent.com/mobius-os/app-cuberun/main/mobius.json
Data contracts:
- Durable high scores:
window.mobius.storagepathhighscores.json, value shape[number, number, number]sorted descending. - Standalone fallback keys:
cuberun:highscoresandcuberun:musicEnabled. Bare legacy keys are read only for migration and corrupt values fall back to safe defaults.
Rebuild and repackage loop:
- Install dependencies with
npm installoryarn install. - If the old CRA toolchain fails, run
tools/fix-postcss-safe-parser.shandtools/fix-three-loaderutils.sh. - Run
npm run build. The script sets the Webpack 4/OpenSSL compatibility flag needed on current Node versions. The build must keep relative asset paths (./static/...), not root-absolute paths. - Regenerate or update
mobius.jsonstatic_assetsto match the new hashed files inbuild/. - Run
npm run verify:mobius. - Reinstall the app package in Mobius and smoke the wrapper. The package is
not marked offline-capable until every build asset is proven cached under
/app-embeds/by-id/cuberun/.

