Compare commits
7 Commits
master
...
newtileset
| Author | SHA1 | Date | |
|---|---|---|---|
| 8b0072d774 | |||
| 720c9f305e | |||
| baf031b7c5 | |||
| 885289351f | |||
| 20fbf00941 | |||
| 4d6a8943a6 | |||
| dd5d0a7a04 |
3
Makefile
@ -30,3 +30,6 @@ wasm: buildwasm zipwasm
|
|||||||
|
|
||||||
test:
|
test:
|
||||||
@echo $(VERSION)
|
@echo $(VERSION)
|
||||||
|
|
||||||
|
nixshell:
|
||||||
|
nix-shell -p xorg.libX11 xorg.libXrandr libGL xorg.libXcursor xorg.libXinerama xorg.libXi xorg.libXxf86vm xorg_sys_opengl
|
||||||
|
|||||||
@ -44,8 +44,8 @@ type AnimationMeta struct {
|
|||||||
|
|
||||||
// Needed to thaw sprite set written by asesprite
|
// Needed to thaw sprite set written by asesprite
|
||||||
type AnimationJSON struct {
|
type AnimationJSON struct {
|
||||||
Meta AnimationMeta `json:"Meta"`
|
Meta AnimationMeta `json:"Meta"`
|
||||||
Frames []AnimationFrame `json:"frames"`
|
Frames map[string]AnimationFrame `json:"frames"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// used to store Animation data
|
// used to store Animation data
|
||||||
@ -133,7 +133,7 @@ func ReadJson(imagefile fs.DirEntry, fd fs.File) AnimationJSON {
|
|||||||
|
|
||||||
err := json.Unmarshal(buf.Bytes(), &animationjson)
|
err := json.Unmarshal(buf.Bytes(), &animationjson)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("failed to parse JSON: %s", err)
|
log.Fatalf("failed to parse JSON in %s: %s", imagefile, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
return animationjson
|
return animationjson
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 931 B After Width: | Height: | Size: 931 B |
BIN
assets/oldsprites/sprites/collectible.ase
Normal file
BIN
assets/oldsprites/sprites/collectible.png
Normal file
|
After Width: | Height: | Size: 448 B |
BIN
assets/oldsprites/sprites/door.ase
Normal file
|
Before Width: | Height: | Size: 615 B After Width: | Height: | Size: 615 B |
|
Before Width: | Height: | Size: 357 B After Width: | Height: | Size: 357 B |
|
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 7.0 KiB |
BIN
assets/oldsprites/sprites/entitymap.xcf
Normal file
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 712 B After Width: | Height: | Size: 712 B |
|
Before Width: | Height: | Size: 967 B After Width: | Height: | Size: 967 B |
|
Before Width: | Height: | Size: 935 B After Width: | Height: | Size: 935 B |
|
Before Width: | Height: | Size: 950 B After Width: | Height: | Size: 950 B |
|
Before Width: | Height: | Size: 1023 B After Width: | Height: | Size: 1023 B |
|
Before Width: | Height: | Size: 963 B After Width: | Height: | Size: 963 B |
|
Before Width: | Height: | Size: 77 KiB After Width: | Height: | Size: 77 KiB |
|
Before Width: | Height: | Size: 744 B After Width: | Height: | Size: 744 B |
|
Before Width: | Height: | Size: 884 B After Width: | Height: | Size: 884 B |
|
Before Width: | Height: | Size: 441 B After Width: | Height: | Size: 441 B |
|
Before Width: | Height: | Size: 448 B After Width: | Height: | Size: 448 B |
BIN
assets/oldsprites/sprites/tilemap-oil.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 781 B After Width: | Height: | Size: 781 B |
BIN
assets/space/collectible.ase
Normal file
BIN
assets/space/correct-oil-palette.ase
Normal file
39
assets/space/correct-oil.pal
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
JASC-PAL
|
||||||
|
0100
|
||||||
|
36
|
||||||
|
0 0 0
|
||||||
|
0 0 0
|
||||||
|
14 14 14
|
||||||
|
29 29 29
|
||||||
|
51 51 51
|
||||||
|
80 80 80
|
||||||
|
99 99 99
|
||||||
|
122 122 122
|
||||||
|
167 167 167
|
||||||
|
192 192 192
|
||||||
|
228 228 228
|
||||||
|
251 245 239
|
||||||
|
242 211 171
|
||||||
|
237 193 132
|
||||||
|
229 164 88
|
||||||
|
222 112 44
|
||||||
|
181 52 28
|
||||||
|
139 22 22
|
||||||
|
198 159 165
|
||||||
|
183 134 134
|
||||||
|
164 102 102
|
||||||
|
133 79 79
|
||||||
|
110 65 83
|
||||||
|
74 44 65
|
||||||
|
174 166 195
|
||||||
|
160 130 170
|
||||||
|
139 109 156
|
||||||
|
119 86 127
|
||||||
|
108 76 112
|
||||||
|
64 53 79
|
||||||
|
89 97 153
|
||||||
|
73 77 126
|
||||||
|
49 57 85
|
||||||
|
37 38 63
|
||||||
|
24 23 38
|
||||||
|
16 13 21
|
||||||
BIN
assets/space/robot.gif
Normal file
|
After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 12 KiB |
BIN
assets/space/tilemap-oil/tilemap-oil_space bg.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
assets/space/tilemap-oil/tilemap-oil_space machinery.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
9
assets/sprites/Makefile
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
all:
|
||||||
|
@echo noting
|
||||||
|
|
||||||
|
clean:
|
||||||
|
./rename.sh door1.png door-closed.png
|
||||||
|
./rename.sh door2.png door-open.png
|
||||||
|
./rename.sh transient1.png transient-open.png
|
||||||
|
./rename.sh transient2.png transient-closed.png
|
||||||
|
fd '[2-9]' --exec rm
|
||||||
|
Before Width: | Height: | Size: 448 B After Width: | Height: | Size: 292 B |
BIN
assets/sprites/correct-oil-palette.ase
Normal file
39
assets/sprites/correct-oil.pal
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
JASC-PAL
|
||||||
|
0100
|
||||||
|
36
|
||||||
|
0 0 0
|
||||||
|
0 0 0
|
||||||
|
14 14 14
|
||||||
|
29 29 29
|
||||||
|
51 51 51
|
||||||
|
80 80 80
|
||||||
|
99 99 99
|
||||||
|
122 122 122
|
||||||
|
167 167 167
|
||||||
|
192 192 192
|
||||||
|
228 228 228
|
||||||
|
251 245 239
|
||||||
|
242 211 171
|
||||||
|
237 193 132
|
||||||
|
229 164 88
|
||||||
|
222 112 44
|
||||||
|
181 52 28
|
||||||
|
139 22 22
|
||||||
|
198 159 165
|
||||||
|
183 134 134
|
||||||
|
164 102 102
|
||||||
|
133 79 79
|
||||||
|
110 65 83
|
||||||
|
74 44 65
|
||||||
|
174 166 195
|
||||||
|
160 130 170
|
||||||
|
139 109 156
|
||||||
|
119 86 127
|
||||||
|
108 76 112
|
||||||
|
64 53 79
|
||||||
|
89 97 153
|
||||||
|
73 77 126
|
||||||
|
49 57 85
|
||||||
|
37 38 63
|
||||||
|
24 23 38
|
||||||
|
16 13 21
|
||||||
BIN
assets/sprites/door-closed.png
Normal file
|
After Width: | Height: | Size: 429 B |
BIN
assets/sprites/door-open.png
Normal file
|
After Width: | Height: | Size: 363 B |
70
assets/sprites/obstacle-alldirections-idle.json
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
{ "frames": {
|
||||||
|
"obstacle-alldirections 0.ase": {
|
||||||
|
"frame": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"sourceSize": { "w": 32, "h": 32 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
"obstacle-alldirections 1.ase": {
|
||||||
|
"frame": { "x": 32, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"sourceSize": { "w": 32, "h": 32 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
"obstacle-alldirections 2.ase": {
|
||||||
|
"frame": { "x": 64, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"sourceSize": { "w": 32, "h": 32 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
"obstacle-alldirections 3.ase": {
|
||||||
|
"frame": { "x": 96, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"sourceSize": { "w": 32, "h": 32 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
"obstacle-alldirections 4.ase": {
|
||||||
|
"frame": { "x": 128, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"sourceSize": { "w": 32, "h": 32 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
"obstacle-alldirections 5.ase": {
|
||||||
|
"frame": { "x": 160, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"sourceSize": { "w": 32, "h": 32 },
|
||||||
|
"duration": 100
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"meta": {
|
||||||
|
"app": "http://www.aseprite.org/",
|
||||||
|
"version": "1.x-dev",
|
||||||
|
"image": "obstacle-alldirections-idle.png",
|
||||||
|
"format": "I8",
|
||||||
|
"size": { "w": 192, "h": 32 },
|
||||||
|
"scale": "1",
|
||||||
|
"frameTags": [
|
||||||
|
],
|
||||||
|
"layers": [
|
||||||
|
{ "name": "enemybot-jets", "opacity": 255, "blendMode": "normal" },
|
||||||
|
{ "name": "enemybot-body", "opacity": 255, "blendMode": "normal" },
|
||||||
|
{ "name": "enemybot-turm", "opacity": 255, "blendMode": "normal" },
|
||||||
|
{ "name": "enemybot-turret", "opacity": 255, "blendMode": "normal" },
|
||||||
|
{ "name": "enemybot-turret-head", "opacity": 255, "blendMode": "normal" }
|
||||||
|
],
|
||||||
|
"slices": [
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
assets/sprites/obstacle-alldirections-idle.png
Normal file
|
After Width: | Height: | Size: 911 B |
BIN
assets/sprites/obstacle-alldirections.ase
Normal file
BIN
assets/sprites/obstacle-alldirections1.png
Normal file
|
After Width: | Height: | Size: 471 B |
92
assets/sprites/obstacle-east-idle.json
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
{ "frames": {
|
||||||
|
"obstacle-east 0.ase": {
|
||||||
|
"frame": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"sourceSize": { "w": 32, "h": 32 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
"obstacle-east 1.ase": {
|
||||||
|
"frame": { "x": 32, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"sourceSize": { "w": 32, "h": 32 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
"obstacle-east 2.ase": {
|
||||||
|
"frame": { "x": 64, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"sourceSize": { "w": 32, "h": 32 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
"obstacle-east 3.ase": {
|
||||||
|
"frame": { "x": 96, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"sourceSize": { "w": 32, "h": 32 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
"obstacle-east 4.ase": {
|
||||||
|
"frame": { "x": 128, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"sourceSize": { "w": 32, "h": 32 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
"obstacle-east 5.ase": {
|
||||||
|
"frame": { "x": 160, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"sourceSize": { "w": 32, "h": 32 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
"obstacle-east 6.ase": {
|
||||||
|
"frame": { "x": 192, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"sourceSize": { "w": 32, "h": 32 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
"obstacle-east 7.ase": {
|
||||||
|
"frame": { "x": 224, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"sourceSize": { "w": 32, "h": 32 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
"obstacle-east 8.ase": {
|
||||||
|
"frame": { "x": 256, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"sourceSize": { "w": 32, "h": 32 },
|
||||||
|
"duration": 100
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"meta": {
|
||||||
|
"app": "http://www.aseprite.org/",
|
||||||
|
"version": "1.x-dev",
|
||||||
|
"image": "obstacle-east-idle.png",
|
||||||
|
"format": "I8",
|
||||||
|
"size": { "w": 288, "h": 32 },
|
||||||
|
"scale": "1",
|
||||||
|
"frameTags": [
|
||||||
|
],
|
||||||
|
"layers": [
|
||||||
|
{ "name": "enemybot-jets", "opacity": 255, "blendMode": "normal" },
|
||||||
|
{ "name": "enemybot-turret", "opacity": 255, "blendMode": "normal" },
|
||||||
|
{ "name": "enemybot-body", "opacity": 255, "blendMode": "normal" }
|
||||||
|
],
|
||||||
|
"slices": [
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
assets/sprites/obstacle-east-idle.png
Normal file
|
After Width: | Height: | Size: 693 B |
BIN
assets/sprites/obstacle-east.ase
Normal file
BIN
assets/sprites/obstacle-east1.png
Normal file
|
After Width: | Height: | Size: 382 B |
92
assets/sprites/obstacle-north-idle.json
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
{ "frames": {
|
||||||
|
"obstacle-north 0.ase": {
|
||||||
|
"frame": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"sourceSize": { "w": 32, "h": 32 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
"obstacle-north 1.ase": {
|
||||||
|
"frame": { "x": 32, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"sourceSize": { "w": 32, "h": 32 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
"obstacle-north 2.ase": {
|
||||||
|
"frame": { "x": 64, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"sourceSize": { "w": 32, "h": 32 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
"obstacle-north 3.ase": {
|
||||||
|
"frame": { "x": 96, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"sourceSize": { "w": 32, "h": 32 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
"obstacle-north 4.ase": {
|
||||||
|
"frame": { "x": 128, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"sourceSize": { "w": 32, "h": 32 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
"obstacle-north 5.ase": {
|
||||||
|
"frame": { "x": 160, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"sourceSize": { "w": 32, "h": 32 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
"obstacle-north 6.ase": {
|
||||||
|
"frame": { "x": 192, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"sourceSize": { "w": 32, "h": 32 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
"obstacle-north 7.ase": {
|
||||||
|
"frame": { "x": 224, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"sourceSize": { "w": 32, "h": 32 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
"obstacle-north 8.ase": {
|
||||||
|
"frame": { "x": 256, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"sourceSize": { "w": 32, "h": 32 },
|
||||||
|
"duration": 100
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"meta": {
|
||||||
|
"app": "http://www.aseprite.org/",
|
||||||
|
"version": "1.x-dev",
|
||||||
|
"image": "obstacle-north-idle.png",
|
||||||
|
"format": "I8",
|
||||||
|
"size": { "w": 288, "h": 32 },
|
||||||
|
"scale": "1",
|
||||||
|
"frameTags": [
|
||||||
|
],
|
||||||
|
"layers": [
|
||||||
|
{ "name": "enemybot-jets", "opacity": 255, "blendMode": "normal" },
|
||||||
|
{ "name": "enemybot-turret", "opacity": 255, "blendMode": "normal" },
|
||||||
|
{ "name": "enemybot-body", "opacity": 255, "blendMode": "normal" }
|
||||||
|
],
|
||||||
|
"slices": [
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
assets/sprites/obstacle-north-idle.png
Normal file
|
After Width: | Height: | Size: 738 B |
BIN
assets/sprites/obstacle-north.ase
Normal file
BIN
assets/sprites/obstacle-north1.png
Normal file
|
After Width: | Height: | Size: 408 B |
92
assets/sprites/obstacle-south-idle.json
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
{ "frames": {
|
||||||
|
"obstacle-south 0.ase": {
|
||||||
|
"frame": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"sourceSize": { "w": 32, "h": 32 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
"obstacle-south 1.ase": {
|
||||||
|
"frame": { "x": 32, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"sourceSize": { "w": 32, "h": 32 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
"obstacle-south 2.ase": {
|
||||||
|
"frame": { "x": 64, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"sourceSize": { "w": 32, "h": 32 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
"obstacle-south 3.ase": {
|
||||||
|
"frame": { "x": 96, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"sourceSize": { "w": 32, "h": 32 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
"obstacle-south 4.ase": {
|
||||||
|
"frame": { "x": 128, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"sourceSize": { "w": 32, "h": 32 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
"obstacle-south 5.ase": {
|
||||||
|
"frame": { "x": 160, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"sourceSize": { "w": 32, "h": 32 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
"obstacle-south 6.ase": {
|
||||||
|
"frame": { "x": 192, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"sourceSize": { "w": 32, "h": 32 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
"obstacle-south 7.ase": {
|
||||||
|
"frame": { "x": 224, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"sourceSize": { "w": 32, "h": 32 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
"obstacle-south 8.ase": {
|
||||||
|
"frame": { "x": 256, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"sourceSize": { "w": 32, "h": 32 },
|
||||||
|
"duration": 100
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"meta": {
|
||||||
|
"app": "http://www.aseprite.org/",
|
||||||
|
"version": "1.x-dev",
|
||||||
|
"image": "obstacle-south-idle.png",
|
||||||
|
"format": "I8",
|
||||||
|
"size": { "w": 288, "h": 32 },
|
||||||
|
"scale": "1",
|
||||||
|
"frameTags": [
|
||||||
|
],
|
||||||
|
"layers": [
|
||||||
|
{ "name": "enemybot-jets", "opacity": 255, "blendMode": "normal" },
|
||||||
|
{ "name": "enemybot-turret", "opacity": 255, "blendMode": "normal" },
|
||||||
|
{ "name": "enemybot-body", "opacity": 255, "blendMode": "normal" }
|
||||||
|
],
|
||||||
|
"slices": [
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
assets/sprites/obstacle-south-idle.png
Normal file
|
After Width: | Height: | Size: 766 B |
BIN
assets/sprites/obstacle-south.ase
Normal file
BIN
assets/sprites/obstacle-south1.png
Normal file
|
After Width: | Height: | Size: 409 B |
92
assets/sprites/obstacle-west-idle.json
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
{ "frames": {
|
||||||
|
"obstacle-west 0.png": {
|
||||||
|
"frame": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"sourceSize": { "w": 32, "h": 32 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
"obstacle-west 1.png": {
|
||||||
|
"frame": { "x": 32, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"sourceSize": { "w": 32, "h": 32 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
"obstacle-west 2.png": {
|
||||||
|
"frame": { "x": 64, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"sourceSize": { "w": 32, "h": 32 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
"obstacle-west 3.png": {
|
||||||
|
"frame": { "x": 96, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"sourceSize": { "w": 32, "h": 32 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
"obstacle-west 4.png": {
|
||||||
|
"frame": { "x": 128, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"sourceSize": { "w": 32, "h": 32 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
"obstacle-west 5.png": {
|
||||||
|
"frame": { "x": 160, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"sourceSize": { "w": 32, "h": 32 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
"obstacle-west 6.png": {
|
||||||
|
"frame": { "x": 192, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"sourceSize": { "w": 32, "h": 32 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
"obstacle-west 7.png": {
|
||||||
|
"frame": { "x": 224, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"sourceSize": { "w": 32, "h": 32 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
"obstacle-west 8.png": {
|
||||||
|
"frame": { "x": 256, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"sourceSize": { "w": 32, "h": 32 },
|
||||||
|
"duration": 100
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"meta": {
|
||||||
|
"app": "http://www.aseprite.org/",
|
||||||
|
"version": "1.x-dev",
|
||||||
|
"image": "obstacle-west-idle.png",
|
||||||
|
"format": "I8",
|
||||||
|
"size": { "w": 288, "h": 32 },
|
||||||
|
"scale": "1",
|
||||||
|
"frameTags": [
|
||||||
|
],
|
||||||
|
"layers": [
|
||||||
|
{ "name": "enemybot-jets", "opacity": 255, "blendMode": "normal" },
|
||||||
|
{ "name": "enemybot-turret", "opacity": 255, "blendMode": "normal" },
|
||||||
|
{ "name": "enemybot-body", "opacity": 255, "blendMode": "normal" }
|
||||||
|
],
|
||||||
|
"slices": [
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
assets/sprites/obstacle-west-idle.png
Normal file
|
After Width: | Height: | Size: 688 B |
BIN
assets/sprites/obstacle-west.ase
Normal file
BIN
assets/sprites/obstacle-west1.png
Normal file
|
After Width: | Height: | Size: 387 B |
BIN
assets/sprites/obstacle.ase
Normal file
7
assets/sprites/rename.sh
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
from=$1
|
||||||
|
to=$2
|
||||||
|
|
||||||
|
if test -e "$from"; then
|
||||||
|
mv $from $to
|
||||||
|
fi
|
||||||
104
assets/sprites/robot-idle.json
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
{ "frames": {
|
||||||
|
"robot #idle 0.ase": {
|
||||||
|
"frame": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"sourceSize": { "w": 32, "h": 32 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
"robot #idle 1.ase": {
|
||||||
|
"frame": { "x": 32, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"sourceSize": { "w": 32, "h": 32 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
"robot #idle 2.ase": {
|
||||||
|
"frame": { "x": 64, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"sourceSize": { "w": 32, "h": 32 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
"robot #idle 3.ase": {
|
||||||
|
"frame": { "x": 96, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"sourceSize": { "w": 32, "h": 32 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
"robot #idle 4.ase": {
|
||||||
|
"frame": { "x": 128, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"sourceSize": { "w": 32, "h": 32 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
"robot #idle 5.ase": {
|
||||||
|
"frame": { "x": 160, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"sourceSize": { "w": 32, "h": 32 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
"robot #idle 6.ase": {
|
||||||
|
"frame": { "x": 192, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"sourceSize": { "w": 32, "h": 32 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
"robot #idle 7.ase": {
|
||||||
|
"frame": { "x": 224, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"sourceSize": { "w": 32, "h": 32 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
"robot #idle 8.ase": {
|
||||||
|
"frame": { "x": 256, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"sourceSize": { "w": 32, "h": 32 },
|
||||||
|
"duration": 100
|
||||||
|
},
|
||||||
|
"robot #idle 9.ase": {
|
||||||
|
"frame": { "x": 288, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"rotated": false,
|
||||||
|
"trimmed": false,
|
||||||
|
"spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
|
||||||
|
"sourceSize": { "w": 32, "h": 32 },
|
||||||
|
"duration": 100
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"meta": {
|
||||||
|
"app": "http://www.aseprite.org/",
|
||||||
|
"version": "1.x-dev",
|
||||||
|
"image": "robot-idle.png",
|
||||||
|
"format": "I8",
|
||||||
|
"size": { "w": 320, "h": 32 },
|
||||||
|
"scale": "1",
|
||||||
|
"frameTags": [
|
||||||
|
{ "name": "Inactive", "from": 0, "to": 0, "direction": "forward", "color": "#000000ff" },
|
||||||
|
{ "name": "idle", "from": 1, "to": 10, "direction": "forward", "color": "#000000ff" }
|
||||||
|
],
|
||||||
|
"layers": [
|
||||||
|
{ "name": "fire", "opacity": 255, "blendMode": "normal" },
|
||||||
|
{ "name": "engines", "opacity": 255, "blendMode": "normal" },
|
||||||
|
{ "name": "getriebe", "opacity": 255, "blendMode": "normal" },
|
||||||
|
{ "name": "head", "opacity": 255, "blendMode": "normal" },
|
||||||
|
{ "name": "noise", "opacity": 255, "blendMode": "normal" }
|
||||||
|
],
|
||||||
|
"slices": [
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
assets/sprites/robot-idle.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
assets/sprites/robot-inactive.png
Normal file
|
After Width: | Height: | Size: 600 B |
BIN
assets/sprites/robot.ase
Normal file
BIN
assets/sprites/robot.png
Normal file
|
After Width: | Height: | Size: 656 B |
BIN
assets/sprites/simpletiles.ase
Normal file
BIN
assets/sprites/tilemap.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
assets/sprites/transient-closed.png
Normal file
|
After Width: | Height: | Size: 390 B |
BIN
assets/sprites/transient-open.png
Normal file
|
After Width: | Height: | Size: 351 B |
BIN
assets/sprites/transient.ase
Normal file
40
flake.nix
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
#
|
||||||
|
# NixOS game dev flake by jchw
|
||||||
|
# https://discourse.nixos.org/t/how-to-build-a-golang-program-which-needs-system-libs/45682/14?u=uskeutia
|
||||||
|
#
|
||||||
|
# Use:
|
||||||
|
# if flake.nix is inside a Git repo, but not added:
|
||||||
|
# nix develop path://$PWD
|
||||||
|
#
|
||||||
|
# otherwise, just:
|
||||||
|
# nix develop
|
||||||
|
|
||||||
|
{
|
||||||
|
inputs.flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
outputs =
|
||||||
|
{ nixpkgs, flake-utils, ... }:
|
||||||
|
flake-utils.lib.eachDefaultSystem (
|
||||||
|
system:
|
||||||
|
let
|
||||||
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
devShells.default = pkgs.mkShell {
|
||||||
|
nativeBuildInputs = with pkgs; [
|
||||||
|
go
|
||||||
|
libGL
|
||||||
|
xorg.libX11
|
||||||
|
xorg.libXrandr
|
||||||
|
xorg.libXcursor
|
||||||
|
xorg.libXinerama
|
||||||
|
xorg.libXi
|
||||||
|
xorg.libXxf86vm
|
||||||
|
];
|
||||||
|
|
||||||
|
shellHook = ''
|
||||||
|
export LD_LIBRARY_PATH=${pkgs.wayland}/lib:${pkgs.lib.getLib pkgs.libGL}/lib:${pkgs.lib.getLib pkgs.libGL}/lib:$LD_LIBRARY_PATH
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
@ -11,6 +11,7 @@ import (
|
|||||||
"openquell/util"
|
"openquell/util"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"github.com/alecthomas/repr"
|
||||||
"github.com/hajimehoshi/ebiten/v2"
|
"github.com/hajimehoshi/ebiten/v2"
|
||||||
"github.com/mlange-42/arche/ecs"
|
"github.com/mlange-42/arche/ecs"
|
||||||
"github.com/solarlune/ldtkgo"
|
"github.com/solarlune/ldtkgo"
|
||||||
@ -151,7 +152,7 @@ func LevelToSlice(game *Game, level *ldtkgo.Level, tilesize int) (Map, Map) {
|
|||||||
tile := assets.Tiles["default"]
|
tile := assets.Tiles["default"]
|
||||||
|
|
||||||
// FIXME: load from LDTK file
|
// FIXME: load from LDTK file
|
||||||
tile.Sprite = assets.Assets["primarymap"].SubImage(
|
tile.Sprite = assets.Assets["tilemap"].SubImage(
|
||||||
image.Rect(tileData.Src[0],
|
image.Rect(tileData.Src[0],
|
||||||
tileData.Src[1],
|
tileData.Src[1],
|
||||||
tileData.Src[0]+layer.GridSize,
|
tileData.Src[0]+layer.GridSize,
|
||||||
@ -168,7 +169,7 @@ func LevelToSlice(game *Game, level *ldtkgo.Level, tilesize int) (Map, Map) {
|
|||||||
|
|
||||||
case ldtkgo.LayerTypeEntity:
|
case ldtkgo.LayerTypeEntity:
|
||||||
// load mobile tiles (they call them entities) using static map map.png.
|
// load mobile tiles (they call them entities) using static map map.png.
|
||||||
tileset := assets.Assets["entitymap"]
|
tileset := assets.Assets["tilemap"]
|
||||||
|
|
||||||
for _, entity := range layer.Entities {
|
for _, entity := range layer.Entities {
|
||||||
if entity.TileRect != nil {
|
if entity.TileRect != nil {
|
||||||
@ -197,6 +198,7 @@ func LevelToSlice(game *Game, level *ldtkgo.Level, tilesize int) (Map, Map) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
tileRect := entity.TileRect
|
tileRect := entity.TileRect
|
||||||
|
repr.Println(tileRect)
|
||||||
|
|
||||||
tile.Sprite = tileset.SubImage(
|
tile.Sprite = tileset.SubImage(
|
||||||
image.Rect(tileRect.X, tileRect.Y,
|
image.Rect(tileRect.X, tileRect.Y,
|
||||||
|
|||||||