@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,448 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Regenerates Spark Orb's self-made assets (CC0), byte for byte:
|
|
3
|
+
|
|
4
|
+
python3 tools/make-assets.py # from the archetype directory
|
|
5
|
+
|
|
6
|
+
- assets/sprites/orb.png: the orb, a glowing sphere of swirling fire,
|
|
7
|
+
computed per pixel; glow.png (a soft light, dithered: the orb's glow and
|
|
8
|
+
the sky's haze), spark.png (particles and the fixed stars) and
|
|
9
|
+
mote-<generator>.png (the four motes: an ember, a bolt, a crystal, a
|
|
10
|
+
star),
|
|
11
|
+
- assets/skins/sparkorb/atlas.png: the neon pack's atlas
|
|
12
|
+
(templates/ui-kit) with its magenta frames turned violet,
|
|
13
|
+
- assets/fx/*.ogt: the particle emitters (the tap's burst, a milestone's
|
|
14
|
+
ring, the supernova, the sparks drifting up from the orb, the stars),
|
|
15
|
+
- assets/audio/*.wav: the tap, a purchase, a milestone, the supernova and
|
|
16
|
+
the orbit's music loop; *.ogt: the UI's og sfx presets,
|
|
17
|
+
- assets/fonts/NotoSansSC-subset.ttf + .ogt: Noto Sans SC subset to the
|
|
18
|
+
characters of assets/strings/zh-CN.ogt (needs fontTools and the project
|
|
19
|
+
template's font; skipped with a note when either is missing).
|
|
20
|
+
|
|
21
|
+
Standard library only except the font subset; deterministic.
|
|
22
|
+
"""
|
|
23
|
+
import colorsys, math, os, struct, sys, zlib
|
|
24
|
+
|
|
25
|
+
here = os.path.dirname(os.path.abspath(__file__))
|
|
26
|
+
sys.path.insert(0, here)
|
|
27
|
+
from oglite import Canvas, png_bytes, write_wav, tone, noise, mix, concat, subset_font # noqa: E402
|
|
28
|
+
|
|
29
|
+
root = os.path.dirname(here)
|
|
30
|
+
assets = os.path.join(root, "assets")
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def write(path, data):
|
|
34
|
+
path = os.path.join(assets, path)
|
|
35
|
+
os.makedirs(os.path.dirname(path), exist_ok=True)
|
|
36
|
+
with open(path, "wb" if isinstance(data, bytes) else "w") as f:
|
|
37
|
+
f.write(data)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def canvas_png(c):
|
|
41
|
+
return png_bytes(c.w, c.h, c.rgba())
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def clamp(x):
|
|
45
|
+
return max(0.0, min(1.0, x))
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def lerp(a, b, t):
|
|
49
|
+
return a + (b - a) * t
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
# ── the art ────────────────────────────────────────────────────────────────
|
|
53
|
+
|
|
54
|
+
def orb():
|
|
55
|
+
"""A sphere of fire: a white-gold core, orange flesh, a red rim, swirling
|
|
56
|
+
bands turning about its axis, a highlight up and to the left, and a thin
|
|
57
|
+
corona just outside the edge. Straight alpha."""
|
|
58
|
+
n = 256
|
|
59
|
+
R = 0.84 # the sphere's radius in half-sizes (the rest is the corona)
|
|
60
|
+
rows = []
|
|
61
|
+
for y in range(n):
|
|
62
|
+
row = bytearray()
|
|
63
|
+
for x in range(n):
|
|
64
|
+
u = (x + 0.5) / (n / 2) - 1
|
|
65
|
+
v = (y + 0.5) / (n / 2) - 1
|
|
66
|
+
d = math.hypot(u, v)
|
|
67
|
+
if d <= R:
|
|
68
|
+
r = d / R
|
|
69
|
+
z = math.sqrt(max(0.0, 1 - r * r))
|
|
70
|
+
# Swirl: bands in longitude, bent by latitude.
|
|
71
|
+
lon = math.atan2(v, u)
|
|
72
|
+
band = 0.5 + 0.5 * math.sin(lon * 3 + r * 7.5 + math.sin(v * 5) * 1.2)
|
|
73
|
+
heat = clamp(0.25 + 0.75 * z) * (0.82 + 0.18 * band)
|
|
74
|
+
cr = lerp(0.85, 1.0, heat)
|
|
75
|
+
cg = lerp(0.22, 0.92, heat ** 1.4)
|
|
76
|
+
cb = lerp(0.08, 0.62, heat ** 3.2)
|
|
77
|
+
# The highlight up and to the left.
|
|
78
|
+
h = clamp(1 - math.hypot(u + 0.32, v + 0.36) / 0.34)
|
|
79
|
+
cr, cg, cb = (lerp(c, 1.0, h * 0.8) for c in (cr, cg, cb))
|
|
80
|
+
# A soft edge over the last pixel.
|
|
81
|
+
a = clamp((R - d) * n / 2)
|
|
82
|
+
row += bytes([round(cr * 255), round(cg * 255), round(cb * 255), round(a * 255)])
|
|
83
|
+
else:
|
|
84
|
+
c = clamp(1 - (d - R) / (1 - R))
|
|
85
|
+
a = c ** 2.4 * 0.75
|
|
86
|
+
row += bytes([255, 170, 70, round(a * 255)])
|
|
87
|
+
rows.append(bytes(row))
|
|
88
|
+
return png_bytes(n, n, rows)
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
def dither(x, y):
|
|
92
|
+
"""A hashed offset in [-0.5, 0.5) of one 8-bit step, so a slow gradient
|
|
93
|
+
stored in 8 bits shows no rings once the sRGB curve stretches its dark end."""
|
|
94
|
+
return ((hashn(x, y, 77) % 1024) / 1024 - 0.5) / 255
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
def glow():
|
|
98
|
+
"""A soft round glow, fully clear at its edge (a falloff, dithered)."""
|
|
99
|
+
n = 256
|
|
100
|
+
rows = []
|
|
101
|
+
for y in range(n):
|
|
102
|
+
row = bytearray()
|
|
103
|
+
for x in range(n):
|
|
104
|
+
d = math.hypot(x + 0.5 - n / 2, y + 0.5 - n / 2) / (n / 2)
|
|
105
|
+
a = clamp(max(0.0, 1 - d) ** 2.2 + dither(x, y))
|
|
106
|
+
row += bytes([255, 255, 255, round(a * 255)])
|
|
107
|
+
rows.append(bytes(row))
|
|
108
|
+
return png_bytes(n, n, rows)
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
def spark():
|
|
112
|
+
c = Canvas(16, 16)
|
|
113
|
+
for r, a in ((7.5, 0.15), (5, 0.35), (3, 0.8), (1.6, 1.0)):
|
|
114
|
+
c.circle(8, 8, r, "#ffffff", a)
|
|
115
|
+
return c
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
def hashn(*v):
|
|
119
|
+
h = 2166136261
|
|
120
|
+
for x in v:
|
|
121
|
+
h = ((h ^ (x & 0xFFFFFFFF)) * 16777619) & 0xFFFFFFFF
|
|
122
|
+
return h
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
def mote(kind):
|
|
126
|
+
"""White shapes the sprite tints: an ember (a teardrop), a bolt, a
|
|
127
|
+
crystal (a diamond), a star; each with a soft halo."""
|
|
128
|
+
c = Canvas(32, 32)
|
|
129
|
+
c.circle(16, 16, 15, "#ffffff", 0.12)
|
|
130
|
+
c.circle(16, 16, 11, "#ffffff", 0.18)
|
|
131
|
+
if kind == "ember":
|
|
132
|
+
c.poly([(16, 5), (22, 16), (20, 23), (16, 26), (12, 23), (10, 16)], "#ffffff")
|
|
133
|
+
elif kind == "storm":
|
|
134
|
+
c.poly([(18, 4), (10, 17), (15, 17), (13, 28), (22, 13), (17, 13)], "#ffffff")
|
|
135
|
+
elif kind == "crystal":
|
|
136
|
+
c.poly([(16, 4), (24, 14), (16, 28), (8, 14)], "#ffffff")
|
|
137
|
+
c.line(8, 14, 24, 14, 1.2, "#d9d9d9")
|
|
138
|
+
else:
|
|
139
|
+
pts = []
|
|
140
|
+
for k in range(10):
|
|
141
|
+
a = -math.pi / 2 + k * math.pi / 5
|
|
142
|
+
r = 12 if k % 2 == 0 else 5
|
|
143
|
+
pts.append((16 + r * math.cos(a), 16 + r * math.sin(a)))
|
|
144
|
+
c.poly(pts, "#ffffff")
|
|
145
|
+
return c
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
PIXEL = """type import
|
|
149
|
+
version 1
|
|
150
|
+
---
|
|
151
|
+
# A slow gradient or single-texel stars: kept exact (RGBA8, no block
|
|
152
|
+
# compression, which shows 4 x 4 blocks in dark gradients), sampled nearest.
|
|
153
|
+
texture {
|
|
154
|
+
kind pixel
|
|
155
|
+
}
|
|
156
|
+
"""
|
|
157
|
+
|
|
158
|
+
LINEAR = """type import
|
|
159
|
+
version 1
|
|
160
|
+
---
|
|
161
|
+
# Drawn art: lossless, sampled linear.
|
|
162
|
+
texture {
|
|
163
|
+
kind color
|
|
164
|
+
}
|
|
165
|
+
"""
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
def emitter(comment, body):
|
|
169
|
+
return f"type particles\nversion 1\n---\n# {comment}\n{body.strip()}\n"
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
TAP = emitter("A tap: a handful of sparks thrown out from where the finger landed.", """
|
|
173
|
+
maxParticles 40
|
|
174
|
+
shape point
|
|
175
|
+
spread 180
|
|
176
|
+
burst 0 12
|
|
177
|
+
duration 0.1
|
|
178
|
+
lifetime 0.3 0.55
|
|
179
|
+
speed 2 4.2
|
|
180
|
+
size 0.1 0.2
|
|
181
|
+
sizeOverLife 0 1 1 0
|
|
182
|
+
colorOverLife {
|
|
183
|
+
key 0 1 0.92 0.6 1
|
|
184
|
+
key 0.5 1 0.62 0.2 0.9
|
|
185
|
+
key 1 0.9 0.3 0.1 0
|
|
186
|
+
}
|
|
187
|
+
gravity 0 -3 0
|
|
188
|
+
drag 2.5
|
|
189
|
+
texture "sprites/spark.png"
|
|
190
|
+
blend additive
|
|
191
|
+
render sprite 20
|
|
192
|
+
""")
|
|
193
|
+
|
|
194
|
+
MILESTONE = emitter("A milestone: a ring of sparks flung out from the orb.", """
|
|
195
|
+
maxParticles 72
|
|
196
|
+
shape sphere 0.3
|
|
197
|
+
spread 180
|
|
198
|
+
burst 0 48
|
|
199
|
+
duration 0.1
|
|
200
|
+
lifetime 0.5 0.8
|
|
201
|
+
speed 3 4.5
|
|
202
|
+
size 0.12 0.24
|
|
203
|
+
sizeOverLife 0 1 1 0
|
|
204
|
+
colorOverLife {
|
|
205
|
+
key 0 1 1 0.85 1
|
|
206
|
+
key 1 1 0.55 0.2 0
|
|
207
|
+
}
|
|
208
|
+
drag 1.8
|
|
209
|
+
texture "sprites/spark.png"
|
|
210
|
+
blend additive
|
|
211
|
+
render sprite 21
|
|
212
|
+
""")
|
|
213
|
+
|
|
214
|
+
NOVA = emitter("The supernova: the orb bursts in every direction.", """
|
|
215
|
+
maxParticles 240
|
|
216
|
+
shape sphere 0.6
|
|
217
|
+
spread 180
|
|
218
|
+
burst 0 200
|
|
219
|
+
duration 0.15
|
|
220
|
+
lifetime 0.8 1.6
|
|
221
|
+
speed 4 11
|
|
222
|
+
size 0.15 0.4
|
|
223
|
+
sizeOverLife 0 1 0.6 0.8 1 0
|
|
224
|
+
colorOverLife {
|
|
225
|
+
key 0 1 1 1 1
|
|
226
|
+
key 0.3 1 0.8 0.4 1
|
|
227
|
+
key 1 0.7 0.3 1 0
|
|
228
|
+
}
|
|
229
|
+
drag 1.4
|
|
230
|
+
texture "sprites/spark.png"
|
|
231
|
+
blend additive
|
|
232
|
+
render sprite 22
|
|
233
|
+
""")
|
|
234
|
+
|
|
235
|
+
DRIFT = emitter("Sparks drifting up off the orb's skin, always.", """
|
|
236
|
+
maxParticles 60
|
|
237
|
+
shape sphere 1.2
|
|
238
|
+
rate 14
|
|
239
|
+
lifetime 1.2 2.2
|
|
240
|
+
speed 0.2 0.6
|
|
241
|
+
size 0.06 0.14
|
|
242
|
+
sizeOverLife 0 0.4 0.3 1 1 0
|
|
243
|
+
colorOverLife {
|
|
244
|
+
key 0 1 0.85 0.5 0
|
|
245
|
+
key 0.2 1 0.75 0.35 0.9
|
|
246
|
+
key 1 1 0.4 0.15 0
|
|
247
|
+
}
|
|
248
|
+
gravity 0 0.6 0
|
|
249
|
+
noise 0.4 0.5 0.4
|
|
250
|
+
texture "sprites/spark.png"
|
|
251
|
+
blend additive
|
|
252
|
+
render sprite 2
|
|
253
|
+
""")
|
|
254
|
+
|
|
255
|
+
STARS = emitter("The night's stars: faint, slow, twinkling in and out across the sky.", """
|
|
256
|
+
maxParticles 90
|
|
257
|
+
shape box 22 14 0
|
|
258
|
+
rate 9
|
|
259
|
+
lifetime 6 10
|
|
260
|
+
speed 0 0.03
|
|
261
|
+
size 0.04 0.1
|
|
262
|
+
sizeOverLife 0 0.6 0.5 1 1 0.6
|
|
263
|
+
colorOverLife {
|
|
264
|
+
key 0 0.8 0.85 1 0
|
|
265
|
+
key 0.25 0.85 0.9 1 0.8
|
|
266
|
+
key 0.75 1 0.95 0.9 0.6
|
|
267
|
+
key 1 1 0.95 0.9 0
|
|
268
|
+
}
|
|
269
|
+
texture "sprites/spark.png"
|
|
270
|
+
blend additive
|
|
271
|
+
render sprite 0
|
|
272
|
+
""")
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
# ── the skin's atlas ───────────────────────────────────────────────────────
|
|
276
|
+
|
|
277
|
+
def read_png(path):
|
|
278
|
+
"""An 8-bit RGBA, non-interlaced PNG's rows of pixels (what make-skins.py writes)."""
|
|
279
|
+
data = open(path, "rb").read()
|
|
280
|
+
at, idat, w, h = 8, b"", 0, 0
|
|
281
|
+
while at < len(data):
|
|
282
|
+
n = struct.unpack(">I", data[at:at + 4])[0]
|
|
283
|
+
kind = data[at + 4:at + 8]
|
|
284
|
+
body = data[at + 8:at + 8 + n]
|
|
285
|
+
if kind == b"IHDR":
|
|
286
|
+
w, h, depth, colour = struct.unpack(">IIBB", body[:10])
|
|
287
|
+
assert depth == 8 and colour == 6, "RGBA8 only"
|
|
288
|
+
elif kind == b"IDAT":
|
|
289
|
+
idat += body
|
|
290
|
+
at += 12 + n
|
|
291
|
+
raw = zlib.decompress(idat)
|
|
292
|
+
stride = w * 4
|
|
293
|
+
rows, prev = [], bytearray(stride)
|
|
294
|
+
for y in range(h):
|
|
295
|
+
f = raw[y * (stride + 1)]
|
|
296
|
+
line = bytearray(raw[y * (stride + 1) + 1:(y + 1) * (stride + 1)])
|
|
297
|
+
for i in range(stride):
|
|
298
|
+
a = line[i - 4] if i >= 4 else 0
|
|
299
|
+
b = prev[i]
|
|
300
|
+
c = prev[i - 4] if i >= 4 else 0
|
|
301
|
+
if f == 1:
|
|
302
|
+
line[i] = (line[i] + a) & 255
|
|
303
|
+
elif f == 2:
|
|
304
|
+
line[i] = (line[i] + b) & 255
|
|
305
|
+
elif f == 3:
|
|
306
|
+
line[i] = (line[i] + (a + b) // 2) & 255
|
|
307
|
+
elif f == 4:
|
|
308
|
+
pa, pb, pc = abs(b - c), abs(a - c), abs(a + b - 2 * c)
|
|
309
|
+
line[i] = (line[i] + (a if pa <= pb and pa <= pc else b if pb <= pc else c)) & 255
|
|
310
|
+
rows.append(bytes(line))
|
|
311
|
+
prev = line
|
|
312
|
+
return w, h, rows
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
def atlas():
|
|
316
|
+
"""The neon pack's atlas with its baked magenta frames turned to the
|
|
317
|
+
night's violet (hue 300 to 262), the rest untouched."""
|
|
318
|
+
src = os.path.join(root, "..", "..", "ui-kit", "assets", "skins", "neon", "atlas.png")
|
|
319
|
+
if not os.path.exists(src):
|
|
320
|
+
print("atlas recolour skipped (no templates/ui-kit here); the committed atlas stays")
|
|
321
|
+
return None
|
|
322
|
+
w, h, rows = read_png(src)
|
|
323
|
+
out = []
|
|
324
|
+
for row in rows:
|
|
325
|
+
line = bytearray(row)
|
|
326
|
+
for x in range(w):
|
|
327
|
+
r, g, b, a = line[x * 4:x * 4 + 4]
|
|
328
|
+
if a == 0:
|
|
329
|
+
continue
|
|
330
|
+
hh, ss, vv = colorsys.rgb_to_hsv(r / 255, g / 255, b / 255)
|
|
331
|
+
if ss > 0.3 and 0.78 <= hh <= 0.9:
|
|
332
|
+
nr, ng, nb = colorsys.hsv_to_rgb(262 / 360, ss * 0.85, vv)
|
|
333
|
+
line[x * 4:x * 4 + 3] = bytes([round(nr * 255), round(ng * 255), round(nb * 255)])
|
|
334
|
+
out.append(bytes(line))
|
|
335
|
+
return png_bytes(w, h, out)
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
# ── sounds ─────────────────────────────────────────────────────────────────
|
|
339
|
+
|
|
340
|
+
RATE = 22050
|
|
341
|
+
|
|
342
|
+
|
|
343
|
+
def bell(seconds, f, gain=0.2, decay=0.6):
|
|
344
|
+
n = int(seconds * RATE)
|
|
345
|
+
out = []
|
|
346
|
+
for i in range(n):
|
|
347
|
+
t = i / RATE
|
|
348
|
+
env = min(1.0, t / 0.004) * math.exp(-t / decay)
|
|
349
|
+
out.append(gain * env * (math.sin(2 * math.pi * f * t) + 0.35 * math.sin(2 * math.pi * f * 2.76 * t) + 0.15 * math.sin(2 * math.pi * f * 5.4 * t)))
|
|
350
|
+
return out
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
def pad(seconds, freqs, gain):
|
|
354
|
+
n = int(seconds * RATE)
|
|
355
|
+
out = [0.0] * n
|
|
356
|
+
for f in freqs:
|
|
357
|
+
for i in range(n):
|
|
358
|
+
t = i / RATE
|
|
359
|
+
env = min(1.0, t / 0.8) * min(1.0, (seconds - t) / 0.8)
|
|
360
|
+
out[i] += gain * env * (math.sin(2 * math.pi * f * t) + 0.25 * math.sin(2 * math.pi * f * 1.005 * t + 1.3))
|
|
361
|
+
return out
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
def music():
|
|
365
|
+
"""Eight bars at 72 BPM in D major: a slow pad under bell notes that circle like the motes; loops seamlessly."""
|
|
366
|
+
beat = 60 / 72
|
|
367
|
+
chords = [(146.83, 220.0, 293.66), (123.47, 185.0, 246.94), (98.0, 146.83, 196.0), (110.0, 164.81, 220.0)] * 2
|
|
368
|
+
melody = [587.33, 739.99, 880.0, 739.99, 659.25, 587.33, 493.88, 587.33]
|
|
369
|
+
total = int(32 * beat * RATE)
|
|
370
|
+
out = [0.0] * total
|
|
371
|
+
for b, ch in enumerate(chords):
|
|
372
|
+
p = pad(4 * beat, ch, 0.045)
|
|
373
|
+
s0 = int(b * 4 * beat * RATE)
|
|
374
|
+
for i, s in enumerate(p):
|
|
375
|
+
if s0 + i < total:
|
|
376
|
+
out[s0 + i] += s
|
|
377
|
+
for k in range(4):
|
|
378
|
+
if (b + k) % 3 == 2:
|
|
379
|
+
continue
|
|
380
|
+
f = melody[(b * 3 + k) % 8] * (0.5 if b >= 4 and k == 3 else 1)
|
|
381
|
+
note = bell(beat * 2, f, 0.07, 0.7)
|
|
382
|
+
st = int((b * 4 + k) * beat * RATE)
|
|
383
|
+
for i, s in enumerate(note):
|
|
384
|
+
out[(st + i) % total] += s
|
|
385
|
+
return out
|
|
386
|
+
|
|
387
|
+
|
|
388
|
+
def sounds():
|
|
389
|
+
a = os.path.join(assets, "audio")
|
|
390
|
+
os.makedirs(a, exist_ok=True)
|
|
391
|
+
w = lambda name, s: write_wav(os.path.join(a, name), s) # noqa: E731
|
|
392
|
+
w("tap.wav", mix(bell(0.35, 1046.5, 0.28, 0.12), tone(0.05, 2093, 1568, shape="tri", decay=0.02, gain=0.12)))
|
|
393
|
+
w("buy.wav", concat(bell(0.08, 1318.5, 0.25, 0.05), bell(0.35, 1975.5, 0.25, 0.12)))
|
|
394
|
+
w("milestone.wav", concat(*[bell(0.1, f, 0.25, 0.08) for f in (783.99, 987.77, 1174.66)], bell(0.7, 1567.98, 0.28, 0.3)))
|
|
395
|
+
w("nova.wav", mix(noise(1.6, decay=0.45, gain=0.45, seed=11), tone(1.6, 110, 40, shape="sine", decay=0.5, gain=0.6), bell(1.6, 1760, 0.12, 0.6)))
|
|
396
|
+
w("orbit.wav", music())
|
|
397
|
+
presets = {"ui-press": "click", "ui-open": "select", "ui-close": "back", "ui-error": "error", "ui-success": "levelup"}
|
|
398
|
+
for name, preset in presets.items():
|
|
399
|
+
write(f"audio/{name}.ogt", f'type sfx\nversion 1\n---\n# og sfx\'s "{preset}" preset, synthesised by og cook (the UI\'s {name[3:]} sound).\npreset "{preset}"\nseed 0\npitch 1\nlength 1\nvolume 0.8\n')
|
|
400
|
+
|
|
401
|
+
|
|
402
|
+
# ── the font ───────────────────────────────────────────────────────────────
|
|
403
|
+
|
|
404
|
+
def zh_characters():
|
|
405
|
+
text = open(os.path.join(assets, "strings", "zh-CN.ogt"), encoding="utf-8").read()
|
|
406
|
+
# And the punctuation the UI draws itself: the en dash (a grade or a
|
|
407
|
+
# count not yet known) and the ellipsis (a cut label), which the zh-CN
|
|
408
|
+
# screens showed as missing glyphs before og-ui warned about them.
|
|
409
|
+
chars = sorted({ch for ch in text if ord(ch) > 0x2E7F} | set("–…"))
|
|
410
|
+
return "".join(chars)
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
def font():
|
|
414
|
+
chars = zh_characters()
|
|
415
|
+
src = os.path.join(root, "..", "..", "game", "assets", "fonts", "NotoSansSC-Regular-subset.ttf")
|
|
416
|
+
try:
|
|
417
|
+
subset_font(src, os.path.join(assets, "fonts", "NotoSansSC-subset.ttf"), chars)
|
|
418
|
+
except Exception as e: # noqa: BLE001
|
|
419
|
+
print(f"font subset skipped ({e}); the committed assets/fonts/NotoSansSC-subset.ttf stays")
|
|
420
|
+
write("fonts/NotoSansSC-subset.ttf.ogt", "type import\nversion 1\n---\n"
|
|
421
|
+
"# Latin-1, CJK punctuation and every character of assets/strings/zh-CN.ogt (tools/make-assets.py).\n"
|
|
422
|
+
f'font {{\n charset latin cjk-punct\n chars "{chars}"\n em_px 32\n px_range 4\n}}\n')
|
|
423
|
+
|
|
424
|
+
|
|
425
|
+
def main():
|
|
426
|
+
write("sprites/orb.png", orb())
|
|
427
|
+
write("sprites/orb.png.ogt", LINEAR)
|
|
428
|
+
write("sprites/glow.png", glow())
|
|
429
|
+
write("sprites/glow.png.ogt", PIXEL)
|
|
430
|
+
write("sprites/spark.png", canvas_png(spark()))
|
|
431
|
+
write("sprites/spark.png.ogt", LINEAR)
|
|
432
|
+
for kind in ("ember", "storm", "crystal", "star"):
|
|
433
|
+
write(f"sprites/mote-{kind}.png", canvas_png(mote(kind)))
|
|
434
|
+
write(f"sprites/mote-{kind}.png.ogt", LINEAR)
|
|
435
|
+
recoloured = atlas()
|
|
436
|
+
if recoloured is not None:
|
|
437
|
+
write("skins/sparkorb/atlas.png", recoloured)
|
|
438
|
+
write("fx/tap.ogt", TAP)
|
|
439
|
+
write("fx/milestone.ogt", MILESTONE)
|
|
440
|
+
write("fx/nova.ogt", NOVA)
|
|
441
|
+
write("fx/drift.ogt", DRIFT)
|
|
442
|
+
write("fx/stars.ogt", STARS)
|
|
443
|
+
sounds()
|
|
444
|
+
font()
|
|
445
|
+
|
|
446
|
+
|
|
447
|
+
if __name__ == "__main__":
|
|
448
|
+
main()
|