@origingame/create-game 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +57 -2
- package/archetypes/README.md +99 -0
- package/archetypes/idle/.origin/setup +14 -0
- package/archetypes/idle/LICENSES.md +12 -0
- package/archetypes/idle/README.md +234 -0
- package/archetypes/idle/assets/audio/buy.wav +0 -0
- package/archetypes/idle/assets/audio/milestone.wav +0 -0
- package/archetypes/idle/assets/audio/nova.wav +0 -0
- package/archetypes/idle/assets/audio/orbit.wav +0 -0
- package/archetypes/idle/assets/audio/tap.wav +0 -0
- package/archetypes/idle/assets/audio/ui-close.ogt +9 -0
- package/archetypes/idle/assets/audio/ui-error.ogt +9 -0
- package/archetypes/idle/assets/audio/ui-open.ogt +9 -0
- package/archetypes/idle/assets/audio/ui-press.ogt +9 -0
- package/archetypes/idle/assets/audio/ui-success.ogt +9 -0
- package/archetypes/idle/assets/fonts/NotoSansSC-subset.ttf +0 -0
- package/archetypes/idle/assets/fonts/NotoSansSC-subset.ttf.ogt +10 -0
- package/archetypes/idle/assets/fonts/OFL.txt +93 -0
- package/archetypes/idle/assets/fx/drift.ogt +21 -0
- package/archetypes/idle/assets/fx/milestone.ogt +21 -0
- package/archetypes/idle/assets/fx/nova.ogt +22 -0
- package/archetypes/idle/assets/fx/stars.ogt +20 -0
- package/archetypes/idle/assets/fx/tap.ogt +23 -0
- package/archetypes/idle/assets/looks/idle.ogt +17 -0
- package/archetypes/idle/assets/skins/sparkorb/ChakraPetch-BoldItalic.ttf +0 -0
- package/archetypes/idle/assets/skins/sparkorb/ChakraPetch-BoldItalic.ttf.ogt +9 -0
- package/archetypes/idle/assets/skins/sparkorb/LICENSES.md +19 -0
- package/archetypes/idle/assets/skins/sparkorb/OFL.txt +95 -0
- package/archetypes/idle/assets/skins/sparkorb/Orbitron-Medium.ttf +0 -0
- package/archetypes/idle/assets/skins/sparkorb/Orbitron-Medium.ttf.ogt +9 -0
- package/archetypes/idle/assets/skins/sparkorb/Rajdhani-Bold.ttf +0 -0
- package/archetypes/idle/assets/skins/sparkorb/Rajdhani-Bold.ttf.ogt +9 -0
- package/archetypes/idle/assets/skins/sparkorb/atlas.png +0 -0
- package/archetypes/idle/assets/skins/sparkorb/atlas.png.ogt +7 -0
- package/archetypes/idle/assets/skins/sparkorb/icons.png +0 -0
- package/archetypes/idle/assets/skins/sparkorb/icons.png.ogt +7 -0
- package/archetypes/idle/assets/skins/sparkorb/skin.ogt +113 -0
- package/archetypes/idle/assets/sprites/glow.png +0 -0
- package/archetypes/idle/assets/sprites/glow.png.ogt +8 -0
- package/archetypes/idle/assets/sprites/mote-crystal.png +0 -0
- package/archetypes/idle/assets/sprites/mote-crystal.png.ogt +7 -0
- package/archetypes/idle/assets/sprites/mote-ember.png +0 -0
- package/archetypes/idle/assets/sprites/mote-ember.png.ogt +7 -0
- package/archetypes/idle/assets/sprites/mote-star.png +0 -0
- package/archetypes/idle/assets/sprites/mote-star.png.ogt +7 -0
- package/archetypes/idle/assets/sprites/mote-storm.png +0 -0
- package/archetypes/idle/assets/sprites/mote-storm.png.ogt +7 -0
- package/archetypes/idle/assets/sprites/orb.png +0 -0
- package/archetypes/idle/assets/sprites/orb.png.ogt +7 -0
- package/archetypes/idle/assets/sprites/spark.png +0 -0
- package/archetypes/idle/assets/sprites/spark.png.ogt +7 -0
- package/archetypes/idle/assets/strings/en.ogt +62 -0
- package/archetypes/idle/assets/strings/zh-CN.ogt +62 -0
- package/archetypes/idle/gitattributes +22 -0
- package/archetypes/idle/host.d.ts +46 -0
- package/archetypes/idle/package.json +18 -0
- package/archetypes/idle/project.ogt +14 -0
- package/archetypes/idle/references/metal/card.png +0 -0
- package/archetypes/idle/references/metal/orbit.png +0 -0
- package/archetypes/idle/references/metal/title.png +0 -0
- package/archetypes/idle/src/components.ts +139 -0
- package/archetypes/idle/src/main.ts +247 -0
- package/archetypes/idle/src/numbers.ts +126 -0
- package/archetypes/idle/src/systems.ts +340 -0
- package/archetypes/idle/src/ui.ts +412 -0
- package/archetypes/idle/tests/away.og.ts +42 -0
- package/archetypes/idle/tests/flow.og.ts +57 -0
- package/archetypes/idle/tests/frames.og.ts +33 -0
- package/archetypes/idle/tests/frames.ts +134 -0
- package/archetypes/idle/tests/lib.ts +74 -0
- package/archetypes/idle/tests/milestone.og.ts +32 -0
- package/archetypes/idle/tests/nova.og.ts +52 -0
- package/archetypes/idle/tests/offline.og.ts +60 -0
- package/archetypes/idle/tests/pad.og.ts +55 -0
- package/archetypes/idle/tests/pause.og.ts +68 -0
- package/archetypes/idle/tests/phone.og.ts +50 -0
- package/archetypes/idle/tests/replay.og.ts +28 -0
- package/archetypes/idle/tools/make-assets.py +448 -0
- package/archetypes/idle/tools/oglite.py +285 -0
- package/archetypes/idle/tsconfig.json +17 -0
- package/archetypes/match3/.origin/setup +14 -0
- package/archetypes/match3/LICENSES.md +7 -0
- package/archetypes/match3/README.md +205 -0
- package/archetypes/match3/assets/audio/cascade.wav +0 -0
- package/archetypes/match3/assets/audio/clear.wav +0 -0
- package/archetypes/match3/assets/audio/lost.wav +0 -0
- package/archetypes/match3/assets/audio/refused.wav +0 -0
- package/archetypes/match3/assets/audio/select.wav +0 -0
- package/archetypes/match3/assets/audio/swap.wav +0 -0
- package/archetypes/match3/assets/audio/won.wav +0 -0
- package/archetypes/match3/assets/fonts/OFL.txt +93 -0
- package/archetypes/match3/assets/fonts/ui.ttf +0 -0
- package/archetypes/match3/assets/fonts/ui.ttf.ogt +11 -0
- package/archetypes/match3/assets/scenes/main.ogt +24 -0
- package/archetypes/match3/assets/sprites/backdrop.png +0 -0
- package/archetypes/match3/assets/sprites/board.ogt +21 -0
- package/archetypes/match3/assets/sprites/cells.ogt +7 -0
- package/archetypes/match3/assets/sprites/cells.png +0 -0
- package/archetypes/match3/assets/sprites/cells.png.ogt +7 -0
- package/archetypes/match3/assets/sprites/gems.ogt +75 -0
- package/archetypes/match3/assets/sprites/gems.png +0 -0
- package/archetypes/match3/assets/sprites/panel.png +0 -0
- package/archetypes/match3/assets/sprites/ring.png +0 -0
- package/archetypes/match3/gitattributes +22 -0
- package/archetypes/match3/host.d.ts +46 -0
- package/archetypes/match3/package.json +18 -0
- package/archetypes/match3/project.ogt +18 -0
- package/archetypes/match3/references/metal/cascade.png +0 -0
- package/archetypes/match3/references/metal/clearing.png +0 -0
- package/archetypes/match3/references/metal/dealt.png +0 -0
- package/archetypes/match3/src/art.ts +54 -0
- package/archetypes/match3/src/board.ts +112 -0
- package/archetypes/match3/src/components.ts +95 -0
- package/archetypes/match3/src/layout.ts +25 -0
- package/archetypes/match3/src/main.ts +199 -0
- package/archetypes/match3/src/systems.ts +631 -0
- package/archetypes/match3/tests/drag.og.ts +31 -0
- package/archetypes/match3/tests/endings.og.ts +40 -0
- package/archetypes/match3/tests/frames.og.ts +49 -0
- package/archetypes/match3/tests/frames.ts +134 -0
- package/archetypes/match3/tests/hidpi.og.ts +41 -0
- package/archetypes/match3/tests/lib.ts +64 -0
- package/archetypes/match3/tests/replay.og.ts +28 -0
- package/archetypes/match3/tests/sounds.og.ts +50 -0
- package/archetypes/match3/tests/swap.og.ts +67 -0
- package/archetypes/match3/tools/make-assets.py +404 -0
- package/archetypes/match3/tools/oglite.py +285 -0
- package/archetypes/match3/tsconfig.json +17 -0
- package/archetypes/rhythm/.origin/setup +14 -0
- package/archetypes/rhythm/LICENSES.md +13 -0
- package/archetypes/rhythm/README.md +235 -0
- package/archetypes/rhythm/assets/audio/bass0.wav +0 -0
- package/archetypes/rhythm/assets/audio/bass1.wav +0 -0
- package/archetypes/rhythm/assets/audio/bass2.wav +0 -0
- package/archetypes/rhythm/assets/audio/bass3.wav +0 -0
- package/archetypes/rhythm/assets/audio/chords0.wav +0 -0
- package/archetypes/rhythm/assets/audio/chords1.wav +0 -0
- package/archetypes/rhythm/assets/audio/chords2.wav +0 -0
- package/archetypes/rhythm/assets/audio/chords3.wav +0 -0
- package/archetypes/rhythm/assets/audio/clear.wav +0 -0
- package/archetypes/rhythm/assets/audio/click.wav +0 -0
- package/archetypes/rhythm/assets/audio/drums.wav +0 -0
- package/archetypes/rhythm/assets/audio/fail.wav +0 -0
- package/archetypes/rhythm/assets/audio/leadA.wav +0 -0
- package/archetypes/rhythm/assets/audio/leadB.wav +0 -0
- package/archetypes/rhythm/assets/audio/miss.wav +0 -0
- package/archetypes/rhythm/assets/audio/tap0.wav +0 -0
- package/archetypes/rhythm/assets/audio/tap1.wav +0 -0
- package/archetypes/rhythm/assets/audio/tap2.wav +0 -0
- package/archetypes/rhythm/assets/audio/ui-close.ogt +9 -0
- package/archetypes/rhythm/assets/audio/ui-error.ogt +9 -0
- package/archetypes/rhythm/assets/audio/ui-open.ogt +9 -0
- package/archetypes/rhythm/assets/audio/ui-press.ogt +9 -0
- package/archetypes/rhythm/assets/audio/ui-success.ogt +9 -0
- package/archetypes/rhythm/assets/charts/neon-pulse.ogt +919 -0
- package/archetypes/rhythm/assets/fonts/NotoSansSC-subset.ttf +0 -0
- package/archetypes/rhythm/assets/fonts/NotoSansSC-subset.ttf.ogt +10 -0
- package/archetypes/rhythm/assets/fonts/OFL.txt +93 -0
- package/archetypes/rhythm/assets/fx/hit.ogt +22 -0
- package/archetypes/rhythm/assets/skins/lanebeat/ChakraPetch-Medium.ttf +0 -0
- package/archetypes/rhythm/assets/skins/lanebeat/ChakraPetch-Medium.ttf.ogt +9 -0
- package/archetypes/rhythm/assets/skins/lanebeat/JetBrainsMono-Regular.ttf +0 -0
- package/archetypes/rhythm/assets/skins/lanebeat/JetBrainsMono-Regular.ttf.ogt +9 -0
- package/archetypes/rhythm/assets/skins/lanebeat/LICENSES.md +17 -0
- package/archetypes/rhythm/assets/skins/lanebeat/OFL.txt +95 -0
- package/archetypes/rhythm/assets/skins/lanebeat/Orbitron-Bold.ttf +0 -0
- package/archetypes/rhythm/assets/skins/lanebeat/Orbitron-Bold.ttf.ogt +9 -0
- package/archetypes/rhythm/assets/skins/lanebeat/atlas.png +0 -0
- package/archetypes/rhythm/assets/skins/lanebeat/atlas.png.ogt +7 -0
- package/archetypes/rhythm/assets/skins/lanebeat/icons.png +0 -0
- package/archetypes/rhythm/assets/skins/lanebeat/icons.png.ogt +7 -0
- package/archetypes/rhythm/assets/skins/lanebeat/skin.ogt +110 -0
- package/archetypes/rhythm/assets/sprites/lane.png +0 -0
- package/archetypes/rhythm/assets/sprites/lane.png.ogt +7 -0
- package/archetypes/rhythm/assets/sprites/note.png +0 -0
- package/archetypes/rhythm/assets/sprites/note.png.ogt +7 -0
- package/archetypes/rhythm/assets/sprites/ring.png +0 -0
- package/archetypes/rhythm/assets/sprites/ring.png.ogt +7 -0
- package/archetypes/rhythm/assets/sprites/spark.png +0 -0
- package/archetypes/rhythm/assets/sprites/spark.png.ogt +7 -0
- package/archetypes/rhythm/assets/strings/en.ogt +61 -0
- package/archetypes/rhythm/assets/strings/zh-CN.ogt +61 -0
- package/archetypes/rhythm/gitattributes +22 -0
- package/archetypes/rhythm/host.d.ts +46 -0
- package/archetypes/rhythm/package.json +18 -0
- package/archetypes/rhythm/project.ogt +14 -0
- package/archetypes/rhythm/references/metal/highway.png +0 -0
- package/archetypes/rhythm/references/metal/results.png +0 -0
- package/archetypes/rhythm/references/metal/title.png +0 -0
- package/archetypes/rhythm/src/components.ts +147 -0
- package/archetypes/rhythm/src/main.ts +202 -0
- package/archetypes/rhythm/src/systems.ts +490 -0
- package/archetypes/rhythm/src/ui.ts +421 -0
- package/archetypes/rhythm/tests/band.og.ts +45 -0
- package/archetypes/rhythm/tests/calibrate.og.ts +49 -0
- package/archetypes/rhythm/tests/clear.og.ts +51 -0
- package/archetypes/rhythm/tests/fail.og.ts +40 -0
- package/archetypes/rhythm/tests/flow.og.ts +54 -0
- package/archetypes/rhythm/tests/frames.og.ts +35 -0
- package/archetypes/rhythm/tests/frames.ts +134 -0
- package/archetypes/rhythm/tests/lib.ts +123 -0
- package/archetypes/rhythm/tests/pad.og.ts +41 -0
- package/archetypes/rhythm/tests/pause.og.ts +77 -0
- package/archetypes/rhythm/tests/phone.og.ts +44 -0
- package/archetypes/rhythm/tests/replay.og.ts +27 -0
- package/archetypes/rhythm/tests/timing.og.ts +37 -0
- package/archetypes/rhythm/tools/make-assets.py +383 -0
- package/archetypes/rhythm/tools/oglite.py +285 -0
- package/archetypes/rhythm/tsconfig.json +17 -0
- package/archetypes/roguelike/.origin/setup +14 -0
- package/archetypes/roguelike/LICENSES.md +14 -0
- package/archetypes/roguelike/README.md +256 -0
- package/archetypes/roguelike/assets/ai/foe.ogt +28 -0
- package/archetypes/roguelike/assets/ai/guardian.ogt +26 -0
- package/archetypes/roguelike/assets/audio/bump.wav +0 -0
- package/archetypes/roguelike/assets/audio/drink.wav +0 -0
- package/archetypes/roguelike/assets/audio/fall.wav +0 -0
- package/archetypes/roguelike/assets/audio/hit.wav +0 -0
- package/archetypes/roguelike/assets/audio/hurt.wav +0 -0
- package/archetypes/roguelike/assets/audio/item.wav +0 -0
- package/archetypes/roguelike/assets/audio/kill.wav +0 -0
- package/archetypes/roguelike/assets/audio/pickup.wav +0 -0
- package/archetypes/roguelike/assets/audio/roar.wav +0 -0
- package/archetypes/roguelike/assets/audio/stairs.wav +0 -0
- package/archetypes/roguelike/assets/audio/step.ogt +9 -0
- package/archetypes/roguelike/assets/audio/telegraph.wav +0 -0
- package/archetypes/roguelike/assets/audio/tomb.wav +0 -0
- package/archetypes/roguelike/assets/audio/ui-close.ogt +9 -0
- package/archetypes/roguelike/assets/audio/ui-error.ogt +9 -0
- package/archetypes/roguelike/assets/audio/ui-open.ogt +9 -0
- package/archetypes/roguelike/assets/audio/ui-press.ogt +9 -0
- package/archetypes/roguelike/assets/audio/ui-success.ogt +9 -0
- package/archetypes/roguelike/assets/audio/won.wav +0 -0
- package/archetypes/roguelike/assets/fonts/NotoSansSC-subset.ttf +0 -0
- package/archetypes/roguelike/assets/fonts/NotoSansSC-subset.ttf.ogt +10 -0
- package/archetypes/roguelike/assets/fonts/OFL.txt +93 -0
- package/archetypes/roguelike/assets/maps/dive.ogt +106 -0
- package/archetypes/roguelike/assets/skins/lampdive/DotGothic16-Regular.ttf +0 -0
- package/archetypes/roguelike/assets/skins/lampdive/DotGothic16-Regular.ttf.ogt +9 -0
- package/archetypes/roguelike/assets/skins/lampdive/LICENSES.md +16 -0
- package/archetypes/roguelike/assets/skins/lampdive/OFL.txt +93 -0
- package/archetypes/roguelike/assets/skins/lampdive/atlas.png +0 -0
- package/archetypes/roguelike/assets/skins/lampdive/atlas.png.ogt +7 -0
- package/archetypes/roguelike/assets/skins/lampdive/icons.png +0 -0
- package/archetypes/roguelike/assets/skins/lampdive/icons.png.ogt +7 -0
- package/archetypes/roguelike/assets/skins/lampdive/skin.ogt +115 -0
- package/archetypes/roguelike/assets/sprites/dive.ogt +50 -0
- package/archetypes/roguelike/assets/sprites/dive.png +0 -0
- package/archetypes/roguelike/assets/sprites/dive.png.ogt +7 -0
- package/archetypes/roguelike/assets/sprites/glow.png +0 -0
- package/archetypes/roguelike/assets/sprites/glow.png.ogt +7 -0
- package/archetypes/roguelike/assets/strings/en.ogt +57 -0
- package/archetypes/roguelike/assets/strings/zh-CN.ogt +57 -0
- package/archetypes/roguelike/assets/tiles/tomb.ogt +31 -0
- package/archetypes/roguelike/assets/tiles/tomb.png +0 -0
- package/archetypes/roguelike/assets/tiles/tomb.png.ogt +7 -0
- package/archetypes/roguelike/gitattributes +22 -0
- package/archetypes/roguelike/host.d.ts +46 -0
- package/archetypes/roguelike/package.json +18 -0
- package/archetypes/roguelike/project.ogt +14 -0
- package/archetypes/roguelike/references/metal/dive.png +0 -0
- package/archetypes/roguelike/references/metal/over.png +0 -0
- package/archetypes/roguelike/references/metal/title.png +0 -0
- package/archetypes/roguelike/src/art.ts +23 -0
- package/archetypes/roguelike/src/components.ts +169 -0
- package/archetypes/roguelike/src/dive.ts +144 -0
- package/archetypes/roguelike/src/foes.ts +174 -0
- package/archetypes/roguelike/src/main.ts +258 -0
- package/archetypes/roguelike/src/systems.ts +620 -0
- package/archetypes/roguelike/src/ui.ts +350 -0
- package/archetypes/roguelike/tests/flow.og.ts +54 -0
- package/archetypes/roguelike/tests/foes.og.ts +45 -0
- package/archetypes/roguelike/tests/frames.og.ts +32 -0
- package/archetypes/roguelike/tests/frames.ts +134 -0
- package/archetypes/roguelike/tests/lib.ts +83 -0
- package/archetypes/roguelike/tests/lose.og.ts +44 -0
- package/archetypes/roguelike/tests/pad.og.ts +54 -0
- package/archetypes/roguelike/tests/pause.og.ts +59 -0
- package/archetypes/roguelike/tests/phone.og.ts +54 -0
- package/archetypes/roguelike/tests/replay.og.ts +24 -0
- package/archetypes/roguelike/tests/win.og.ts +60 -0
- package/archetypes/roguelike/tools/make-assets.py +518 -0
- package/archetypes/roguelike/tools/oglite.py +285 -0
- package/archetypes/roguelike/tsconfig.json +17 -0
- package/archetypes/runner/.origin/setup +14 -0
- package/archetypes/runner/LICENSES.md +10 -0
- package/archetypes/runner/README.md +225 -0
- package/archetypes/runner/assets/audio/coin.wav +0 -0
- package/archetypes/runner/assets/audio/crash.wav +0 -0
- package/archetypes/runner/assets/audio/hold.ogt +9 -0
- package/archetypes/runner/assets/audio/jump.wav +0 -0
- package/archetypes/runner/assets/audio/start.wav +0 -0
- package/archetypes/runner/assets/fonts/OFL.txt +93 -0
- package/archetypes/runner/assets/fonts/ui.ttf +0 -0
- package/archetypes/runner/assets/fonts/ui.ttf.ogt +11 -0
- package/archetypes/runner/assets/maps/far.ogt +25 -0
- package/archetypes/runner/assets/maps/near.ogt +25 -0
- package/archetypes/runner/assets/maps/roofs.ogt +19 -0
- package/archetypes/runner/assets/scenes/main.ogt +35 -0
- package/archetypes/runner/assets/sprites/coin.ogt +11 -0
- package/archetypes/runner/assets/sprites/coin.png +0 -0
- package/archetypes/runner/assets/sprites/coin.png.ogt +7 -0
- package/archetypes/runner/assets/sprites/courier.ogt +32 -0
- package/archetypes/runner/assets/sprites/courier.png +0 -0
- package/archetypes/runner/assets/sprites/courier.png.ogt +7 -0
- package/archetypes/runner/assets/sprites/props.ogt +21 -0
- package/archetypes/runner/assets/sprites/props.png +0 -0
- package/archetypes/runner/assets/sprites/props.png.ogt +7 -0
- package/archetypes/runner/assets/sprites/sky.png +0 -0
- package/archetypes/runner/assets/sprites/sky.png.ogt +7 -0
- package/archetypes/runner/assets/tiles/city.ogt +18 -0
- package/archetypes/runner/assets/tiles/city.png +0 -0
- package/archetypes/runner/assets/tiles/city.png.ogt +7 -0
- package/archetypes/runner/gitattributes +22 -0
- package/archetypes/runner/host.d.ts +46 -0
- package/archetypes/runner/package.json +18 -0
- package/archetypes/runner/project.ogt +18 -0
- package/archetypes/runner/references/metal/frames-coin.png +0 -0
- package/archetypes/runner/references/metal/frames-crash.png +0 -0
- package/archetypes/runner/references/metal/frames-title.png +0 -0
- package/archetypes/runner/src/art.ts +57 -0
- package/archetypes/runner/src/components.ts +94 -0
- package/archetypes/runner/src/main.ts +241 -0
- package/archetypes/runner/src/systems.ts +553 -0
- package/archetypes/runner/tests/coins.og.ts +30 -0
- package/archetypes/runner/tests/flow.og.ts +72 -0
- package/archetypes/runner/tests/frames.og.ts +37 -0
- package/archetypes/runner/tests/frames.ts +134 -0
- package/archetypes/runner/tests/jump.og.ts +44 -0
- package/archetypes/runner/tests/lib.ts +42 -0
- package/archetypes/runner/tests/records.og.ts +43 -0
- package/archetypes/runner/tests/replay.og.ts +36 -0
- package/archetypes/runner/tests/sounds.og.ts +43 -0
- package/archetypes/runner/tests/tune.og.ts +36 -0
- package/archetypes/runner/tools/make-assets.py +603 -0
- package/archetypes/runner/tools/oglite.py +285 -0
- package/archetypes/runner/tsconfig.json +17 -0
- package/archetypes/third-person/.origin/setup +14 -0
- package/archetypes/third-person/LICENSES.md +23 -0
- package/archetypes/third-person/README.md +249 -0
- package/archetypes/third-person/assets/ai/sentinel-east.ogt +69 -0
- package/archetypes/third-person/assets/ai/sentinel-north.ogt +69 -0
- package/archetypes/third-person/assets/ai/sentinel-west.ogt +69 -0
- package/archetypes/third-person/assets/anims/humanoid-clips.glb +0 -0
- package/archetypes/third-person/assets/audio/alarm.wav +0 -0
- package/archetypes/third-person/assets/audio/dawn.wav +0 -0
- package/archetypes/third-person/assets/audio/grab.wav +0 -0
- package/archetypes/third-person/assets/audio/ignite.wav +0 -0
- package/archetypes/third-person/assets/audio/jump.wav +0 -0
- package/archetypes/third-person/assets/audio/night.wav +0 -0
- package/archetypes/third-person/assets/audio/splash.wav +0 -0
- package/archetypes/third-person/assets/audio/step.ogt +9 -0
- package/archetypes/third-person/assets/audio/ui-close.ogt +9 -0
- package/archetypes/third-person/assets/audio/ui-error.ogt +9 -0
- package/archetypes/third-person/assets/audio/ui-open.ogt +9 -0
- package/archetypes/third-person/assets/audio/ui-press.ogt +9 -0
- package/archetypes/third-person/assets/audio/ui-success.ogt +9 -0
- package/archetypes/third-person/assets/audio/vale.wav +0 -0
- package/archetypes/third-person/assets/fonts/NotoSansSC-subset.ttf +0 -0
- package/archetypes/third-person/assets/fonts/NotoSansSC-subset.ttf.ogt +10 -0
- package/archetypes/third-person/assets/fonts/OFL.txt +93 -0
- package/archetypes/third-person/assets/fx/burst.ogt +25 -0
- package/archetypes/third-person/assets/fx/fire.ogt +24 -0
- package/archetypes/third-person/assets/fx/smoke.ogt +24 -0
- package/archetypes/third-person/assets/fx/splash.ogt +24 -0
- package/archetypes/third-person/assets/luts/teal-orange.cube +4917 -0
- package/archetypes/third-person/assets/models/stout.glb +0 -0
- package/archetypes/third-person/assets/models/strider.glb +0 -0
- package/archetypes/third-person/assets/models/strider.glb.ogt +9 -0
- package/archetypes/third-person/assets/nav/vale.ogt +43 -0
- package/archetypes/third-person/assets/rigs/strider.ogt +6 -0
- package/archetypes/third-person/assets/skins/ember/Cinzel-Bold.ttf +0 -0
- package/archetypes/third-person/assets/skins/ember/Cinzel-Bold.ttf.ogt +9 -0
- package/archetypes/third-person/assets/skins/ember/LICENSES.md +13 -0
- package/archetypes/third-person/assets/skins/ember/Newsreader-Medium.ttf +0 -0
- package/archetypes/third-person/assets/skins/ember/Newsreader-Medium.ttf.ogt +9 -0
- package/archetypes/third-person/assets/skins/ember/OFL.txt +94 -0
- package/archetypes/third-person/assets/skins/ember/atlas.png +0 -0
- package/archetypes/third-person/assets/skins/ember/atlas.png.ogt +7 -0
- package/archetypes/third-person/assets/skins/ember/icons.png +0 -0
- package/archetypes/third-person/assets/skins/ember/icons.png.ogt +7 -0
- package/archetypes/third-person/assets/skins/ember/skin.ogt +109 -0
- package/archetypes/third-person/assets/strings/en.ogt +47 -0
- package/archetypes/third-person/assets/strings/zh-CN.ogt +47 -0
- package/archetypes/third-person/assets/terrain/vale-control.png +0 -0
- package/archetypes/third-person/assets/terrain/vale.ogt +42 -0
- package/archetypes/third-person/assets/terrain/vale.png +0 -0
- package/archetypes/third-person/assets/textures/decals.png +0 -0
- package/archetypes/third-person/assets/textures/flame.png +0 -0
- package/archetypes/third-person/assets/textures/smoke.png +0 -0
- package/archetypes/third-person/assets/textures/spark.png +0 -0
- package/archetypes/third-person/assets/textures/terrain-grass.png +0 -0
- package/archetypes/third-person/assets/textures/terrain-path.png +0 -0
- package/archetypes/third-person/assets/textures/terrain-rock.png +0 -0
- package/archetypes/third-person/assets/textures/terrain-sand.png +0 -0
- package/archetypes/third-person/gitattributes +22 -0
- package/archetypes/third-person/host.d.ts +46 -0
- package/archetypes/third-person/package.json +18 -0
- package/archetypes/third-person/project.ogt +14 -0
- package/archetypes/third-person/references/metal/beacon.png +0 -0
- package/archetypes/third-person/references/metal/dawn.png +0 -0
- package/archetypes/third-person/references/metal/title.png +0 -0
- package/archetypes/third-person/references/webgl2/beacon.png +0 -0
- package/archetypes/third-person/src/anim.ts +87 -0
- package/archetypes/third-person/src/beacons.ts +80 -0
- package/archetypes/third-person/src/components.ts +148 -0
- package/archetypes/third-person/src/hero.ts +293 -0
- package/archetypes/third-person/src/main.ts +164 -0
- package/archetypes/third-person/src/sentinels.ts +159 -0
- package/archetypes/third-person/src/sound.ts +66 -0
- package/archetypes/third-person/src/ui.ts +451 -0
- package/archetypes/third-person/src/world.ts +212 -0
- package/archetypes/third-person/tests/flow.og.ts +70 -0
- package/archetypes/third-person/tests/frames.og.ts +35 -0
- package/archetypes/third-person/tests/frames.ts +134 -0
- package/archetypes/third-person/tests/hitstop.og.ts +26 -0
- package/archetypes/third-person/tests/lib.ts +87 -0
- package/archetypes/third-person/tests/lose.og.ts +44 -0
- package/archetypes/third-person/tests/pause.og.ts +64 -0
- package/archetypes/third-person/tests/phone.og.ts +65 -0
- package/archetypes/third-person/tests/replay.og.ts +32 -0
- package/archetypes/third-person/tests/restart.og.ts +28 -0
- package/archetypes/third-person/tests/sentinels.og.ts +48 -0
- package/archetypes/third-person/tests/win.og.ts +62 -0
- package/archetypes/third-person/tools/make-assets.py +353 -0
- package/archetypes/third-person/tools/oglite.py +285 -0
- package/archetypes/third-person/tsconfig.json +17 -0
- package/archetypes/topdown/.origin/setup +14 -0
- package/archetypes/topdown/LICENSES.md +10 -0
- package/archetypes/topdown/README.md +235 -0
- package/archetypes/topdown/assets/ai/slime.ogt +49 -0
- package/archetypes/topdown/assets/audio/coin.wav +0 -0
- package/archetypes/topdown/assets/audio/door.wav +0 -0
- package/archetypes/topdown/assets/audio/hit.wav +0 -0
- package/archetypes/topdown/assets/audio/hurt.wav +0 -0
- package/archetypes/topdown/assets/audio/key.wav +0 -0
- package/archetypes/topdown/assets/audio/step.ogt +9 -0
- package/archetypes/topdown/assets/fonts/OFL.txt +93 -0
- package/archetypes/topdown/assets/fonts/ui.ttf +0 -0
- package/archetypes/topdown/assets/fonts/ui.ttf.ogt +9 -0
- package/archetypes/topdown/assets/maps/tomb.tmj +2183 -0
- package/archetypes/topdown/assets/sprites/hero.ogt +58 -0
- package/archetypes/topdown/assets/sprites/hero.png +0 -0
- package/archetypes/topdown/assets/sprites/hero.png.ogt +7 -0
- package/archetypes/topdown/assets/sprites/items.ogt +15 -0
- package/archetypes/topdown/assets/sprites/items.png +0 -0
- package/archetypes/topdown/assets/sprites/items.png.ogt +7 -0
- package/archetypes/topdown/assets/sprites/slime.ogt +17 -0
- package/archetypes/topdown/assets/sprites/slime.png +0 -0
- package/archetypes/topdown/assets/sprites/slime.png.ogt +7 -0
- package/archetypes/topdown/assets/tiles/dungeon.ogt +65 -0
- package/archetypes/topdown/assets/tiles/dungeon.png +0 -0
- package/archetypes/topdown/assets/tiles/dungeon.png.ogt +7 -0
- package/archetypes/topdown/gitattributes +22 -0
- package/archetypes/topdown/host.d.ts +46 -0
- package/archetypes/topdown/package.json +18 -0
- package/archetypes/topdown/project.ogt +14 -0
- package/archetypes/topdown/references/metal/crit.png +0 -0
- package/archetypes/topdown/references/metal/dash.png +0 -0
- package/archetypes/topdown/references/metal/east.png +0 -0
- package/archetypes/topdown/references/metal/start.png +0 -0
- package/archetypes/topdown/src/art.ts +48 -0
- package/archetypes/topdown/src/components.ts +128 -0
- package/archetypes/topdown/src/main.ts +275 -0
- package/archetypes/topdown/src/systems.ts +503 -0
- package/archetypes/topdown/tests/ai.og.ts +64 -0
- package/archetypes/topdown/tests/combat.og.ts +72 -0
- package/archetypes/topdown/tests/door.og.ts +62 -0
- package/archetypes/topdown/tests/flee.og.ts +49 -0
- package/archetypes/topdown/tests/frames.og.ts +45 -0
- package/archetypes/topdown/tests/frames.ts +134 -0
- package/archetypes/topdown/tests/lib.ts +71 -0
- package/archetypes/topdown/tests/replay.og.ts +40 -0
- package/archetypes/topdown/tests/walk.og.ts +46 -0
- package/archetypes/topdown/tools/make-assets.py +623 -0
- package/archetypes/topdown/tools/oglite.py +285 -0
- package/archetypes/topdown/tsconfig.json +17 -0
- package/archetypes/tower-defense/.origin/setup +14 -0
- package/archetypes/tower-defense/LICENSES.md +15 -0
- package/archetypes/tower-defense/README.md +240 -0
- package/archetypes/tower-defense/assets/ai/plant.ogt +16 -0
- package/archetypes/tower-defense/assets/audio/clear.wav +0 -0
- package/archetypes/tower-defense/assets/audio/frost.wav +0 -0
- package/archetypes/tower-defense/assets/audio/leak.wav +0 -0
- package/archetypes/tower-defense/assets/audio/lost.wav +0 -0
- package/archetypes/tower-defense/assets/audio/night.wav +0 -0
- package/archetypes/tower-defense/assets/audio/plant.wav +0 -0
- package/archetypes/tower-defense/assets/audio/pop.wav +0 -0
- package/archetypes/tower-defense/assets/audio/thorn.wav +0 -0
- package/archetypes/tower-defense/assets/audio/ui-close.ogt +9 -0
- package/archetypes/tower-defense/assets/audio/ui-error.ogt +9 -0
- package/archetypes/tower-defense/assets/audio/ui-open.ogt +9 -0
- package/archetypes/tower-defense/assets/audio/ui-press.ogt +9 -0
- package/archetypes/tower-defense/assets/audio/ui-success.ogt +9 -0
- package/archetypes/tower-defense/assets/audio/wave.wav +0 -0
- package/archetypes/tower-defense/assets/audio/won.wav +0 -0
- package/archetypes/tower-defense/assets/fonts/NotoSansSC-subset.ttf +0 -0
- package/archetypes/tower-defense/assets/fonts/NotoSansSC-subset.ttf.ogt +10 -0
- package/archetypes/tower-defense/assets/fonts/OFL.txt +93 -0
- package/archetypes/tower-defense/assets/fx/fireflies.ogt +21 -0
- package/archetypes/tower-defense/assets/fx/pop.ogt +21 -0
- package/archetypes/tower-defense/assets/maps/garden.ogt +91 -0
- package/archetypes/tower-defense/assets/skins/pathguard/Fredoka-SemiBold.ttf +0 -0
- package/archetypes/tower-defense/assets/skins/pathguard/Fredoka-SemiBold.ttf.ogt +9 -0
- package/archetypes/tower-defense/assets/skins/pathguard/LICENSES.md +13 -0
- package/archetypes/tower-defense/assets/skins/pathguard/LilitaOne-Regular.ttf +0 -0
- package/archetypes/tower-defense/assets/skins/pathguard/LilitaOne-Regular.ttf.ogt +9 -0
- package/archetypes/tower-defense/assets/skins/pathguard/OFL.txt +94 -0
- package/archetypes/tower-defense/assets/skins/pathguard/atlas.png +0 -0
- package/archetypes/tower-defense/assets/skins/pathguard/atlas.png.ogt +7 -0
- package/archetypes/tower-defense/assets/skins/pathguard/icons.png +0 -0
- package/archetypes/tower-defense/assets/skins/pathguard/icons.png.ogt +7 -0
- package/archetypes/tower-defense/assets/skins/pathguard/skin.ogt +111 -0
- package/archetypes/tower-defense/assets/sprites/garden.ogt +66 -0
- package/archetypes/tower-defense/assets/sprites/garden.png +0 -0
- package/archetypes/tower-defense/assets/sprites/garden.png.ogt +7 -0
- package/archetypes/tower-defense/assets/sprites/glow.png +0 -0
- package/archetypes/tower-defense/assets/sprites/glow.png.ogt +7 -0
- package/archetypes/tower-defense/assets/sprites/ring.png +0 -0
- package/archetypes/tower-defense/assets/sprites/ring.png.ogt +7 -0
- package/archetypes/tower-defense/assets/sprites/spark.png +0 -0
- package/archetypes/tower-defense/assets/sprites/spark.png.ogt +7 -0
- package/archetypes/tower-defense/assets/strings/en.ogt +47 -0
- package/archetypes/tower-defense/assets/strings/zh-CN.ogt +47 -0
- package/archetypes/tower-defense/assets/tiles/garden.ogt +10 -0
- package/archetypes/tower-defense/assets/tiles/garden.png +0 -0
- package/archetypes/tower-defense/assets/tiles/garden.png.ogt +7 -0
- package/archetypes/tower-defense/gitattributes +22 -0
- package/archetypes/tower-defense/host.d.ts +46 -0
- package/archetypes/tower-defense/package.json +18 -0
- package/archetypes/tower-defense/project.ogt +14 -0
- package/archetypes/tower-defense/references/metal/end.png +0 -0
- package/archetypes/tower-defense/references/metal/title.png +0 -0
- package/archetypes/tower-defense/references/metal/wave.png +0 -0
- package/archetypes/tower-defense/src/art.ts +24 -0
- package/archetypes/tower-defense/src/components.ts +156 -0
- package/archetypes/tower-defense/src/main.ts +253 -0
- package/archetypes/tower-defense/src/systems.ts +658 -0
- package/archetypes/tower-defense/src/ui.ts +382 -0
- package/archetypes/tower-defense/tests/flow.og.ts +56 -0
- package/archetypes/tower-defense/tests/frames.og.ts +31 -0
- package/archetypes/tower-defense/tests/frames.ts +134 -0
- package/archetypes/tower-defense/tests/lib.ts +81 -0
- package/archetypes/tower-defense/tests/lose.og.ts +40 -0
- package/archetypes/tower-defense/tests/maze.og.ts +53 -0
- package/archetypes/tower-defense/tests/pad.og.ts +41 -0
- package/archetypes/tower-defense/tests/pause.og.ts +59 -0
- package/archetypes/tower-defense/tests/phone.og.ts +49 -0
- package/archetypes/tower-defense/tests/replay.og.ts +28 -0
- package/archetypes/tower-defense/tests/win.og.ts +58 -0
- package/archetypes/tower-defense/tools/make-assets.py +640 -0
- package/archetypes/tower-defense/tools/oglite.py +285 -0
- package/archetypes/tower-defense/tsconfig.json +17 -0
- package/bin/create.ts +496 -0
- package/looks/catalogue.json +1871 -0
- package/package.json +31 -4
- package/template/.origin/setup +14 -0
- package/template/LICENSES.md +23 -0
- package/template/README.md +37 -0
- package/template/assets/ai/guard.ogt +48 -0
- package/template/assets/audio/blip.wav +0 -0
- package/template/assets/audio/click.ogt +9 -0
- package/template/assets/fonts/NotoSansSC-Regular-subset.ttf +0 -0
- package/template/assets/fonts/NotoSansSC-Regular-subset.ttf.ogt +12 -0
- package/template/assets/fonts/OFL.txt +93 -0
- package/template/assets/looks/origin-game.ogt +12 -0
- package/template/assets/models/dropship.glb +0 -0
- package/template/assets/models/walker.glb +0 -0
- package/template/assets/nav/yard.ogt +27 -0
- package/template/assets/scenes/main.ogt +34 -0
- package/template/assets/strings/en.ogt +14 -0
- package/template/assets/textures/stone.png +0 -0
- package/template/assets/textures/stone_n.png +0 -0
- package/template/assets/textures/stone_n.png.ogt +7 -0
- package/template/gitattributes +22 -0
- package/template/package.json +18 -0
- package/template/project.ogt +25 -0
- package/template/src/main.ts +246 -0
- package/template/tests/guard.og.ts +67 -0
- package/template/tests/smoke.og.ts +43 -0
- package/template/tsconfig.json +17 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
type scene
|
|
2
|
+
version 1
|
|
3
|
+
---
|
|
4
|
+
# The match3 scene: the board, with the round's tuning. `start` in
|
|
5
|
+
# src/main.ts gives it its nine-sliced panel and adds the backdrop, the
|
|
6
|
+
# checker tilemap, the 49 gems and the selection frame.
|
|
7
|
+
name "Main"
|
|
8
|
+
entity "board" {
|
|
9
|
+
Transform {
|
|
10
|
+
position 0 -0.4 -2
|
|
11
|
+
quaternion 0 0 0 1
|
|
12
|
+
scale 1 1 1
|
|
13
|
+
}
|
|
14
|
+
# Tune's parameters: edit them here, live with `set:board.Tuning.<field>=<value>`.
|
|
15
|
+
Tuning {
|
|
16
|
+
moves 20
|
|
17
|
+
target 1500
|
|
18
|
+
colours 5
|
|
19
|
+
tileScore 10
|
|
20
|
+
swapTicks 8
|
|
21
|
+
clearTicks 12
|
|
22
|
+
fallSpeed 14
|
|
23
|
+
}
|
|
24
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
type tilemap
|
|
2
|
+
version 1
|
|
3
|
+
---
|
|
4
|
+
# Written by tools/make-assets.py: the 7 x 7 checker under the gems, one world unit a cell;
|
|
5
|
+
# src/main.ts places its top-left corner at the board's.
|
|
6
|
+
size 7 7
|
|
7
|
+
tile 64 64
|
|
8
|
+
unit 1
|
|
9
|
+
tileset "sprites/cells.ogt"
|
|
10
|
+
layer cells {
|
|
11
|
+
z 0
|
|
12
|
+
legend "a" 0
|
|
13
|
+
legend "b" 1
|
|
14
|
+
row "abababa"
|
|
15
|
+
row "bababab"
|
|
16
|
+
row "abababa"
|
|
17
|
+
row "bababab"
|
|
18
|
+
row "abababa"
|
|
19
|
+
row "bababab"
|
|
20
|
+
row "abababa"
|
|
21
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
type flipbook
|
|
2
|
+
version 1
|
|
3
|
+
---
|
|
4
|
+
# Written by tools/make-assets.py. Clip 2c is colour c's idle loop, 2c + 1 its clear
|
|
5
|
+
# burst (src/art.ts relies on that order).
|
|
6
|
+
texture "gems.png"
|
|
7
|
+
filter linear
|
|
8
|
+
pivot 0.5 0.5
|
|
9
|
+
grid 80 80 8 6
|
|
10
|
+
clip idle_ruby {
|
|
11
|
+
frames 0 1 2 3
|
|
12
|
+
durations 2.4 0.05 0.06 0.05
|
|
13
|
+
mode loop
|
|
14
|
+
}
|
|
15
|
+
clip clear_ruby {
|
|
16
|
+
frames 4 5 6 7
|
|
17
|
+
fps 24
|
|
18
|
+
mode once
|
|
19
|
+
event 1 "burst"
|
|
20
|
+
}
|
|
21
|
+
clip idle_sky {
|
|
22
|
+
frames 8 9 10 11
|
|
23
|
+
durations 2.4 0.05 0.06 0.05
|
|
24
|
+
mode loop
|
|
25
|
+
}
|
|
26
|
+
clip clear_sky {
|
|
27
|
+
frames 12 13 14 15
|
|
28
|
+
fps 24
|
|
29
|
+
mode once
|
|
30
|
+
event 1 "burst"
|
|
31
|
+
}
|
|
32
|
+
clip idle_leaf {
|
|
33
|
+
frames 16 17 18 19
|
|
34
|
+
durations 2.4 0.05 0.06 0.05
|
|
35
|
+
mode loop
|
|
36
|
+
}
|
|
37
|
+
clip clear_leaf {
|
|
38
|
+
frames 20 21 22 23
|
|
39
|
+
fps 24
|
|
40
|
+
mode once
|
|
41
|
+
event 1 "burst"
|
|
42
|
+
}
|
|
43
|
+
clip idle_sun {
|
|
44
|
+
frames 24 25 26 27
|
|
45
|
+
durations 2.4 0.05 0.06 0.05
|
|
46
|
+
mode loop
|
|
47
|
+
}
|
|
48
|
+
clip clear_sun {
|
|
49
|
+
frames 28 29 30 31
|
|
50
|
+
fps 24
|
|
51
|
+
mode once
|
|
52
|
+
event 1 "burst"
|
|
53
|
+
}
|
|
54
|
+
clip idle_plum {
|
|
55
|
+
frames 32 33 34 35
|
|
56
|
+
durations 2.4 0.05 0.06 0.05
|
|
57
|
+
mode loop
|
|
58
|
+
}
|
|
59
|
+
clip clear_plum {
|
|
60
|
+
frames 36 37 38 39
|
|
61
|
+
fps 24
|
|
62
|
+
mode once
|
|
63
|
+
event 1 "burst"
|
|
64
|
+
}
|
|
65
|
+
clip idle_coral {
|
|
66
|
+
frames 40 41 42 43
|
|
67
|
+
durations 2.4 0.05 0.06 0.05
|
|
68
|
+
mode loop
|
|
69
|
+
}
|
|
70
|
+
clip clear_coral {
|
|
71
|
+
frames 44 45 46 47
|
|
72
|
+
fps 24
|
|
73
|
+
mode once
|
|
74
|
+
event 1 "burst"
|
|
75
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Media to Git LFS, as the platform's other scaffolds route them; text stays
|
|
2
|
+
# diffable (.ogt scenes and settings are line-based text by design).
|
|
3
|
+
*.glb filter=lfs diff=lfs merge=lfs -text
|
|
4
|
+
*.gltf filter=lfs diff=lfs merge=lfs -text
|
|
5
|
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
|
6
|
+
*.png filter=lfs diff=lfs merge=lfs -text
|
|
7
|
+
*.jpg filter=lfs diff=lfs merge=lfs -text
|
|
8
|
+
*.jpeg filter=lfs diff=lfs merge=lfs -text
|
|
9
|
+
*.webp filter=lfs diff=lfs merge=lfs -text
|
|
10
|
+
*.ktx2 filter=lfs diff=lfs merge=lfs -text
|
|
11
|
+
*.hdr filter=lfs diff=lfs merge=lfs -text
|
|
12
|
+
*.exr filter=lfs diff=lfs merge=lfs -text
|
|
13
|
+
*.wav filter=lfs diff=lfs merge=lfs -text
|
|
14
|
+
*.mp3 filter=lfs diff=lfs merge=lfs -text
|
|
15
|
+
*.ogg filter=lfs diff=lfs merge=lfs -text
|
|
16
|
+
*.flac filter=lfs diff=lfs merge=lfs -text
|
|
17
|
+
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
|
18
|
+
*.ttf filter=lfs diff=lfs merge=lfs -text
|
|
19
|
+
*.otf filter=lfs diff=lfs merge=lfs -text
|
|
20
|
+
*.woff2 filter=lfs diff=lfs merge=lfs -text
|
|
21
|
+
*.ogt text eol=lf
|
|
22
|
+
*.ts text eol=lf
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// The host this project's playtest helpers (tests/*.ts) touch under bun:
|
|
2
|
+
// `node:` modules, `process`, `Buffer`, `TextEncoder`, `import.meta.url`.
|
|
3
|
+
// Declared here because the project type-checks with `types: []` (no
|
|
4
|
+
// @types/node, no bun-types): `og check` reads them through tsconfig.json's
|
|
5
|
+
// include. Game code (src/) uses none of them.
|
|
6
|
+
|
|
7
|
+
declare module "node:fs" {
|
|
8
|
+
export function existsSync(path: string): boolean;
|
|
9
|
+
export function readFileSync(path: string): Uint8Array;
|
|
10
|
+
export function readFileSync(path: string, encoding: string): string;
|
|
11
|
+
export function writeFileSync(path: string, data: string | Uint8Array): void;
|
|
12
|
+
export function mkdirSync(path: string, options?: { recursive?: boolean }): void;
|
|
13
|
+
export function copyFileSync(from: string, to: string): void;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
declare module "node:path" {
|
|
17
|
+
export function dirname(path: string): string;
|
|
18
|
+
export function join(...parts: string[]): string;
|
|
19
|
+
export function resolve(...parts: string[]): string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
declare module "node:url" {
|
|
23
|
+
export function fileURLToPath(url: string | URL): string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
declare module "node:zlib" {
|
|
27
|
+
export function inflateSync(data: Uint8Array): Uint8Array;
|
|
28
|
+
export function deflateSync(data: Uint8Array, options?: { level?: number }): Uint8Array;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
declare const process: {
|
|
32
|
+
readonly env: Record<string, string | undefined>;
|
|
33
|
+
cwd(): string;
|
|
34
|
+
readonly stdout: { write(text: string): boolean };
|
|
35
|
+
};
|
|
36
|
+
declare const Buffer: { concat(chunks: readonly Uint8Array[]): Uint8Array };
|
|
37
|
+
declare class TextEncoder {
|
|
38
|
+
encode(text: string): Uint8Array;
|
|
39
|
+
}
|
|
40
|
+
declare class URL {
|
|
41
|
+
constructor(url: string, base?: string | URL);
|
|
42
|
+
readonly href: string;
|
|
43
|
+
}
|
|
44
|
+
interface ImportMeta {
|
|
45
|
+
readonly url: string;
|
|
46
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "origin-match3",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "og dev .",
|
|
8
|
+
"start": "og run .",
|
|
9
|
+
"build": "og build .",
|
|
10
|
+
"publish-build": "og build . --publish",
|
|
11
|
+
"cook": "og cook .",
|
|
12
|
+
"check": "og check .",
|
|
13
|
+
"test": "og test ."
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@origingame/engine": "0.1.0"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// The art: assets/sprites, written by tools/make-assets.py and loaded once in
|
|
2
|
+
// `start`. The gems are one flipbook sheet (gems.ogt over gems.png): clip 2c
|
|
3
|
+
// is colour c's idle loop (a long hold, then a glint), clip 2c + 1 its clear
|
|
4
|
+
// burst (once). The board is a nine-sliced panel with a hand-written 7 x 7
|
|
5
|
+
// tilemap of checker cells on it; the selection frame and the backdrop are
|
|
6
|
+
// plain textures.
|
|
7
|
+
|
|
8
|
+
import { og } from "@origingame/engine";
|
|
9
|
+
import type { FlipbookSheet, Texture, TilemapAsset, World } from "@origingame/engine";
|
|
10
|
+
|
|
11
|
+
/** Gem colours, by Piece.colour. Six cuts, so colour is never the only cue. */
|
|
12
|
+
export const GEMS = ["ruby", "sky", "leaf", "sun", "plum", "coral"] as const;
|
|
13
|
+
|
|
14
|
+
/** The idle clip of a colour (an index into the sheet's clips). */
|
|
15
|
+
export const idleClip = (colour: number): number => colour * 2;
|
|
16
|
+
/** The clear burst of a colour. */
|
|
17
|
+
export const clearClip = (colour: number): number => colour * 2 + 1;
|
|
18
|
+
|
|
19
|
+
/** Seconds of one idle cycle (gems.ogt: 2.4 s of hold, then 0.16 s of glint). */
|
|
20
|
+
export const IDLE_CYCLE = 2.56;
|
|
21
|
+
|
|
22
|
+
/** The panel's nine-slice insets in texture pixels (tools/make-assets.py PANEL_INSET). */
|
|
23
|
+
export const PANEL_INSET = 32;
|
|
24
|
+
|
|
25
|
+
export interface Art {
|
|
26
|
+
readonly gems: FlipbookSheet;
|
|
27
|
+
readonly gemTexture: Texture;
|
|
28
|
+
readonly panel: Texture;
|
|
29
|
+
readonly backdrop: Texture;
|
|
30
|
+
readonly ring: Texture;
|
|
31
|
+
readonly board: TilemapAsset;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function must<T>(r: { ok: true; value: T } | { ok: false; reason: string }, what: string): T {
|
|
35
|
+
if (!r.ok) throw new Error(`${what}: ${r.reason} (run tools/make-assets.py and og cook)`);
|
|
36
|
+
return r.value;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function loadArt(world: World): Art {
|
|
40
|
+
const sheet = must(og.load.flipbook(world, "sprites/gems.ogt"), "sprites/gems.ogt");
|
|
41
|
+
GEMS.forEach((name, c) => {
|
|
42
|
+
if (sheet.clips[idleClip(c)]?.name !== `idle_${name}` || sheet.clips[clearClip(c)]?.name !== `clear_${name}`) {
|
|
43
|
+
throw new Error(`sprites/gems.ogt does not list idle_${name} and clear_${name} as clips ${idleClip(c)} and ${clearClip(c)}`);
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
return {
|
|
47
|
+
gems: sheet.sheet,
|
|
48
|
+
gemTexture: sheet.texture,
|
|
49
|
+
panel: must(og.load.texture(world, "sprites/panel.png"), "sprites/panel.png"),
|
|
50
|
+
backdrop: must(og.load.texture(world, "sprites/backdrop.png"), "sprites/backdrop.png"),
|
|
51
|
+
ring: must(og.load.texture(world, "sprites/ring.png"), "sprites/ring.png"),
|
|
52
|
+
board: must(og.load.tilemap(world, "sprites/board.ogt"), "sprites/board.ogt").map,
|
|
53
|
+
};
|
|
54
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
// Pure board logic over a colour grid: line detection, the "is there a move"
|
|
2
|
+
// test and the deal. A grid is SIZE * SIZE colour indices, row-major from the
|
|
3
|
+
// bottom row (cell = row * SIZE + col); -1 is an empty cell. Nothing here
|
|
4
|
+
// touches the world, so systems and commands share it.
|
|
5
|
+
|
|
6
|
+
import { SIZE } from "./layout.ts";
|
|
7
|
+
|
|
8
|
+
export type Grid = Int32Array;
|
|
9
|
+
|
|
10
|
+
export const cellOf = (col: number, row: number) => row * SIZE + col;
|
|
11
|
+
export const colOf = (cell: number) => cell % SIZE;
|
|
12
|
+
export const rowOf = (cell: number) => Math.floor(cell / SIZE);
|
|
13
|
+
|
|
14
|
+
/** Whether two cells share an edge. */
|
|
15
|
+
export function adjacent(a: number, b: number): boolean {
|
|
16
|
+
if (a < 0 || b < 0) return false;
|
|
17
|
+
const dc = Math.abs(colOf(a) - colOf(b));
|
|
18
|
+
const dr = Math.abs(rowOf(a) - rowOf(b));
|
|
19
|
+
return dc + dr === 1;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/** Cells in horizontal or vertical runs of three or more of one colour. */
|
|
23
|
+
export function findLines(g: Grid): Uint8Array {
|
|
24
|
+
const marked = new Uint8Array(SIZE * SIZE);
|
|
25
|
+
for (let r = 0; r < SIZE; r++) {
|
|
26
|
+
for (let c = 0; c < SIZE; ) {
|
|
27
|
+
const colour = g[cellOf(c, r)]!;
|
|
28
|
+
let n = 1;
|
|
29
|
+
while (c + n < SIZE && colour >= 0 && g[cellOf(c + n, r)] === colour) n++;
|
|
30
|
+
if (colour >= 0 && n >= 3) for (let k = 0; k < n; k++) marked[cellOf(c + k, r)] = 1;
|
|
31
|
+
c += n;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
for (let c = 0; c < SIZE; c++) {
|
|
35
|
+
for (let r = 0; r < SIZE; ) {
|
|
36
|
+
const colour = g[cellOf(c, r)]!;
|
|
37
|
+
let n = 1;
|
|
38
|
+
while (r + n < SIZE && colour >= 0 && g[cellOf(c, r + n)] === colour) n++;
|
|
39
|
+
if (colour >= 0 && n >= 3) for (let k = 0; k < n; k++) marked[cellOf(c, r + k)] = 1;
|
|
40
|
+
r += n;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return marked;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function count(marked: Uint8Array): number {
|
|
47
|
+
let n = 0;
|
|
48
|
+
for (const m of marked) n += m;
|
|
49
|
+
return n;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/** Whether some swap of neighbours makes a line. */
|
|
53
|
+
export function hasMove(g: Grid): boolean {
|
|
54
|
+
const t = Int32Array.from(g);
|
|
55
|
+
for (let cell = 0; cell < SIZE * SIZE; cell++) {
|
|
56
|
+
for (const other of [cell + 1, cell + SIZE]) {
|
|
57
|
+
if (other >= SIZE * SIZE || !adjacent(cell, other)) continue;
|
|
58
|
+
[t[cell], t[other]] = [t[other]!, t[cell]!];
|
|
59
|
+
const lines = count(findLines(t)) > 0;
|
|
60
|
+
[t[cell], t[other]] = [t[other]!, t[cell]!];
|
|
61
|
+
if (lines) return true;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/** A source of dice: Rng or an RngStream. */
|
|
68
|
+
export interface Dice {
|
|
69
|
+
integer(low: number, high: number): number;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* A fresh board from the dice: no ready line, at least one move. A cell's
|
|
74
|
+
* colour is redrawn while it would complete a line with the two cells to its
|
|
75
|
+
* left or below it; the whole board is redrawn while it has no move.
|
|
76
|
+
*/
|
|
77
|
+
export function deal(dice: Dice, colours: number): Grid {
|
|
78
|
+
const g = new Int32Array(SIZE * SIZE);
|
|
79
|
+
for (let attempt = 0; ; attempt++) {
|
|
80
|
+
for (let r = 0; r < SIZE; r++) {
|
|
81
|
+
for (let c = 0; c < SIZE; c++) {
|
|
82
|
+
let colour = dice.integer(0, colours - 1);
|
|
83
|
+
for (let k = 0; k < 8 && makesLine(g, c, r, colour); k++) colour = dice.integer(0, colours - 1);
|
|
84
|
+
if (makesLine(g, c, r, colour)) colour = (colour + 1) % colours;
|
|
85
|
+
if (makesLine(g, c, r, colour)) colour = (colour + 1) % colours;
|
|
86
|
+
g[cellOf(c, r)] = colour;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
if (hasMove(g) || attempt >= 20) return g;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function makesLine(g: Grid, c: number, r: number, colour: number): boolean {
|
|
94
|
+
const left = c >= 2 && g[cellOf(c - 1, r)] === colour && g[cellOf(c - 2, r)] === colour;
|
|
95
|
+
const below = r >= 2 && g[cellOf(c, r - 1)] === colour && g[cellOf(c, r - 2)] === colour;
|
|
96
|
+
return left || below;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/** A board written as text: SIZE lines of SIZE digits, the top row first (as it reads on screen), `/` between lines. */
|
|
100
|
+
export function parseBoard(text: string, colours: number): Grid | string {
|
|
101
|
+
const lines = text.split("/");
|
|
102
|
+
if (lines.length !== SIZE || lines.some((l) => l.length !== SIZE)) return `write ${SIZE} lines of ${SIZE} digits joined by '/', the top row first`;
|
|
103
|
+
const g = new Int32Array(SIZE * SIZE);
|
|
104
|
+
for (let i = 0; i < SIZE; i++) {
|
|
105
|
+
for (let c = 0; c < SIZE; c++) {
|
|
106
|
+
const d = Number(lines[i]![c]);
|
|
107
|
+
if (!Number.isInteger(d) || d < 0 || d >= colours) return `'${lines[i]![c]}' is not a colour index below ${colours}`;
|
|
108
|
+
g[cellOf(c, SIZE - 1 - i)] = d;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
return g;
|
|
112
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
// Every piece of game state lives in these reflected components: dumps, the
|
|
2
|
+
// probe, Tune and the command channel's `set` read and write them by name.
|
|
3
|
+
//
|
|
4
|
+
// Why every row carries Match and Tuning: a system sees exactly one query
|
|
5
|
+
// (the AND of the components it declares), and inside a system the engine
|
|
6
|
+
// reaches no other entity (a game resource it declares, yes). So the systems that
|
|
7
|
+
// swap, clear and refill tiles must see the round's state on the same rows
|
|
8
|
+
// as the tiles. Every row is spawned with the same six components
|
|
9
|
+
// (og.Transform, og.Sprite, og.Flipbook, Piece, Match, Tuning) and the row whose
|
|
10
|
+
// Piece.kind is Kind.Board, the entity named "board", is the authority: the
|
|
11
|
+
// other rows' Match and Tuning keep their defaults and nothing reads them.
|
|
12
|
+
// Tune and `set:board.Tuning.<field>=<value>` write that row.
|
|
13
|
+
|
|
14
|
+
import { bool, defineComponent, defineResource, f32, f64, i32, u32 } from "@origingame/engine";
|
|
15
|
+
|
|
16
|
+
import { SIZE } from "./layout.ts";
|
|
17
|
+
|
|
18
|
+
/** What a row is. */
|
|
19
|
+
export const Kind = { Backdrop: 1, Board: 2, Cell: 3, Tile: 4, Cursor: 5 } as const;
|
|
20
|
+
|
|
21
|
+
/** Round phases. */
|
|
22
|
+
export const Phase = { Title: 0, Idle: 1, Swap: 2, SwapBack: 3, Clear: 4, Fall: 5, Won: 6, Lost: 7 } as const;
|
|
23
|
+
export const PHASE_NAMES = ["title", "idle", "swap", "swapBack", "clear", "fall", "won", "lost"] as const;
|
|
24
|
+
|
|
25
|
+
/** One row: a tile (its cell and colour), or the board, a cell, the cursor or the backdrop. */
|
|
26
|
+
export const Piece = defineComponent("Piece", {
|
|
27
|
+
kind: u32(0, { doc: "Kind.* of src/components.ts." }),
|
|
28
|
+
col: i32(0, { min: 0, max: SIZE - 1, doc: "The tile's column, 0 at the left." }),
|
|
29
|
+
row: i32(0, { min: 0, max: SIZE - 1, doc: "The tile's row, 0 at the bottom." }),
|
|
30
|
+
colour: i32(-1, { min: -1, max: 5, doc: "The tile's colour index (art.ts GEMS); -1 is an empty cell." }),
|
|
31
|
+
marked: bool(false, { doc: "Part of a line being cleared this step." }),
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
/** og.TweenCompleted tags: the tween group a phase waits for (Match.wait). */
|
|
35
|
+
export const Tag = { None: 0, Swap: 1, SwapBack: 2, Clear: 3, Fall: 4, Deal: 5 } as const;
|
|
36
|
+
|
|
37
|
+
/** The round. Authoritative on the board row. Cells are indexed row * SIZE + col; -1 is none. */
|
|
38
|
+
export const Match = defineComponent("Match", {
|
|
39
|
+
phase: u32(Phase.Title, { doc: "PHASE_NAMES[phase]." }),
|
|
40
|
+
phaseTicks: u32(0, { unit: "ticks" }),
|
|
41
|
+
score: u32(0),
|
|
42
|
+
best: u32(0, { doc: "The best score since the game started." }),
|
|
43
|
+
movesLeft: u32(0, { doc: "Moves left this round; a swap that makes no line costs none." }),
|
|
44
|
+
chain: u32(0, { doc: "The cascade level of the current clear: 1 for the swap's own lines." }),
|
|
45
|
+
maxChain: u32(0, { doc: "The deepest cascade this round." }),
|
|
46
|
+
cleared: u32(0, { doc: "Tiles cleared this round." }),
|
|
47
|
+
lastCleared: u32(0, { doc: "Tiles the last clear step removed." }),
|
|
48
|
+
rounds: u32(0),
|
|
49
|
+
shuffles: u32(0, { doc: "Boards dealt again because no swap made a line." }),
|
|
50
|
+
selected: i32(-1, { doc: "The selected cell (tap-tap swaps)." }),
|
|
51
|
+
swapA: i32(-1),
|
|
52
|
+
swapB: i32(-1),
|
|
53
|
+
dragFrom: i32(-1, { doc: "The cell a held press started on (drag swaps)." }),
|
|
54
|
+
pressX: f32(0, { unit: "m" }),
|
|
55
|
+
pressY: f32(0, { unit: "m" }),
|
|
56
|
+
viewHeight: f32(12, { unit: "m", doc: "The camera's visible height, set in start." }),
|
|
57
|
+
viewCentreY: f32(0.5, { unit: "m", doc: "The camera's centre height, set in start." }),
|
|
58
|
+
pxPerM: f32(60, { doc: "CSS pixels of the play surface per metre, worked out by Pick every tick from og.ui.viewport." }),
|
|
59
|
+
screenX0: f32(640, { doc: "Surface x of the world origin (Pick)." }),
|
|
60
|
+
screenY0: f32(390, { doc: "Surface y of the world origin (Pick)." }),
|
|
61
|
+
wait: u32(0, { doc: "The Tag.* of the tween group the phase waits for; 0 once its og.TweenCompleted arrived." }),
|
|
62
|
+
font: f64(0, { doc: "The Font handle, for the floating scores Resolve spawns." }),
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
/** Tune's parameters. Authoritative on the board row. */
|
|
66
|
+
export const Tuning = defineComponent("Tuning", {
|
|
67
|
+
moves: u32(20, { min: 1, max: 60, step: 1, tunable: true, label: "Moves", doc: "The move budget of a round." }),
|
|
68
|
+
target: u32(1500, { min: 10, max: 10000, step: 50, tunable: true, label: "Target score", doc: "Reach it before the moves run out to win." }),
|
|
69
|
+
colours: u32(5, { min: 3, max: 6, step: 1, tunable: true, label: "Colours", doc: "Tile colours dealt; fewer colours, more lines." }),
|
|
70
|
+
tileScore: u32(10, { min: 1, max: 100, step: 1, tunable: true, label: "Points per tile", doc: "Each cleared tile scores this times the cascade level." }),
|
|
71
|
+
swapTicks: u32(8, { min: 1, max: 30, step: 1, unit: "ticks", tunable: true, label: "Swap time" }),
|
|
72
|
+
clearTicks: u32(12, { min: 1, max: 40, step: 1, unit: "ticks", tunable: true, label: "Clear time" }),
|
|
73
|
+
fallSpeed: f32(14, { min: 2, max: 60, step: 1, unit: "cells/s", tunable: true, label: "Fall speed" }),
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
/** The HUD's font and where the board sits. On the board row only. */
|
|
77
|
+
export const Hud = defineComponent("Hud", {
|
|
78
|
+
font: f64(0, { doc: "The Font handle." }),
|
|
79
|
+
top: f32(6, { unit: "m", doc: "The top of the view." }),
|
|
80
|
+
halfWidth: f32(8, { unit: "m" }),
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
/** Sound requests: bits of Sounds.sfx that the Voices system plays once each. */
|
|
84
|
+
export const Sound = { Select: 1, Swap: 2, Refused: 4, Clear: 8, Cascade: 16, Won: 32, Lost: 64 } as const;
|
|
85
|
+
|
|
86
|
+
/** The sounds asked for this tick (a resource: the systems that ask see no voice rows). */
|
|
87
|
+
export const Sounds = defineResource("Sounds", {
|
|
88
|
+
sfx: u32(0, { doc: "Sound.* bits waiting to play." }),
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
/** One voice: plays its sound once when Sounds.sfx asks for its bit. */
|
|
92
|
+
export const Sfx = defineComponent("Sfx", {
|
|
93
|
+
bit: u32(0, { doc: "Sound.* of src/components.ts." }),
|
|
94
|
+
plays: u32(0, { doc: "Times Voices has started it." }),
|
|
95
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// Where the board sits, in metres (no engine imports, so playtests read it too).
|
|
2
|
+
|
|
3
|
+
/** The board is SIZE x SIZE cells. */
|
|
4
|
+
export const SIZE = 7;
|
|
5
|
+
/** Cell pitch. */
|
|
6
|
+
export const PITCH = 1;
|
|
7
|
+
/** A gem's size in its cell. */
|
|
8
|
+
export const GEM_SIZE = 0.92;
|
|
9
|
+
/** The board's centre height. */
|
|
10
|
+
export const BOARD_Y = -0.4;
|
|
11
|
+
|
|
12
|
+
/** The centre of a cell. */
|
|
13
|
+
export function cellCentre(col: number, row: number): { x: number; y: number } {
|
|
14
|
+
return { x: (col - (SIZE - 1) / 2) * PITCH, y: BOARD_Y + (row - (SIZE - 1) / 2) * PITCH };
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/** The cell under a world point, or -1 off the board. */
|
|
18
|
+
export function cellAt(x: number, y: number): number {
|
|
19
|
+
const col = Math.floor(x / PITCH + SIZE / 2);
|
|
20
|
+
const row = Math.floor((y - BOARD_Y) / PITCH + SIZE / 2);
|
|
21
|
+
return col >= 0 && col < SIZE && row >= 0 && row < SIZE ? row * SIZE + col : -1;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** The board's top edge. */
|
|
25
|
+
export const BOARD_TOP = BOARD_Y + (SIZE / 2) * PITCH;
|