@origingame/create-game 0.1.0 → 0.2.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 +15 -7
- package/archetypes/README.md +4 -2
- package/archetypes/idle/gitignore +8 -0
- package/archetypes/idle/package.json +1 -1
- package/archetypes/idle/project.ogt +1 -1
- package/archetypes/match3/gitignore +8 -0
- package/archetypes/match3/package.json +1 -1
- package/archetypes/match3/project.ogt +1 -1
- package/archetypes/rhythm/gitignore +8 -0
- package/archetypes/rhythm/package.json +1 -1
- package/archetypes/rhythm/project.ogt +1 -1
- package/archetypes/roguelike/gitignore +8 -0
- package/archetypes/roguelike/package.json +1 -1
- package/archetypes/roguelike/project.ogt +1 -1
- package/archetypes/runner/gitignore +8 -0
- package/archetypes/runner/package.json +1 -1
- package/archetypes/runner/project.ogt +1 -1
- package/archetypes/third-person/gitignore +8 -0
- package/archetypes/third-person/package.json +1 -1
- package/archetypes/third-person/project.ogt +1 -1
- package/archetypes/topdown/gitignore +8 -0
- package/archetypes/topdown/package.json +1 -1
- package/archetypes/topdown/project.ogt +1 -1
- package/archetypes/tower-defense/gitignore +8 -0
- package/archetypes/tower-defense/package.json +1 -1
- package/archetypes/tower-defense/project.ogt +1 -1
- package/bin/create.ts +80 -16
- package/package.json +5 -4
- package/template/gitignore +8 -0
- package/template/package.json +1 -1
- package/template/project.ogt +1 -1
- package/template-2d/.origin/setup +14 -0
- package/template-2d/LICENSES.md +14 -0
- package/template-2d/README.md +39 -0
- package/template-2d/assets/audio/coin.wav +0 -0
- package/template-2d/assets/audio/jump.wav +0 -0
- package/template-2d/assets/fonts/OFL.txt +93 -0
- package/template-2d/assets/fonts/ui.ttf +0 -0
- package/template-2d/assets/fonts/ui.ttf.ogt +11 -0
- package/template-2d/assets/looks/origin-game-2d.ogt +12 -0
- package/template-2d/assets/maps/level.ogt +112 -0
- package/template-2d/assets/sprites/coin.ogt +11 -0
- package/template-2d/assets/sprites/coin.png +0 -0
- package/template-2d/assets/sprites/coin.png.ogt +7 -0
- package/template-2d/assets/sprites/courier.ogt +34 -0
- package/template-2d/assets/sprites/courier.png +0 -0
- package/template-2d/assets/sprites/courier.png.ogt +7 -0
- package/template-2d/assets/strings/en.ogt +11 -0
- package/template-2d/assets/tiles/city.ogt +17 -0
- package/template-2d/assets/tiles/city.png +0 -0
- package/template-2d/assets/tiles/city.png.ogt +7 -0
- package/template-2d/gitattributes +22 -0
- package/template-2d/gitignore +8 -0
- package/template-2d/package.json +18 -0
- package/template-2d/project.ogt +21 -0
- package/template-2d/src/main.ts +305 -0
- package/template-2d/tests/smoke.og.ts +60 -0
- package/template-2d/tsconfig.json +17 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
https://scripts.sil.org/OFL
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
Binary file
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type import
|
|
2
|
+
version 1
|
|
3
|
+
---
|
|
4
|
+
# The HUD's font: Noto Sans SC Regular subset to Latin-1 (the runner
|
|
5
|
+
# archetype's assets/fonts/ui.ttf). A language with other characters needs
|
|
6
|
+
# a font that holds them (og-i18n §2).
|
|
7
|
+
font {
|
|
8
|
+
charset latin
|
|
9
|
+
em_px 48
|
|
10
|
+
px_range 6
|
|
11
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type look
|
|
2
|
+
version 1
|
|
3
|
+
---
|
|
4
|
+
# The game's look (og-taste §12): the frame's art direction as data, named
|
|
5
|
+
# by GameDesc.look in src/main.ts and applied before start runs. It starts
|
|
6
|
+
# from the catalogue's 16bit-pixel preset (a 224-pixel-tall frame, eight-tone
|
|
7
|
+
# ramps, a Bayer dither: the camera's 14 units are 16 pixels each, one per
|
|
8
|
+
# texel of the tiles); a block written below wins over the preset field by
|
|
9
|
+
# field, and `extends` takes any catalogue slug. `npm create @origingame/game`
|
|
10
|
+
# writes the game's own look from its premise, or from --look <slug>.
|
|
11
|
+
name "Origin Game 2D"
|
|
12
|
+
extends "16bit-pixel"
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
type tilemap
|
|
2
|
+
version 1
|
|
3
|
+
---
|
|
4
|
+
# The level (og-game §8's grammar): 48 x 14 cells of 16 px, one world unit
|
|
5
|
+
# each, over the city tileset. The roofs collide on og.Tilemap.colliderLayers
|
|
6
|
+
# (1); the ledges name their own collider layer (2), which the courier's
|
|
7
|
+
# og.PlatformerController.oneWayLayers makes one-way: it jumps up through
|
|
8
|
+
# them and lands on top, and Down drops it through.
|
|
9
|
+
size 48 14
|
|
10
|
+
tile 16 16
|
|
11
|
+
unit 1
|
|
12
|
+
tileset "tiles/city.ogt"
|
|
13
|
+
layer skyline {
|
|
14
|
+
z -2
|
|
15
|
+
parallax 0.5 1
|
|
16
|
+
repeat x
|
|
17
|
+
legend "^" 6
|
|
18
|
+
legend "f" 4
|
|
19
|
+
legend "w" 5
|
|
20
|
+
row "................................................"
|
|
21
|
+
row "................................................"
|
|
22
|
+
row "................................................"
|
|
23
|
+
row "...........................^^^^^^^.............."
|
|
24
|
+
row ".....^^^^^^................fffffff...........^^^"
|
|
25
|
+
row ".....ffffff.....^^^^^......fwfwfwf.....^^^^^.fff"
|
|
26
|
+
row "^^^^.fwfwff.....fffff.^^^^.fffffff.....fffff.fwf"
|
|
27
|
+
row "ffff.ffffff.^^^.fwfwf.ffff.fwfwfwf.^^^.fwfwf.fff"
|
|
28
|
+
row "fwff.fwfwff.fff.fffff.fwff.fffffff.fff.fffff.fwf"
|
|
29
|
+
row "ffff.ffffff.fwf.fwfwf.ffff.fwfwfwf.fwf.fwfwf.fff"
|
|
30
|
+
row "fwff.fwfwff.fff.fffff.fwff.fffffff.fff.fffff.fwf"
|
|
31
|
+
row "ffff.ffffff.fwf.fwfwf.ffff.fwfwfwf.fwf.fwfwf.fff"
|
|
32
|
+
row "fwff.fwfwff.fff.fffff.fwff.fffffff.fff.fffff.fwf"
|
|
33
|
+
row "ffff.ffffff.fwf.fwfwf.ffff.fwfwfwf.fwf.fwfwf.fff"
|
|
34
|
+
}
|
|
35
|
+
layer roofs {
|
|
36
|
+
z 0
|
|
37
|
+
collision true
|
|
38
|
+
legend "=" 0
|
|
39
|
+
legend "b" 1
|
|
40
|
+
legend "L" 2
|
|
41
|
+
legend "D" 3
|
|
42
|
+
row "b..............................................b"
|
|
43
|
+
row "b..............................................b"
|
|
44
|
+
row "D..............................................D"
|
|
45
|
+
row "b..............................................b"
|
|
46
|
+
row "b..............................................b"
|
|
47
|
+
row "b..............................................b"
|
|
48
|
+
row "b..............................................b"
|
|
49
|
+
row "D..............................................D"
|
|
50
|
+
row "b..............................................b"
|
|
51
|
+
row "b..............................................b"
|
|
52
|
+
row "b.............................======...........b"
|
|
53
|
+
row "b.............................bbLbbb...........b"
|
|
54
|
+
row "====================...========================="
|
|
55
|
+
row "bbbLbbDbbbLbbbbbbLbb...bLbbbDbbLbbbbbbLDbbbbbLbb"
|
|
56
|
+
}
|
|
57
|
+
layer ledges {
|
|
58
|
+
z 0
|
|
59
|
+
collision true
|
|
60
|
+
colliderLayers 2
|
|
61
|
+
legend "=" 0
|
|
62
|
+
row "................................................"
|
|
63
|
+
row "................................................"
|
|
64
|
+
row "................................................"
|
|
65
|
+
row "................................................"
|
|
66
|
+
row "................................................"
|
|
67
|
+
row "................................................"
|
|
68
|
+
row ".......................=====...................."
|
|
69
|
+
row "................................................"
|
|
70
|
+
row "................................................"
|
|
71
|
+
row "...........=====................................"
|
|
72
|
+
row "................................................"
|
|
73
|
+
row "................................................"
|
|
74
|
+
row "................................................"
|
|
75
|
+
row "................................................"
|
|
76
|
+
}
|
|
77
|
+
object spawn {
|
|
78
|
+
kind "spawn"
|
|
79
|
+
at 2.5 12
|
|
80
|
+
}
|
|
81
|
+
object coin-0 {
|
|
82
|
+
kind "coin"
|
|
83
|
+
at 6.5 11.2
|
|
84
|
+
}
|
|
85
|
+
object coin-1 {
|
|
86
|
+
kind "coin"
|
|
87
|
+
at 9.5 11.2
|
|
88
|
+
}
|
|
89
|
+
object coin-2 {
|
|
90
|
+
kind "coin"
|
|
91
|
+
at 13.5 8.2
|
|
92
|
+
}
|
|
93
|
+
object coin-3 {
|
|
94
|
+
kind "coin"
|
|
95
|
+
at 21.5 9.5
|
|
96
|
+
}
|
|
97
|
+
object coin-4 {
|
|
98
|
+
kind "coin"
|
|
99
|
+
at 25.5 5.2
|
|
100
|
+
}
|
|
101
|
+
object coin-5 {
|
|
102
|
+
kind "coin"
|
|
103
|
+
at 32.5 9.2
|
|
104
|
+
}
|
|
105
|
+
object coin-6 {
|
|
106
|
+
kind "coin"
|
|
107
|
+
at 40.5 11.2
|
|
108
|
+
}
|
|
109
|
+
object goal {
|
|
110
|
+
kind "goal"
|
|
111
|
+
rect 45 10 1 2
|
|
112
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
type flipbook
|
|
2
|
+
version 1
|
|
3
|
+
---
|
|
4
|
+
# The courier (the runner archetype's sheet, tools/make-assets.py there):
|
|
5
|
+
# 32 x 40 frames standing on their feet (the pivot: the entity's position is
|
|
6
|
+
# the feet, so a squash keeps them down). Clips are numbered in file order:
|
|
7
|
+
# idle 0, run 1, jump 2, fall 3, crash 4 (src/main.ts's CLIP checks them).
|
|
8
|
+
texture "courier.png"
|
|
9
|
+
pivot 0.5 0
|
|
10
|
+
grid 32 40 8 2
|
|
11
|
+
spacing 2
|
|
12
|
+
clip idle {
|
|
13
|
+
frames 14 15
|
|
14
|
+
fps 2
|
|
15
|
+
}
|
|
16
|
+
clip run {
|
|
17
|
+
frames 0 1 2 3 4 5 6 7
|
|
18
|
+
fps 14
|
|
19
|
+
event 2 "step"
|
|
20
|
+
event 6 "step"
|
|
21
|
+
}
|
|
22
|
+
clip jump {
|
|
23
|
+
frames 8
|
|
24
|
+
fps 1
|
|
25
|
+
}
|
|
26
|
+
clip fall {
|
|
27
|
+
frames 9
|
|
28
|
+
fps 1
|
|
29
|
+
}
|
|
30
|
+
clip crash {
|
|
31
|
+
frames 10 11 12 13
|
|
32
|
+
fps 12
|
|
33
|
+
mode once
|
|
34
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type strings
|
|
2
|
+
version 1
|
|
3
|
+
---
|
|
4
|
+
# The starter's strings (og.i18n, og-i18n §1): every word the HUD shows is
|
|
5
|
+
# a key here, never a literal in a system. A locale is its own file beside
|
|
6
|
+
# it (`zh-CN.ogt`, the same keys and its `fonts` line), loaded in `start`.
|
|
7
|
+
locale "en"
|
|
8
|
+
base true
|
|
9
|
+
string "hud.level" "The Rooftops"
|
|
10
|
+
string "hud.clear" "Rooftops clear!"
|
|
11
|
+
string "pause.resume" "Resume"
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
type tileset
|
|
2
|
+
version 1
|
|
3
|
+
---
|
|
4
|
+
# The city (the runner archetype's tileset, tools/make-assets.py there):
|
|
5
|
+
# 0 roof, 1-3 bricks, 4-7 far skyline, 8-14 near buildings, 15 the
|
|
6
|
+
# antenna's light on. The roof and the bricks collide as whole cells on a
|
|
7
|
+
# layer marked `collision true` (og-game §8).
|
|
8
|
+
texture "tiles/city.png"
|
|
9
|
+
grid 16 16 4 4
|
|
10
|
+
spacing 2
|
|
11
|
+
filter nearest
|
|
12
|
+
solid 0 1 2 3
|
|
13
|
+
# A far window that goes on and off.
|
|
14
|
+
tile 5 {
|
|
15
|
+
frames 5 4 5
|
|
16
|
+
durations 2.5 0.4 1.8
|
|
17
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Media to Git LFS, as the platform's other scaffolds route them; text stays
|
|
2
|
+
# diffable (.ogt scenes and settings are line-based text by design).
|
|
3
|
+
*.glb filter=lfs diff=lfs merge=lfs -text
|
|
4
|
+
*.gltf filter=lfs diff=lfs merge=lfs -text
|
|
5
|
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
|
6
|
+
*.png filter=lfs diff=lfs merge=lfs -text
|
|
7
|
+
*.jpg filter=lfs diff=lfs merge=lfs -text
|
|
8
|
+
*.jpeg filter=lfs diff=lfs merge=lfs -text
|
|
9
|
+
*.webp filter=lfs diff=lfs merge=lfs -text
|
|
10
|
+
*.ktx2 filter=lfs diff=lfs merge=lfs -text
|
|
11
|
+
*.hdr filter=lfs diff=lfs merge=lfs -text
|
|
12
|
+
*.exr filter=lfs diff=lfs merge=lfs -text
|
|
13
|
+
*.wav filter=lfs diff=lfs merge=lfs -text
|
|
14
|
+
*.mp3 filter=lfs diff=lfs merge=lfs -text
|
|
15
|
+
*.ogg filter=lfs diff=lfs merge=lfs -text
|
|
16
|
+
*.flac filter=lfs diff=lfs merge=lfs -text
|
|
17
|
+
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
|
18
|
+
*.ttf filter=lfs diff=lfs merge=lfs -text
|
|
19
|
+
*.otf filter=lfs diff=lfs merge=lfs -text
|
|
20
|
+
*.woff2 filter=lfs diff=lfs merge=lfs -text
|
|
21
|
+
*.ogt text eol=lf
|
|
22
|
+
*.ts text eol=lf
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "origin-game-2d",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "og dev .",
|
|
8
|
+
"start": "og run .",
|
|
9
|
+
"build": "og build .",
|
|
10
|
+
"publish-build": "og build . --publish",
|
|
11
|
+
"cook": "og cook .",
|
|
12
|
+
"check": "og check .",
|
|
13
|
+
"test": "og test ."
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@origingame/engine": "0.2.0"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
type project
|
|
2
|
+
version 1
|
|
3
|
+
---
|
|
4
|
+
# The project manifest (docs/design.md §2.5): `og run`, `og build`, `og cook`,
|
|
5
|
+
# `og dev` and `og test` read it. `npm create @origingame/game` writes this
|
|
6
|
+
# 2D starter for a 2D premise (or `--profile 2d`) and fills in the name and id.
|
|
7
|
+
name "Origin Game 2D"
|
|
8
|
+
id "origin-game-2d"
|
|
9
|
+
# The engine this game is written against (design §9: upgrades are explicit).
|
|
10
|
+
engine "0.2.0"
|
|
11
|
+
entry "src/main.ts"
|
|
12
|
+
# 2d: an orthographic camera, sprites, flipbooks, tilemaps and 2D physics.
|
|
13
|
+
profile "2d"
|
|
14
|
+
tick 60
|
|
15
|
+
seed 1
|
|
16
|
+
publish {
|
|
17
|
+
# `og build --publish` keeps only the player-facing probe members
|
|
18
|
+
# (hello, tick, state, pick, entity, input, capture).
|
|
19
|
+
probe player
|
|
20
|
+
out "dist"
|
|
21
|
+
}
|