@origingame/create-game 0.3.0 → 0.5.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 +5 -2
- package/archetypes/README.md +1 -1
- package/archetypes/arena/package.json +1 -1
- package/archetypes/arena/project.ogt +1 -1
- package/archetypes/idle/README.md +4 -4
- package/archetypes/idle/assets/looks/idle.ogt +1 -1
- package/archetypes/idle/assets/styles/sparkorb/LICENSES.md +2 -2
- package/archetypes/idle/assets/styles/sparkorb/style.ogt +1 -1
- package/archetypes/idle/package.json +1 -1
- package/archetypes/idle/project.ogt +1 -1
- package/archetypes/idle/src/components.ts +1 -1
- package/archetypes/idle/src/main.ts +5 -5
- package/archetypes/idle/src/ui.ts +3 -3
- package/archetypes/idle/tools/make-assets.py +1 -1
- package/archetypes/match3/package.json +1 -1
- package/archetypes/match3/project.ogt +1 -1
- package/archetypes/rhythm/README.md +2 -2
- package/archetypes/rhythm/assets/styles/lanebeat/LICENSES.md +2 -2
- package/archetypes/rhythm/assets/styles/lanebeat/style.ogt +1 -1
- package/archetypes/rhythm/package.json +1 -1
- package/archetypes/rhythm/project.ogt +1 -1
- package/archetypes/rhythm/src/components.ts +1 -1
- package/archetypes/rhythm/src/main.ts +3 -3
- package/archetypes/rhythm/src/ui.ts +2 -2
- package/archetypes/roguelike/README.md +2 -2
- package/archetypes/roguelike/assets/styles/lampdive/LICENSES.md +2 -2
- package/archetypes/roguelike/assets/styles/lampdive/style.ogt +1 -1
- package/archetypes/roguelike/package.json +1 -1
- package/archetypes/roguelike/project.ogt +1 -1
- package/archetypes/roguelike/src/components.ts +1 -1
- package/archetypes/roguelike/src/main.ts +2 -2
- package/archetypes/roguelike/src/ui.ts +2 -2
- package/archetypes/runner/package.json +1 -1
- package/archetypes/runner/project.ogt +1 -1
- package/archetypes/third-person/README.md +2 -2
- package/archetypes/third-person/assets/styles/ember/LICENSES.md +2 -2
- package/archetypes/third-person/assets/styles/ember/style.ogt +1 -1
- package/archetypes/third-person/package.json +1 -1
- package/archetypes/third-person/project.ogt +1 -1
- 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/components.ts +1 -1
- package/archetypes/third-person/src/main.ts +3 -3
- package/archetypes/third-person/src/sound.ts +1 -1
- package/archetypes/third-person/src/ui.ts +2 -2
- package/archetypes/topdown/package.json +1 -1
- package/archetypes/topdown/project.ogt +1 -1
- package/archetypes/tower-defense/package.json +1 -1
- package/archetypes/tower-defense/project.ogt +1 -1
- package/archetypes/tower-defense/src/components.ts +1 -1
- package/archetypes/tower-defense/src/main.ts +2 -2
- package/archetypes/tower-defense/src/ui.ts +2 -2
- package/bin/create.ts +15 -11
- package/looks/catalogue.json +123 -2
- package/package.json +2 -2
- package/template/package.json +1 -1
- package/template/project.ogt +1 -1
- package/template-2d/README.md +3 -2
- package/template-2d/package.json +1 -1
- package/template-2d/project.ogt +1 -1
- package/template-2d/src/main.ts +111 -30
- package/template-2d/tests/keeper.og.ts +93 -8
package/README.md
CHANGED
|
@@ -35,8 +35,11 @@ catalogue (`packages/knowledge/looks/catalogue.json`, 37 styles):
|
|
|
35
35
|
- `--premise "<one line>"` picks the style whose premise fits best (a word
|
|
36
36
|
of the premise in a style's genre counts 3, in its mood 2, in its era,
|
|
37
37
|
audience, name or descriptor 1; a tie goes to a style the engine draws
|
|
38
|
-
whole, then to catalogue order)
|
|
39
|
-
|
|
38
|
+
whole, then to catalogue order), among the styles whose `look.profiles`
|
|
39
|
+
include the game's profile: a 3D game never gets a flipbook-only style,
|
|
40
|
+
a 2D one never a style of lit meshes (`--look` names any). On a
|
|
41
|
+
terminal, with neither flag, create asks for the premise (`--no-prompt`
|
|
42
|
+
does not);
|
|
40
43
|
- otherwise the template's own look stays: the plain template extends
|
|
41
44
|
`faceted-low-poly`, the idle archetype carries its UI style and render
|
|
42
45
|
settings, and the other archetypes get a look that extends nothing (their
|
package/archetypes/README.md
CHANGED
|
@@ -64,7 +64,7 @@ commands its playtests use and what a Maker changes first.
|
|
|
64
64
|
og.CharacterController with blend trees and IK, navmesh sentinels on
|
|
65
65
|
og.ai, particles, decals and the post stack, on the fantasy style pack
|
|
66
66
|
(its README).
|
|
67
|
-
- **The look as data.** `idle/` names its frame treatment and
|
|
67
|
+
- **The look as data.** `idle/` names its frame treatment and style in
|
|
68
68
|
`assets/looks/idle.ogt` through `GameDesc.look` (og-taste §12); the
|
|
69
69
|
others set theirs in `start` until they move to a look. A look that
|
|
70
70
|
extends a catalogue preset changes the frames, so `references/` are
|
|
@@ -168,10 +168,10 @@ pure functions, the stars come from an og.Rng stream forked by name, and
|
|
|
168
168
|
an `owned<n>` field.
|
|
169
169
|
3. **Prestige**: `novaGain`, `dustMultiplier`.
|
|
170
170
|
4. **The look**: `assets/looks/idle.ogt` (named by `GameDesc.look`) holds
|
|
171
|
-
the frame's treatment and names the
|
|
171
|
+
the frame's treatment and names the style; `extends "<slug>"` there
|
|
172
172
|
starts from a style of the catalogue (og-taste §12), and the reference
|
|
173
173
|
frames are then recorded again (`OG_FX_CAPTURE=1 og test .`). The
|
|
174
|
-
|
|
174
|
+
style's palette is `assets/styles/sparkorb/style.ogt`, the art
|
|
175
175
|
`tools/make-assets.py`: `python3 tools/make-assets.py && og cook .`.
|
|
176
176
|
5. **Words and numbers**: `assets/strings/*.ogt` (a locale's `num.step`
|
|
177
177
|
and units make its big numbers); a new Chinese string needs the script
|
|
@@ -221,8 +221,8 @@ in the engine repository).
|
|
|
221
221
|
`tools/make-assets.py` regenerates every asset byte for byte (two runs
|
|
222
222
|
give the same bytes): the orb, the glow, the spark and the motes, the
|
|
223
223
|
emitters, the sounds and the music, the `og sfx` preset files of the UI's
|
|
224
|
-
sounds, the font subset and the
|
|
225
|
-
lists them; the
|
|
224
|
+
sounds, the font subset and the style's recoloured atlas. `LICENSES.md`
|
|
225
|
+
lists them; the style's are in `assets/styles/sparkorb/LICENSES.md`.
|
|
226
226
|
|
|
227
227
|
## Known limits (engine gaps, not design)
|
|
228
228
|
|
|
@@ -7,7 +7,7 @@ version 1
|
|
|
7
7
|
# suit a glowing orb) adds that style's treatment under the lines below,
|
|
8
8
|
# and the reference frames are then recorded again (OG_FX_CAPTURE=1 og test .).
|
|
9
9
|
name "Spark Orb"
|
|
10
|
-
# The UI wears the sparkorb
|
|
10
|
+
# The UI wears the sparkorb style (start keeps it and adds the sounds).
|
|
11
11
|
ui "styles/sparkorb/style.ogt"
|
|
12
12
|
# The night and the orb are authored colour: not tone mapped, and no light
|
|
13
13
|
# from the sky.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Spark Orb's
|
|
1
|
+
# Spark Orb's style (the engine's neon style pack, recoloured): licences
|
|
2
2
|
|
|
3
3
|
The palette, the body size and the fallback font in `style.ogt` are this
|
|
4
4
|
game's edits by hand; `atlas.png` is the pack's atlas with its magenta
|
|
@@ -15,5 +15,5 @@ frames turned violet by `tools/make-assets.py`; the rest is the pack as
|
|
|
15
15
|
| `Rajdhani-Bold.ttf` | SIL Open Font License 1.1 (`OFL.txt`) | Rajdhani Bold (Indian Type Foundry, Google Fonts); subset to Latin-1 with fontTools. Copyright (c) 2014 Indian Type Foundry (info@indiantypefoundry.com) |
|
|
16
16
|
|
|
17
17
|
Characters these fonts lack (Chinese, Japanese, Korean) are drawn with the
|
|
18
|
-
|
|
18
|
+
style's `fallback` font, `fonts/NotoSansSC-subset.ttf` (Noto Sans SC subset to
|
|
19
19
|
this game's Chinese strings, OFL 1.1, `assets/fonts/OFL.txt`).
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
type style
|
|
2
2
|
version 1
|
|
3
3
|
---
|
|
4
|
-
# Spark Orb's
|
|
4
|
+
# Spark Orb's style: the engine's neon style pack (templates/ui-kit/tools/make-styles.py, CC0 art,
|
|
5
5
|
# OFL fonts; LICENSES.md) with this game's palette (the orb's gold as the one accent on night
|
|
6
6
|
# violet) and its Chinese fallback font, edited by hand.
|
|
7
7
|
name "sparkorb"
|
|
@@ -24,7 +24,7 @@ export const Sound = { Tap: 1, Buy: 2, Milestone: 4, Nova: 8, Welcome: 16, Move:
|
|
|
24
24
|
/** The run, the save and the effects' bookkeeping. */
|
|
25
25
|
export const Game = defineResource("Game", {
|
|
26
26
|
phase: u32(Phase.Title, { doc: "Phase.* of src/components.ts." }),
|
|
27
|
-
leftTitle: bool(false, { doc: "The player has left the title the game opened on: from then on the title enters with the
|
|
27
|
+
leftTitle: bool(false, { doc: "The player has left the title the game opened on: from then on the title enters with the style's entrance (the opening one is built settled, og.ui.mainMenu's instant: the web draws it behind the play gate)." }),
|
|
28
28
|
paused: bool(false),
|
|
29
29
|
settingsOpen: bool(false),
|
|
30
30
|
held: bool(false, { doc: "The time scale is held at 0 (paused, in the settings or a dialog)." }),
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// the rate.
|
|
10
10
|
//
|
|
11
11
|
// The look (GameDesc.look, a file under assets/looks/) sets the frame's
|
|
12
|
-
// treatment and the UI
|
|
12
|
+
// treatment and the UI style before start runs. `start` loads the strings,
|
|
13
13
|
// the sounds and the orb's art and spawns the rows: the orb and its glow,
|
|
14
14
|
// 48 motes (12 per generator), the burst pools, a voice per sound and the
|
|
15
15
|
// music. The systems are in
|
|
@@ -35,11 +35,11 @@ function must<T>(r: { ok: true; value?: T } | { ok: false; reason: string }): T
|
|
|
35
35
|
|
|
36
36
|
function start(world: World): void {
|
|
37
37
|
for (const l of LANGUAGES) must(og.i18n.load(world, `strings/${l.code}.ogt`));
|
|
38
|
-
// GameDesc.look set the frame and loaded the
|
|
39
|
-
// keeps that
|
|
40
|
-
const
|
|
38
|
+
// GameDesc.look set the frame and loaded the style before start; the UI
|
|
39
|
+
// keeps that style and adds the sounds.
|
|
40
|
+
const style = og.render.look(world)?.style ?? null;
|
|
41
41
|
const sound = (path: string) => must(og.load.sound(world, path));
|
|
42
|
-
must(og.ui.configure(world, { style
|
|
42
|
+
must(og.ui.configure(world, { style, sounds: { press: sound("audio/ui-press.ogt"), open: sound("audio/ui-open.ogt"), close: sound("audio/ui-close.ogt"), error: sound("audio/ui-error.ogt"), success: sound("audio/ui-success.ogt") } }));
|
|
43
43
|
|
|
44
44
|
const camera = must(world.resource(og.Camera));
|
|
45
45
|
camera.orthographic = true;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Spark Orb's screens on og.ui and the
|
|
1
|
+
// Spark Orb's screens on og.ui and the style in assets/styles/sparkorb (the
|
|
2
2
|
// engine's neon pack in the orb's gold on night violet): the title, the
|
|
3
3
|
// HUD (the sparks and their rate top left, stardust and pause top right,
|
|
4
4
|
// the four generators along the bottom, the supernova's progress), the
|
|
@@ -25,7 +25,7 @@ export const LANGUAGES = [
|
|
|
25
25
|
{ code: "zh-CN", key: "lang.zh" },
|
|
26
26
|
] as const;
|
|
27
27
|
|
|
28
|
-
/** The generators' icons in the
|
|
28
|
+
/** The generators' icons in the style's atlas. */
|
|
29
29
|
const ICONS = ["fire", "bolt", "gem", "star"] as const;
|
|
30
30
|
|
|
31
31
|
/** The tokens' spacing scale in CSS px (og.ui.frameTheme answers it too, but builds the whole theme each call). */
|
|
@@ -373,7 +373,7 @@ export const Ui = defineSystem("Ui", { reads: [Tuning, og.Input, og.Gamepad], wr
|
|
|
373
373
|
],
|
|
374
374
|
footer: say(world, "title.footer"),
|
|
375
375
|
// The title the game opens on is built settled: the web draws it behind the play gate, where
|
|
376
|
-
// the
|
|
376
|
+
// the style's entrance would stand part-way until the tap (og-platform-sdk §3). Later titles enter.
|
|
377
377
|
instant: !g.leftTitle,
|
|
378
378
|
});
|
|
379
379
|
if (!g.settingsOpen && r.selected === "play") {
|
|
@@ -272,7 +272,7 @@ render sprite 0
|
|
|
272
272
|
""")
|
|
273
273
|
|
|
274
274
|
|
|
275
|
-
# ── the
|
|
275
|
+
# ── the style's atlas ───────────────────────────────────────────────────────
|
|
276
276
|
|
|
277
277
|
def read_png(path):
|
|
278
278
|
"""An 8-bit RGBA, non-interlaced PNG's rows of pixels (what make-styles.py writes)."""
|
|
@@ -70,7 +70,7 @@ og build . --publish # dist/: the play page as it ships
|
|
|
70
70
|
of ten or more broken, louder); the rings breathe with the beat (not
|
|
71
71
|
with reduced motion). There is no hit stop: it would hold the picture
|
|
72
72
|
while the music runs on.
|
|
73
|
-
- **Screens on og.ui with a
|
|
73
|
+
- **Screens on og.ui with a style** (og-ui §2–§6, og-taste §1–§7): the
|
|
74
74
|
engine's sci-fi pack recoloured as `assets/styles/lanebeat`; the title
|
|
75
75
|
(Play, Calibrate, Settings), the HUD (the score as an `og.ui.counter`
|
|
76
76
|
and the groove top left, Pause top right, the combo beside the
|
|
@@ -221,7 +221,7 @@ in the engine repository).
|
|
|
221
221
|
give the same bytes): the chart and the stems from one set of note lists,
|
|
222
222
|
the click, the taps, the miss, the clear and the fail, the note, the ring,
|
|
223
223
|
the lane's glow, the spark, the hit's burst, the `og sfx` preset files of
|
|
224
|
-
the UI's sounds and the font subset. `LICENSES.md` lists them; the
|
|
224
|
+
the UI's sounds and the font subset. `LICENSES.md` lists them; the style's
|
|
225
225
|
are in `assets/styles/lanebeat/LICENSES.md`.
|
|
226
226
|
|
|
227
227
|
## Known limits (engine gaps, not design)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Three-Lane Beat's
|
|
1
|
+
# Three-Lane Beat's style (the engine's sci-fi style pack, recoloured): licences
|
|
2
2
|
|
|
3
3
|
The palette, the body sizes and the fallback font in `style.ogt` are this
|
|
4
4
|
game's edits by hand; the rest is the pack as `templates/styles/scifi` ships it.
|
|
@@ -13,5 +13,5 @@ game's edits by hand; the rest is the pack as `templates/styles/scifi` ships it.
|
|
|
13
13
|
| `Orbitron-Bold.ttf` | SIL Open Font License 1.1 (`OFL.txt`) | Orbitron Bold (github.com/theleagueof/orbitron); unmodified. Copyright 2018 The Orbitron Project Authors (https://github.com/theleagueof/orbitron), with Reserved Font Name: "Orbitron". |
|
|
14
14
|
|
|
15
15
|
Characters these fonts lack (Chinese, Japanese, Korean) are drawn with the
|
|
16
|
-
|
|
16
|
+
style's `fallback` font, `fonts/NotoSansSC-subset.ttf` (Noto Sans SC subset to
|
|
17
17
|
this game's Chinese strings, OFL 1.1, `assets/fonts/OFL.txt`).
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
type style
|
|
2
2
|
version 1
|
|
3
3
|
---
|
|
4
|
-
# Three-Lane Beat's
|
|
4
|
+
# Three-Lane Beat's style: the engine's sci-fi style pack (templates/ui-kit/tools/make-styles.py,
|
|
5
5
|
# CC0 art, OFL fonts; LICENSES.md) with this game's palette and its Chinese fallback font, by hand.
|
|
6
6
|
name "lanebeat"
|
|
7
7
|
scheme dark
|
|
@@ -25,7 +25,7 @@ export const Sound = { Tap0: 1, Tap1: 2, Tap2: 4, Miss: 8, Clear: 16, Fail: 32,
|
|
|
25
25
|
/** The play: the song's clock, the judgements, the score, the groove, the calibration, the best. */
|
|
26
26
|
export const Game = defineResource("Game", {
|
|
27
27
|
phase: u32(Phase.Title, { doc: "Phase.* of src/components.ts." }),
|
|
28
|
-
leftTitle: bool(false, { doc: "The player has left the title the game opened on: from then on the title enters with the
|
|
28
|
+
leftTitle: bool(false, { doc: "The player has left the title the game opened on: from then on the title enters with the style's entrance (the opening one is built settled, og.ui.mainMenu's instant: the web draws it behind the play gate)." }),
|
|
29
29
|
paused: bool(false),
|
|
30
30
|
settingsOpen: bool(false),
|
|
31
31
|
held: bool(false, { doc: "The time scale is held at 0 (paused or in the settings)." }),
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
//
|
|
10
10
|
// The song is its stems, started on bar lines through og.Music (src/
|
|
11
11
|
// systems.ts's Band); the chart is a scene (assets/charts/neon-pulse.ogt)
|
|
12
|
-
// of a Song row and a Note row per note. `start` loads them, the
|
|
12
|
+
// of a Song row and a Note row per note. `start` loads them, the style, the
|
|
13
13
|
// strings and the sounds, and spawns the clock, the stems, the receptors
|
|
14
14
|
// and the voices. The systems are in src/systems.ts, the screens in
|
|
15
15
|
// src/ui.ts and the state in src/components.ts.
|
|
@@ -32,9 +32,9 @@ function must<T>(r: { ok: true; value?: T } | { ok: false; reason: string }): T
|
|
|
32
32
|
|
|
33
33
|
function start(world: World): void {
|
|
34
34
|
for (const l of LANGUAGES) must(og.i18n.load(world, `strings/${l.code}.ogt`));
|
|
35
|
-
const
|
|
35
|
+
const style = must(og.load.style(world, "styles/lanebeat/style.ogt"));
|
|
36
36
|
const sound = (path: string) => must(og.load.sound(world, path));
|
|
37
|
-
must(og.ui.configure(world, { style
|
|
37
|
+
must(og.ui.configure(world, { style, sounds: { press: sound("audio/ui-press.ogt"), open: sound("audio/ui-open.ogt"), close: sound("audio/ui-close.ogt"), error: sound("audio/ui-error.ogt"), success: sound("audio/ui-success.ogt") } }));
|
|
38
38
|
|
|
39
39
|
const settings = must(world.resource(og.RenderSettings));
|
|
40
40
|
settings.environmentIntensity = 0;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Three-Lane Beat's screens on og.ui and the
|
|
1
|
+
// Three-Lane Beat's screens on og.ui and the style in assets/styles/lanebeat
|
|
2
2
|
// (the engine's sci-fi pack): the title, the HUD (the score and the groove
|
|
3
3
|
// top left, Pause top right, the combo and its multiplier beside the
|
|
4
4
|
// highway), the pause menu, the settings with the offset, the calibration
|
|
@@ -380,7 +380,7 @@ export const Ui = defineSystem("Ui", { reads: [Tuning, og.Input, og.Gamepad], wr
|
|
|
380
380
|
],
|
|
381
381
|
footer: say(world, "title.footer"),
|
|
382
382
|
// The title the game opens on is built settled: the web draws it behind the play gate, where
|
|
383
|
-
// the
|
|
383
|
+
// the style's entrance would stand part-way until the tap (og-platform-sdk §3). Later titles enter.
|
|
384
384
|
instant: !g.leftTitle,
|
|
385
385
|
});
|
|
386
386
|
if (!g.settingsOpen && r.selected === "play") begin(world, g);
|
|
@@ -61,7 +61,7 @@ og build . --publish # dist/: the play page as it ships
|
|
|
61
61
|
flash, a squash, the red number, a hit stop and a kick; the guardian
|
|
62
62
|
glows red and shows "!" the turn before a charged strike (twice the hit
|
|
63
63
|
stop and trauma); its fall and the lamp going out are heavier still.
|
|
64
|
-
- **Screens on og.ui with a
|
|
64
|
+
- **Screens on og.ui with a style** (og-ui §2–§6, og-taste §1–§7): the
|
|
65
65
|
engine's pixel pack recoloured as `assets/styles/lampdive` (the tomb's
|
|
66
66
|
violet panels, the lamp's amber as the one accent); the title over the
|
|
67
67
|
lamp-lit first room, the HUD as capsules in the corners (health meter,
|
|
@@ -237,7 +237,7 @@ in the engine repository).
|
|
|
237
237
|
`tools/make-assets.py` regenerates every asset byte for byte (two runs
|
|
238
238
|
give the same bytes): the tileset, the map, the sprite sheet and the glow,
|
|
239
239
|
the sounds and the music, the `og sfx` preset files of the UI's sounds and
|
|
240
|
-
the footstep, and the font subset. `LICENSES.md` lists them; the
|
|
240
|
+
the footstep, and the font subset. `LICENSES.md` lists them; the style's
|
|
241
241
|
are in `assets/styles/lampdive/LICENSES.md`.
|
|
242
242
|
|
|
243
243
|
## Known limits (engine gaps, not design)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Lamp Dive's
|
|
1
|
+
# Lamp Dive's style (the engine's pixel style pack, recoloured): licences
|
|
2
2
|
|
|
3
3
|
The palette, the body text's 1 px dark shadow and the fallback font in
|
|
4
4
|
`style.ogt` are this game's edits by hand; the rest is the pack as
|
|
@@ -12,5 +12,5 @@ The palette, the body text's 1 px dark shadow and the fallback font in
|
|
|
12
12
|
| `DotGothic16-Regular.ttf` | SIL Open Font License 1.1 (`OFL.txt`) | DotGothic16 (github.com/fontworks-fonts/DotGothic16); subset to Latin-1 with fontTools. Copyright 2020 The DotGothic16 Project Authors (https://github.com/fontworks-fonts/DotGothic16/) |
|
|
13
13
|
|
|
14
14
|
Characters these fonts lack (Chinese, Japanese, Korean) are drawn with the
|
|
15
|
-
|
|
15
|
+
style's `fallback` font, `fonts/NotoSansSC-subset.ttf` (Noto Sans SC subset to
|
|
16
16
|
this game's Chinese strings, OFL 1.1, `assets/fonts/OFL.txt`).
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
type style
|
|
2
2
|
version 1
|
|
3
3
|
---
|
|
4
|
-
# Lamp Dive's
|
|
4
|
+
# Lamp Dive's style: the engine's pixel style pack (templates/ui-kit/tools/make-styles.py; CC0 art, OFL
|
|
5
5
|
# fonts; LICENSES.md) in tomb colours: plum stone panels, the lamp's amber as the one accent.
|
|
6
6
|
name "lampdive"
|
|
7
7
|
scheme dark
|
|
@@ -30,7 +30,7 @@ export const LOOT_SLOTS = 12;
|
|
|
30
30
|
/** The dive: the lamp-bearer, the floor, the turn, the counts and the effects' bookkeeping. */
|
|
31
31
|
export const Game = defineResource("Game", {
|
|
32
32
|
phase: u32(Phase.Title, { doc: "Phase.* of src/components.ts." }),
|
|
33
|
-
leftTitle: bool(false, { doc: "The player has left the title the game opened on: from then on the title enters with the
|
|
33
|
+
leftTitle: bool(false, { doc: "The player has left the title the game opened on: from then on the title enters with the style's entrance (the opening one is built settled, og.ui.mainMenu's instant: the web draws it behind the play gate)." }),
|
|
34
34
|
paused: bool(false),
|
|
35
35
|
settingsOpen: bool(false),
|
|
36
36
|
held: bool(false, { doc: "The time scale is held at 0 (paused or in the settings)." }),
|
|
@@ -37,9 +37,9 @@ function must<T>(r: { ok: true; value?: T } | { ok: false; reason: string }): T
|
|
|
37
37
|
|
|
38
38
|
function start(world: World): void {
|
|
39
39
|
for (const l of LANGUAGES) must(og.i18n.load(world, `strings/${l.code}.ogt`));
|
|
40
|
-
const
|
|
40
|
+
const style = must(og.load.style(world, "styles/lampdive/style.ogt"));
|
|
41
41
|
const sound = (path: string) => must(og.load.sound(world, path));
|
|
42
|
-
must(og.ui.configure(world, { style
|
|
42
|
+
must(og.ui.configure(world, { style, sounds: { press: sound("audio/ui-press.ogt"), open: sound("audio/ui-open.ogt"), close: sound("audio/ui-close.ogt"), error: sound("audio/ui-error.ogt"), success: sound("audio/ui-success.ogt") } }));
|
|
43
43
|
|
|
44
44
|
const settings = must(world.resource(og.RenderSettings));
|
|
45
45
|
settings.environmentIntensity = 0;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Lamp Dive's screens on og.ui and the
|
|
1
|
+
// Lamp Dive's screens on og.ui and the style in assets/styles/lampdive (the
|
|
2
2
|
// engine's pixel pack in tomb colours): the title, the HUD (health, strike,
|
|
3
3
|
// armour and gold in the top-left corner, the floor and pause in the
|
|
4
4
|
// top-right, the draught and, on a touch screen, Wait and a d-pad along the
|
|
@@ -317,7 +317,7 @@ export const Ui = defineSystem("Ui", { reads: [Tuning], writes: [Game, Prefs, og
|
|
|
317
317
|
],
|
|
318
318
|
footer: say(world, "title.footer"),
|
|
319
319
|
// The title the game opens on is built settled: the web draws it behind the play gate, where
|
|
320
|
-
// the
|
|
320
|
+
// the style's entrance would stand part-way until the tap (og-platform-sdk §3). Later titles enter.
|
|
321
321
|
instant: !g.leftTitle,
|
|
322
322
|
});
|
|
323
323
|
if (!g.settingsOpen && r.selected === "play") startDive(world, g);
|
|
@@ -180,7 +180,7 @@ stages.
|
|
|
180
180
|
2. **The pressure**: `duskSeconds`, the sentinels' speeds and sight, their
|
|
181
181
|
minds in `assets/ai/`, `HEARTS` in `src/components.ts`.
|
|
182
182
|
3. **The look**: the post stack, fog and sky in `buildVale`, the water's
|
|
183
|
-
colours, the
|
|
183
|
+
colours, the style's palette in `assets/styles/ember/style.ogt`.
|
|
184
184
|
4. **The characters**: another CC0 humanoid in `assets/models/` with the
|
|
185
185
|
clip library retargeted onto it (`src/anim.ts`), the graphs' thresholds.
|
|
186
186
|
5. **Words**: `assets/strings/*.ogt`; a new Chinese string needs the script
|
|
@@ -230,7 +230,7 @@ Nothing here is downloaded. `tools/make-assets.py` regenerates the vale's
|
|
|
230
230
|
heightmap and control map, the sounds and music, the `og sfx` presets, the
|
|
231
231
|
sentinels' minds and the font subset byte for byte; the characters, the
|
|
232
232
|
clip library, the textures and the beacon's effects are the engine's own
|
|
233
|
-
CC0 assets. `LICENSES.md` lists every file; the
|
|
233
|
+
CC0 assets. `LICENSES.md` lists every file; the style's are in
|
|
234
234
|
`assets/styles/ember/LICENSES.md`.
|
|
235
235
|
|
|
236
236
|
## Known limits (engine gaps, not design)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# The ember
|
|
1
|
+
# The ember style (a copy of the fantasy style pack): licences
|
|
2
2
|
|
|
3
3
|
| File | Licence | Origin |
|
|
4
4
|
|---|---|---|
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
| `Newsreader-Medium.ttf` | SIL Open Font License 1.1 (`OFL.txt`) | Newsreader (github.com/productiontype/Newsreader); a static instance (wght 500, opsz 16) of the variable font, subset to Latin-1 with fontTools. Copyright 2020 The Newsreader Project Authors (http://github.com/productiontype/Newsreader) |
|
|
10
10
|
|
|
11
11
|
Characters these fonts lack (Chinese, Japanese, Korean) are drawn with the
|
|
12
|
-
|
|
12
|
+
style's `fallback` font, `fonts/NotoSansSC-subset.ttf` (the platform's
|
|
13
13
|
subset, OFL 1.1, `assets/fonts/OFL.txt`).
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
type style
|
|
2
2
|
version 1
|
|
3
3
|
---
|
|
4
|
-
# Ember Vale's
|
|
4
|
+
# Ember Vale's style: a copy of the fantasy style pack (templates/ui-kit/tools/make-styles.py; CC0 art, OFL fonts; LICENSES.md).
|
|
5
5
|
name "ember"
|
|
6
6
|
scheme dark
|
|
7
7
|
atlas "styles/ember/atlas.png" 384 256
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -31,7 +31,7 @@ export const HEARTS = 3;
|
|
|
31
31
|
/** The run: the hero's progress, the clock and the effects' bookkeeping. */
|
|
32
32
|
export const Game = defineResource("Game", {
|
|
33
33
|
phase: u32(Phase.Title, { doc: "Phase.* of src/components.ts." }),
|
|
34
|
-
leftTitle: bool(false, { doc: "The player has left the title the game opened on: from then on the title enters with the
|
|
34
|
+
leftTitle: bool(false, { doc: "The player has left the title the game opened on: from then on the title enters with the style's entrance (the opening one is built settled, og.ui.mainMenu's instant: the web draws it behind the play gate)." }),
|
|
35
35
|
ending: u32(Ending.None, { doc: "Ending.* once a run is over." }),
|
|
36
36
|
paused: bool(false),
|
|
37
37
|
settingsOpen: bool(false),
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
// grab costs a heart. Three hearts gone, or night, ends the run; every
|
|
9
9
|
// beacon lit wins it. Then the summary, and again.
|
|
10
10
|
//
|
|
11
|
-
// `start` loads the strings, the
|
|
11
|
+
// `start` loads the strings, the style and the sounds, builds the vale
|
|
12
12
|
// (src/world.ts) and spawns the hero (src/hero.ts), the sentinels
|
|
13
13
|
// (src/sentinels.ts) and the voices (src/sound.ts). The beacons are in
|
|
14
14
|
// src/beacons.ts, the screens and the run's clock in src/ui.ts and the
|
|
@@ -26,9 +26,9 @@ import { BEACON_AT, buildVale, ground, HOURS, must, setHour } from "./world.ts";
|
|
|
26
26
|
|
|
27
27
|
function start(world: World): void {
|
|
28
28
|
for (const l of LANGUAGES) must(og.i18n.load(world, `strings/${l.code}.ogt`));
|
|
29
|
-
const
|
|
29
|
+
const style = must(og.load.style(world, "styles/ember/style.ogt"));
|
|
30
30
|
const sound = (path: string) => must(og.load.sound(world, path));
|
|
31
|
-
must(og.ui.configure(world, { style
|
|
31
|
+
must(og.ui.configure(world, { style, sounds: { press: sound("audio/ui-press.ogt"), open: sound("audio/ui-open.ogt"), close: sound("audio/ui-close.ogt"), error: sound("audio/ui-error.ogt"), success: sound("audio/ui-success.ogt") } }));
|
|
32
32
|
buildVale(world);
|
|
33
33
|
spawnHero(world);
|
|
34
34
|
spawnSentinels(world);
|
|
@@ -31,7 +31,7 @@ export function spawnVoices(world: World): void {
|
|
|
31
31
|
must(world.insert(fx, og.AudioBusFx, { bus: "music", duck: true, duckBus: "sfx", duckDepth: 5, duckRelease: 0.6 }));
|
|
32
32
|
const echo = must(world.spawn({ name: "sfx-bus" }));
|
|
33
33
|
must(world.insert(echo, og.AudioBusFx, { bus: "sfx", reverb: 0.18 }));
|
|
34
|
-
// The touch HUD's Jump and Kindle: the
|
|
34
|
+
// The touch HUD's Jump and Kindle: the style's press sound on the ui bus,
|
|
35
35
|
// like every og.ui button, beside the jump's or the fire's own effect.
|
|
36
36
|
const tap = must(world.spawn({ name: `sfx-${Sound.Tap}` }));
|
|
37
37
|
must(world.insert(tap, og.AudioSource, { sound: sound("audio/ui-press.ogt"), playing: false, bus: "ui", volume: 0.5, priority: 150 }));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Ember Vale's screens on og.ui and the
|
|
1
|
+
// Ember Vale's screens on og.ui and the style in assets/styles/ember (the
|
|
2
2
|
// engine's fantasy pack): the title over an orbit of the vale, the HUD
|
|
3
3
|
// (hearts and beacons top-left, the dusk clock and pause top-right, the
|
|
4
4
|
// kindling prompt and its progress at the bottom; on a touch screen a
|
|
@@ -421,7 +421,7 @@ export const Ui = defineSystem("Ui", { reads: [Tuning, og.Gamepad, og.Pointers],
|
|
|
421
421
|
],
|
|
422
422
|
footer: say(world, og.ui.frameViewport().coarsePointer ? "title.footer.touch" : "title.footer"),
|
|
423
423
|
// The title the game opens on is built settled: the web draws it behind the play gate, where
|
|
424
|
-
// the
|
|
424
|
+
// the style's entrance would stand part-way until the tap (og-platform-sdk §3). Later titles enter.
|
|
425
425
|
instant: !g.leftTitle,
|
|
426
426
|
});
|
|
427
427
|
if (!g.settingsOpen && r.selected === "play" && g.phase === Phase.Title) startRun(world, g);
|