@origingame/create-game 0.0.0-stage → 0.1.1
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/gitignore +8 -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/gitignore +8 -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/gitignore +8 -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/gitignore +8 -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/gitignore +8 -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/gitignore +8 -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/gitignore +8 -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/gitignore +8 -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 +503 -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/gitignore +8 -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,83 @@
|
|
|
1
|
+
// Shared readers for Lamp Dive's playtests. `get:Game:<file>` writes the
|
|
2
|
+
// dive's resource, the state the game's `facts` (src/main.ts) report to the
|
|
3
|
+
// probe; `get:Foes:<file>` where each foe stands; `dump_entity:<name>:<file>`
|
|
4
|
+
// one row; `dump_platform` the calls to og.platform.
|
|
5
|
+
import type { PlaytestRun } from "@origingame/engine/playtest";
|
|
6
|
+
|
|
7
|
+
export interface Game {
|
|
8
|
+
phase: number;
|
|
9
|
+
paused: boolean;
|
|
10
|
+
settingsOpen: boolean;
|
|
11
|
+
dives: number;
|
|
12
|
+
relics: number;
|
|
13
|
+
recordConflicts: number;
|
|
14
|
+
seed: number;
|
|
15
|
+
floor: number;
|
|
16
|
+
deepest: number;
|
|
17
|
+
hp: number;
|
|
18
|
+
hpMax: number;
|
|
19
|
+
attack: number;
|
|
20
|
+
armour: number;
|
|
21
|
+
lamp: number;
|
|
22
|
+
potions: number;
|
|
23
|
+
gold: number;
|
|
24
|
+
kills: number;
|
|
25
|
+
hits: number;
|
|
26
|
+
hurts: number;
|
|
27
|
+
finds: number;
|
|
28
|
+
turns: number;
|
|
29
|
+
heroX: number;
|
|
30
|
+
heroY: number;
|
|
31
|
+
stairsX: number;
|
|
32
|
+
stairsY: number;
|
|
33
|
+
won: boolean;
|
|
34
|
+
killedBy: number;
|
|
35
|
+
lit: number;
|
|
36
|
+
seen: number;
|
|
37
|
+
language: number;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** Phase.* and FoeKind.* of src/components.ts. */
|
|
41
|
+
export const TITLE = 0;
|
|
42
|
+
export const PLAY = 1;
|
|
43
|
+
export const OVER = 2;
|
|
44
|
+
export const RAT = 0;
|
|
45
|
+
export const SKELETON = 1;
|
|
46
|
+
export const GUARDIAN = 2;
|
|
47
|
+
|
|
48
|
+
/** The Game resource from a `get:Game:<file>` step. */
|
|
49
|
+
export function game(run: PlaytestRun, file: string): Game {
|
|
50
|
+
return run.json<{ value: Game }>(file).value;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** Foe slot i's cell from a `get:Foes:<file>` step ([-1, -1] when it is down). */
|
|
54
|
+
export function foe(run: PlaytestRun, file: string, i: number): [number, number] {
|
|
55
|
+
const v = run.json<{ value: Record<string, number> }>(file).value;
|
|
56
|
+
return [v[`x${i}`]!, v[`y${i}`]!];
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/** One component of a dumped entity. */
|
|
60
|
+
export function component<T>(run: PlaytestRun, file: string, name: string): T {
|
|
61
|
+
const c = run.json<{ components: Record<string, unknown> }>(file).components[name];
|
|
62
|
+
if (!c) throw new Error(`${file} has no ${name}`);
|
|
63
|
+
return c as T;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export interface PlatformDump {
|
|
67
|
+
host: string;
|
|
68
|
+
calls: Array<{ method: string; args: Record<string, unknown>; tick: number; state: string; result?: { ok: boolean; data?: Record<string, unknown>; error?: { code: string } } }>;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/** The UI's labels from a `dump_ui:<file>` step. */
|
|
72
|
+
export function texts(run: PlaytestRun, file: string): string[] {
|
|
73
|
+
return run.json<{ elements: Array<{ text: string; kind: string }> }>(file).elements.filter((e) => e.kind === "label" && e.text !== "").map((e) => e.text);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/** A key pressed at t (down, then up two ticks later). */
|
|
77
|
+
export const press = (key: string, t: number) => `${t}:key_down:${key};${(t + 0.034).toFixed(3)}:key_up:${key}`;
|
|
78
|
+
|
|
79
|
+
/** Keys pressed one after another, a turn (0.25 s) apart from t. */
|
|
80
|
+
export const presses = (keys: string[], t: number) => keys.map((k, i) => press(k, +(t + i * 0.25).toFixed(3))).join(";");
|
|
81
|
+
|
|
82
|
+
/** A tap on a UI element by its id path (pressed, released a tick later). */
|
|
83
|
+
export const tap = (id: string, t: number) => `${t}:touch_move_to:${id};${(t + 0.017).toFixed(3)}:touch_start;${(t + 0.05).toFixed(3)}:touch_end`;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// Permadeath: a lamp-bearer of three health and a blade found waits by a
|
|
2
|
+
// rat until the lamp goes out; a beat later the summary says how and how
|
|
3
|
+
// deep; Dive again starts from nothing (a new seed, floor 1, the blade
|
|
4
|
+
// gone, no kills).
|
|
5
|
+
import { playtest } from "@origingame/engine/playtest";
|
|
6
|
+
import { game, OVER, PLAY, presses, RAT, tap, texts } from "./lib.ts";
|
|
7
|
+
|
|
8
|
+
export default playtest({
|
|
9
|
+
name: "the lamp goes out: the summary, and the next dive starts from nothing",
|
|
10
|
+
commands: [
|
|
11
|
+
"0.2:set:Tuning.heroHp=3",
|
|
12
|
+
"0.3:dive:7",
|
|
13
|
+
"0.4:give:blade",
|
|
14
|
+
"0.5:warp:5:7",
|
|
15
|
+
"0.6:get:Game:armed.json",
|
|
16
|
+
presses(["Space", "Space", "Space"], 0.7),
|
|
17
|
+
"1.75:get:Game:out.json",
|
|
18
|
+
"3.0:get:Game:over.json",
|
|
19
|
+
"3.0:dump_ui:summary.json",
|
|
20
|
+
"3.05:screenshot:lost.png",
|
|
21
|
+
tap("Again", 3.2),
|
|
22
|
+
"3.6:get:Game:again.json",
|
|
23
|
+
"3.7:quit",
|
|
24
|
+
].join(";"),
|
|
25
|
+
check(run, t) {
|
|
26
|
+
t.equal(run.warnings.join("; "), "", "the script ran without warnings");
|
|
27
|
+
t.equal(game(run, "armed.json").attack, 4, "the blade raised the strike to 4");
|
|
28
|
+
const out = game(run, "out.json");
|
|
29
|
+
t.equal(out.hp, 0, "the rat put the lamp out");
|
|
30
|
+
t.equal(out.killedBy, RAT, "the summary will name the rat");
|
|
31
|
+
t.equal(out.phase, PLAY, "the summary waits a beat");
|
|
32
|
+
const over = game(run, "over.json");
|
|
33
|
+
t.equal(over.phase, OVER, "then the summary");
|
|
34
|
+
const words = texts(run, "summary.json");
|
|
35
|
+
t.ok(words.includes("The lamp went out on floor 1"), "it says where the lamp went out");
|
|
36
|
+
t.ok(words.includes("a tomb rat"), "and what put it out");
|
|
37
|
+
t.ok(words.includes("Dives 1 · relics 0"), "and the record");
|
|
38
|
+
const again = game(run, "again.json");
|
|
39
|
+
t.equal(again.phase, PLAY, "Dive again started a new dive");
|
|
40
|
+
t.ok(again.seed !== over.seed, `on a new seed (${over.seed} → ${again.seed})`);
|
|
41
|
+
t.ok(again.floor === 1 && again.hp === 3 && again.attack === 3 && again.kills === 0 && again.turns === 0, "from nothing: floor 1, full health, the blade gone, no kills, no turns");
|
|
42
|
+
t.equal(again.dives, 2, "the record counts the second dive");
|
|
43
|
+
},
|
|
44
|
+
});
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// A gamepad alone: the d-pad and A start from the title, the d-pad walks
|
|
2
|
+
// (a held direction repeats, into the rats of the corridor), A waits a
|
|
3
|
+
// turn, X drinks and, the flask empty, is refused; Start pauses and B
|
|
4
|
+
// resumes.
|
|
5
|
+
import { playtest } from "@origingame/engine/playtest";
|
|
6
|
+
import { game, PLAY } from "./lib.ts";
|
|
7
|
+
|
|
8
|
+
/** A pad button pressed at t and let go 0.05 s later (the pad set aside, so the release is no input of its own). */
|
|
9
|
+
const pad = (button: string, t: number) => `${t}:gamepad:${button};${(t + 0.05).toFixed(2)}:gamepad:off`;
|
|
10
|
+
|
|
11
|
+
export default playtest({
|
|
12
|
+
name: "the d-pad, A, X, Start and B play a dive",
|
|
13
|
+
commands: [
|
|
14
|
+
// The title's first item holds the focus when the menu opens (og-ui §4), so A plays at once; no d-pad press first.
|
|
15
|
+
pad("a", 0.4),
|
|
16
|
+
"1.0:get:Game:started.json",
|
|
17
|
+
"1.1:dive:7",
|
|
18
|
+
pad("up", 1.3),
|
|
19
|
+
pad("up", 1.6),
|
|
20
|
+
"1.9:get:Game:stepped.json",
|
|
21
|
+
"2.0:gamepad:up",
|
|
22
|
+
"3.0:gamepad:off",
|
|
23
|
+
"3.3:get:Game:held.json",
|
|
24
|
+
pad("a", 3.4),
|
|
25
|
+
"3.7:get:Game:waited.json",
|
|
26
|
+
pad("x", 3.8),
|
|
27
|
+
"4.1:get:Game:drank.json",
|
|
28
|
+
pad("x", 4.2),
|
|
29
|
+
"4.4:get:Game:refused.json",
|
|
30
|
+
pad("start", 4.5),
|
|
31
|
+
"4.7:get:Game:paused.json",
|
|
32
|
+
pad("b", 4.8),
|
|
33
|
+
"5.1:get:Game:resumed.json",
|
|
34
|
+
"5.2:gamepad:off",
|
|
35
|
+
"5.3:quit",
|
|
36
|
+
].join(";"),
|
|
37
|
+
check(run, t) {
|
|
38
|
+
t.equal(run.warnings.join("; "), "", "the script ran without warnings");
|
|
39
|
+
t.equal(game(run, "started.json").phase, PLAY, "the pad started a dive from the title");
|
|
40
|
+
const stepped = game(run, "stepped.json");
|
|
41
|
+
t.equal(`${stepped.heroX},${stepped.heroY}`, "4,13", "two d-pad presses walked two cells up");
|
|
42
|
+
const held = game(run, "held.json");
|
|
43
|
+
t.ok(held.turns >= 4, `a d-pad held for a second kept walking (${held.turns} turns)`);
|
|
44
|
+
const waited = game(run, "waited.json");
|
|
45
|
+
t.equal(waited.turns, held.turns + 1, "A waited a turn");
|
|
46
|
+
t.equal(`${waited.heroX},${waited.heroY}`, `${held.heroX},${held.heroY}`, "in place");
|
|
47
|
+
const drank = game(run, "drank.json");
|
|
48
|
+
t.ok(drank.potions === 0 && drank.turns === waited.turns + 1, "X drank the draught, a turn");
|
|
49
|
+
const refused = game(run, "refused.json");
|
|
50
|
+
t.equal(refused.turns, drank.turns, "X with the flask empty was refused: no turn spent");
|
|
51
|
+
t.equal(game(run, "paused.json").paused, true, "Start paused");
|
|
52
|
+
t.equal(game(run, "resumed.json").paused, false, "B resumed");
|
|
53
|
+
},
|
|
54
|
+
});
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// Pause and settings: Escape holds the dive (time scale 0, a step key does
|
|
2
|
+
// nothing), the pause menu opens Settings, 简体中文 switches every string,
|
|
3
|
+
// the music slider moves, Done saves the settings through og.platform, and
|
|
4
|
+
// Resume gives the turn back, in the chosen language.
|
|
5
|
+
import { playtest } from "@origingame/engine/playtest";
|
|
6
|
+
import { game, type PlatformDump, press, tap, texts } from "./lib.ts";
|
|
7
|
+
|
|
8
|
+
export default playtest({
|
|
9
|
+
name: "Escape pauses, settings switch the language and save, Resume gives the turn back",
|
|
10
|
+
commands: [
|
|
11
|
+
"0.3:dive:7",
|
|
12
|
+
press("ArrowUp", 0.6),
|
|
13
|
+
press("Escape", 1.0),
|
|
14
|
+
"1.2:get:Game:paused.json",
|
|
15
|
+
"1.2:get:og.TimeScale.scale:scale.json",
|
|
16
|
+
press("ArrowUp", 1.3),
|
|
17
|
+
"1.6:get:Game:held.json",
|
|
18
|
+
"1.7:screenshot:pause.png",
|
|
19
|
+
tap("settings", 1.8),
|
|
20
|
+
"2.4:move_to_text:简体中文",
|
|
21
|
+
"2.42:touch_start",
|
|
22
|
+
"2.45:touch_end",
|
|
23
|
+
"2.7:touch_move_to:Music/Slider",
|
|
24
|
+
"2.72:touch_start",
|
|
25
|
+
"2.75:touch_end",
|
|
26
|
+
"3.2:screenshot:settings-zh.png",
|
|
27
|
+
tap("Done", 3.4),
|
|
28
|
+
"3.9:get:Prefs:prefs.json",
|
|
29
|
+
"3.9:dump_platform:platform.json",
|
|
30
|
+
tap("resume", 4.0),
|
|
31
|
+
"4.6:dump_ui:play-zh.json",
|
|
32
|
+
press("ArrowUp", 4.7),
|
|
33
|
+
"5.0:get:Game:resumed.json",
|
|
34
|
+
"5.1:screenshot:play-zh.png",
|
|
35
|
+
"5.2:quit",
|
|
36
|
+
].join(";"),
|
|
37
|
+
check(run, t) {
|
|
38
|
+
t.equal(run.warnings.join("; "), "", "the script ran without warnings");
|
|
39
|
+
const paused = game(run, "paused.json");
|
|
40
|
+
t.equal(paused.paused, true, "Escape paused the dive");
|
|
41
|
+
t.equal(paused.turns, 1, "after one step");
|
|
42
|
+
t.equal(run.json<{ value: number }>("scale.json").value, 0, "the dive holds: time scale 0");
|
|
43
|
+
t.equal(game(run, "held.json").turns, 1, "a step key while paused takes no turn");
|
|
44
|
+
const prefs = run.json<{ value: { language: number; music: number; saves: number } }>("prefs.json").value;
|
|
45
|
+
t.equal(prefs.language, 1, "简体中文 was chosen");
|
|
46
|
+
t.ok(prefs.music < 0.7, `the music slider moved (${prefs.music.toFixed(2)})`);
|
|
47
|
+
t.equal(prefs.saves, 1, "Done saved once");
|
|
48
|
+
const p = run.json<PlatformDump>("platform.json");
|
|
49
|
+
const saved = p.calls.find((c) => c.method === "store.set" && c.args["key"] === "og.settings");
|
|
50
|
+
t.equal((saved?.args["value"] as { language?: string } | undefined)?.language, "zh-CN", "the settings went to og.platform with the language");
|
|
51
|
+
t.ok(texts(run, "play-zh.json").includes("第 1/2 层"), "the HUD speaks 简体中文");
|
|
52
|
+
const resumed = game(run, "resumed.json");
|
|
53
|
+
t.equal(resumed.paused, false, "Resume closed the pause menu");
|
|
54
|
+
t.equal(resumed.turns, 2, "and the next step takes a turn");
|
|
55
|
+
t.frame(["pause.png", "settings-zh.png", "play-zh.png"], () => {
|
|
56
|
+
for (const f of ["pause.png", "settings-zh.png", "play-zh.png"]) t.equal(run.png(f).width, 1280, `${f} captured`);
|
|
57
|
+
});
|
|
58
|
+
},
|
|
59
|
+
});
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// The phone layout (390×844 at 3×, a notch and a home bar): the title's
|
|
2
|
+
// menu inside the safe area; the HUD in it too, with health, the floor and
|
|
3
|
+
// Pause along the top and the draught, Wait and a d-pad of touch-sized
|
|
4
|
+
// buttons along the bottom; the d-pad steps and Wait waits.
|
|
5
|
+
import { playtest } from "@origingame/engine/playtest";
|
|
6
|
+
import { game, PLAY, tap } from "./lib.ts";
|
|
7
|
+
|
|
8
|
+
interface Element { id: string; parent: string; kind: string; x: number; y: number; width: number; height: number }
|
|
9
|
+
|
|
10
|
+
export default playtest({
|
|
11
|
+
name: "the phone layout: a HUD inside the safe area and a d-pad that steps",
|
|
12
|
+
size: "1170x2532",
|
|
13
|
+
commands: [
|
|
14
|
+
"0.1:viewport:phone",
|
|
15
|
+
"0.9:dump_ui:title.json",
|
|
16
|
+
tap("play", 1.0),
|
|
17
|
+
"1.1:touch_move:10,400",
|
|
18
|
+
"1.7:get:Game:started.json",
|
|
19
|
+
"1.8:dump_ui:hud.json",
|
|
20
|
+
tap("Pad/Up", 1.9),
|
|
21
|
+
"2.0:touch_move:10,400",
|
|
22
|
+
"2.3:get:Game:up.json",
|
|
23
|
+
tap("Wait", 2.4),
|
|
24
|
+
"2.5:touch_move:10,400",
|
|
25
|
+
"2.8:get:Game:waited.json",
|
|
26
|
+
"2.9:screenshot:play.png",
|
|
27
|
+
"3.0:quit",
|
|
28
|
+
].join(";"),
|
|
29
|
+
check(run, t) {
|
|
30
|
+
t.equal(run.warnings.join("; "), "", "the script ran without warnings");
|
|
31
|
+
const started = game(run, "started.json");
|
|
32
|
+
t.equal(started.phase, PLAY, "a tap on Dive started a dive");
|
|
33
|
+
const ui = run.json<{ surface: { width: number; height: number }; elements: Element[] }>("hud.json");
|
|
34
|
+
const el = (id: string) => ui.elements.find((e) => e.id === id);
|
|
35
|
+
t.equal(ui.surface.width, 390, "laid out for a 390 px wide phone");
|
|
36
|
+
for (const id of ["Health", "Floor", "Pause"]) t.ok((el(id)?.y ?? 0) >= 47, `${id} sits below the notch`);
|
|
37
|
+
for (const id of ["Drink", "Wait", "Down"]) {
|
|
38
|
+
const e = el(id);
|
|
39
|
+
t.ok(e !== undefined && e.y + e.height <= 844 - 34, `${id} sits above the home bar`);
|
|
40
|
+
}
|
|
41
|
+
for (const id of ["Pause", "Drink", "Wait", "Up", "Down", "Left", "Right"]) {
|
|
42
|
+
const e = el(id);
|
|
43
|
+
t.ok(e !== undefined && e.width >= 44 && e.height >= 44, `${id} is at least 44 px square (${e?.width}×${e?.height})`);
|
|
44
|
+
}
|
|
45
|
+
t.ok(ui.elements.every((e) => e.x >= 0 && e.x + e.width <= 390), "nothing runs off the sides");
|
|
46
|
+
const up = game(run, "up.json");
|
|
47
|
+
t.equal(up.turns, started.turns + 1, "the d-pad's Up took a turn");
|
|
48
|
+
t.equal(up.heroY, started.heroY - 1, "a step up");
|
|
49
|
+
t.equal(game(run, "waited.json").turns, up.turns + 1, "Wait waited a turn");
|
|
50
|
+
const title = run.json<{ elements: Element[] }>("title.json").elements;
|
|
51
|
+
t.ok(title.some((e) => e.id === "play") && title.every((e) => e.y + e.height <= 844 - 34 && e.y >= 47), "the title's menu sits inside the safe area");
|
|
52
|
+
t.frame("play.png", () => t.equal(run.png("play.png").width, 1170, "play.png captured at the phone's device pixels"));
|
|
53
|
+
},
|
|
54
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// Determinism: a dive on the seed Dive picks, walked, fought and drunk
|
|
2
|
+
// through, run twice in fresh processes, ends on the same world hash, and
|
|
3
|
+
// the floor it carved is the same both times.
|
|
4
|
+
import { playtest } from "@origingame/engine/playtest";
|
|
5
|
+
import { game, press, presses, tap } from "./lib.ts";
|
|
6
|
+
|
|
7
|
+
export default playtest({
|
|
8
|
+
name: "a dive with steps, strikes and the foes' turns replays to the same hash",
|
|
9
|
+
runs: 2,
|
|
10
|
+
commands: [
|
|
11
|
+
tap("play", 0.3),
|
|
12
|
+
presses(["ArrowUp", "ArrowRight", "ArrowRight", "ArrowDown", "ArrowLeft", "ArrowUp", "ArrowUp", "Space", "ArrowRight", "ArrowRight"], 0.9),
|
|
13
|
+
press("KeyQ", 3.5),
|
|
14
|
+
"4.0:get:Game:end.json",
|
|
15
|
+
"4.1:quit",
|
|
16
|
+
].join(";"),
|
|
17
|
+
check(run, t) {
|
|
18
|
+
t.equal(run.warnings.join("; "), "", "the script ran without warnings");
|
|
19
|
+
t.equal(run.hashes.length, 2, "two runs");
|
|
20
|
+
t.equal(run.hashes[1], run.hashes[0], `both runs end on hash ${run.hashes[0]}`);
|
|
21
|
+
const end = game(run, "end.json");
|
|
22
|
+
t.ok(end.turns >= 5, `the dive took turns (${end.turns})`);
|
|
23
|
+
},
|
|
24
|
+
});
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// The whole dive's end: seed 7's stairs at (23, 11) take the lamp-bearer
|
|
2
|
+
// to floor 2 (the foes left behind take no turn); the moss-faced guardian
|
|
3
|
+
// stands before the relic at (24, 14), glows red and shows "!" the turn
|
|
4
|
+
// before its charged strike; felled, the relic is taken, and the summary
|
|
5
|
+
// shows the win. Meanwhile another device wrote the dive record, so the
|
|
6
|
+
// end's write is refused as stale, read again and merged (this dive's
|
|
7
|
+
// relic added to the other device's counts).
|
|
8
|
+
import { playtest } from "@origingame/engine/playtest";
|
|
9
|
+
import { foe, game, OVER, type PlatformDump, press, presses, tap, texts } from "./lib.ts";
|
|
10
|
+
|
|
11
|
+
export default playtest({
|
|
12
|
+
name: "down the stairs, past the guardian, the relic, a merged record and the summary",
|
|
13
|
+
commands: [
|
|
14
|
+
"0.3:dive:7",
|
|
15
|
+
"0.5:warp:23:10",
|
|
16
|
+
"0.6:get:Game:above.json",
|
|
17
|
+
press("ArrowDown", 0.7),
|
|
18
|
+
"1.0:get:Game:below.json",
|
|
19
|
+
"1.0:get:Foes:below-foes.json",
|
|
20
|
+
"1.1:warp:22:14",
|
|
21
|
+
"1.15:stale_record",
|
|
22
|
+
presses(Array(8).fill("ArrowRight"), 1.3),
|
|
23
|
+
"3.9:get:Game:relic.json",
|
|
24
|
+
"5.0:get:Game:over.json",
|
|
25
|
+
"5.0:dump_ui:summary.json",
|
|
26
|
+
"5.0:dump_platform:platform.json",
|
|
27
|
+
"5.05:screenshot:won.png",
|
|
28
|
+
tap("Menu", 5.2),
|
|
29
|
+
"5.8:get:Game:menu.json",
|
|
30
|
+
"5.9:quit",
|
|
31
|
+
].join(";"),
|
|
32
|
+
check(run, t) {
|
|
33
|
+
t.equal(run.warnings.join("; "), "", "the script ran without warnings");
|
|
34
|
+
const above = game(run, "above.json");
|
|
35
|
+
t.equal(`${above.stairsX},${above.stairsY}`, "23,11", "seed 7's stairs are at (23, 11)");
|
|
36
|
+
const below = game(run, "below.json");
|
|
37
|
+
t.equal(below.floor, 2, "the stairs took the lamp-bearer down");
|
|
38
|
+
t.equal(below.deepest, 2, "the deepest floor is 2");
|
|
39
|
+
t.equal(below.hurts, 0, "the foes left behind took no turn");
|
|
40
|
+
t.equal(foe(run, "below-foes.json", 9).join(","), "23,14", "floor 2's guardian stands before the relic");
|
|
41
|
+
const relic = game(run, "relic.json");
|
|
42
|
+
t.ok(relic.won, "the relic was taken");
|
|
43
|
+
t.ok(relic.kills >= 1 && relic.hits >= 5, `after the guardian fell (${relic.hits} strikes)`);
|
|
44
|
+
t.ok(relic.hurts >= 1, `it struck back (${relic.hurts} times)`);
|
|
45
|
+
t.ok(relic.hp > 0, `and the lamp still burns (${relic.hp})`);
|
|
46
|
+
const over = game(run, "over.json");
|
|
47
|
+
t.equal(over.phase, OVER, "the summary came");
|
|
48
|
+
t.equal(over.recordConflicts, 1, "the record write was refused once as stale");
|
|
49
|
+
t.ok(over.dives === 7 && over.relics === 3, `and merged: the other device's 7 dives and 2 relics, plus this relic (${over.dives}, ${over.relics})`);
|
|
50
|
+
const words = texts(run, "summary.json");
|
|
51
|
+
t.ok(words.includes("The relic is yours"), "the summary shows the win");
|
|
52
|
+
t.ok(words.includes("Dives 7 · relics 3"), "and the merged record");
|
|
53
|
+
const p = run.json<PlatformDump>("platform.json");
|
|
54
|
+
const writes = p.calls.filter((c) => c.method === "store.set" && c.args["key"] === "record");
|
|
55
|
+
const last = writes[writes.length - 1];
|
|
56
|
+
t.equal(JSON.stringify(last?.args["value"]), JSON.stringify({ dives: 7, relics: 3 }), "the merge was written");
|
|
57
|
+
t.equal(last?.result?.ok, true, "at the revision read again");
|
|
58
|
+
t.equal(game(run, "menu.json").phase, 0, "Title went back to the title");
|
|
59
|
+
},
|
|
60
|
+
});
|