D assets/dist/spritesheet-125 => assets/dist/spritesheet-125 +0 -0
D assets/dist/spritesheet-125.json => assets/dist/spritesheet-125.json +0 -237
@@ 1,237 0,0 @@
-{
- "frames": {
- "starfield.png": {
- "frame": { "x": 0, "y": 0, "w": 256, "h": 256 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 256, "h": 256 },
- "sourceSize": { "w": 256, "h": 256 },
- "pivot": { "x": 128, "y": 128 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 256, "h": 256 }
- },
- "mars.png": {
- "frame": { "x": 0, "y": 256, "w": 256, "h": 256 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 256, "h": 256 },
- "sourceSize": { "w": 256, "h": 256 },
- "pivot": { "x": 128, "y": 128 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 256, "h": 256 }
- },
- "earth.png": {
- "frame": { "x": 0, "y": 512, "w": 256, "h": 256 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 256, "h": 256 },
- "sourceSize": { "w": 256, "h": 256 },
- "pivot": { "x": 128, "y": 128 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 256, "h": 256 }
- },
- "moon.png": {
- "frame": { "x": 0, "y": 768, "w": 256, "h": 256 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 256, "h": 256 },
- "sourceSize": { "w": 256, "h": 256 },
- "pivot": { "x": 128, "y": 128 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 256, "h": 256 }
- },
- "landingleg.png": {
- "frame": { "x": 0, "y": 1024, "w": 64, "h": 64 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 64, "h": 64 },
- "sourceSize": { "w": 64, "h": 64 },
- "pivot": { "x": 32, "y": 32 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 64, "h": 64 }
- },
- "hearty_party.png": {
- "frame": { "x": 0, "y": 1088, "w": 64, "h": 64 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 64, "h": 64 },
- "sourceSize": { "w": 64, "h": 64 },
- "pivot": { "x": 32, "y": 32 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 64, "h": 64 }
- },
- "trackindicator.png": {
- "frame": { "x": 0, "y": 1152, "w": 64, "h": 64 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 64, "h": 64 },
- "sourceSize": { "w": 64, "h": 64 },
- "pivot": { "x": 32, "y": 32 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 64, "h": 64 }
- },
- "autoplr_error.png": {
- "frame": { "x": 0, "y": 1216, "w": 64, "h": 64 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 64, "h": 64 },
- "sourceSize": { "w": 64, "h": 64 },
- "pivot": { "x": 32, "y": 32 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 64, "h": 64 }
- },
- "autoplr_cfg.png": {
- "frame": { "x": 0, "y": 1280, "w": 64, "h": 64 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 64, "h": 64 },
- "sourceSize": { "w": 64, "h": 64 },
- "pivot": { "x": 32, "y": 32 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 64, "h": 64 }
- },
- "hearty.png": {
- "frame": { "x": 0, "y": 1344, "w": 64, "h": 64 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 64, "h": 64 },
- "sourceSize": { "w": 64, "h": 64 },
- "pivot": { "x": 32, "y": 32 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 64, "h": 64 }
- },
- "hearty_ferris.png": {
- "frame": { "x": 0, "y": 1408, "w": 64, "h": 64 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 64, "h": 64 },
- "sourceSize": { "w": 64, "h": 64 },
- "pivot": { "x": 32, "y": 32 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 64, "h": 64 }
- },
- "superthruster_on.png": {
- "frame": { "x": 0, "y": 1472, "w": 64, "h": 64 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 64, "h": 64 },
- "sourceSize": { "w": 64, "h": 64 },
- "pivot": { "x": 32, "y": 32 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 64, "h": 64 }
- },
- "ecothruster_on.png": {
- "frame": { "x": 0, "y": 1536, "w": 64, "h": 64 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 64, "h": 64 },
- "sourceSize": { "w": 64, "h": 64 },
- "pivot": { "x": 32, "y": 32 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 64, "h": 64 }
- },
- "landingthruster_on.png": {
- "frame": { "x": 0, "y": 1600, "w": 64, "h": 64 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 64, "h": 64 },
- "sourceSize": { "w": 64, "h": 64 },
- "pivot": { "x": 32, "y": 32 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 64, "h": 64 }
- },
- "thruster_on.png": {
- "frame": { "x": 0, "y": 1664, "w": 64, "h": 64 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 64, "h": 64 },
- "sourceSize": { "w": 64, "h": 64 },
- "pivot": { "x": 32, "y": 32 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 64, "h": 64 }
- },
- "hub_on.png": {
- "frame": { "x": 0, "y": 1728, "w": 64, "h": 64 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 64, "h": 64 },
- "sourceSize": { "w": 64, "h": 64 },
- "pivot": { "x": 32, "y": 32 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 64, "h": 64 }
- },
- "autoplr_on.png": {
- "frame": { "x": 0, "y": 1792, "w": 64, "h": 64 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 64, "h": 64 },
- "sourceSize": { "w": 64, "h": 64 },
- "pivot": { "x": 32, "y": 32 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 64, "h": 64 }
- },
- "powerhub_on.png": {
- "frame": { "x": 0, "y": 1856, "w": 64, "h": 64 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 64, "h": 64 },
- "sourceSize": { "w": 64, "h": 64 },
- "pivot": { "x": 32, "y": 32 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 64, "h": 64 }
- },
- "superthruster_off.png": {
- "frame": { "x": 0, "y": 1920, "w": 64, "h": 64 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 64, "h": 64 },
- "sourceSize": { "w": 64, "h": 64 },
- "pivot": { "x": 32, "y": 32 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 64, "h": 64 }
- },
- "landingthruster_off.png": {
- "frame": { "x": 0, "y": 1984, "w": 64, "h": 64 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 64, "h": 64 },
- "sourceSize": { "w": 64, "h": 64 },
- "pivot": { "x": 32, "y": 32 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 64, "h": 64 }
- },
- "thruster_off.png": {
- "frame": { "x": 0, "y": 2048, "w": 64, "h": 64 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 64, "h": 64 },
- "sourceSize": { "w": 64, "h": 64 },
- "pivot": { "x": 32, "y": 32 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 64, "h": 64 }
- },
- "cargo_on.png": {
- "frame": { "x": 0, "y": 2112, "w": 64, "h": 64 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 64, "h": 64 },
- "sourceSize": { "w": 64, "h": 64 },
- "pivot": { "x": 32, "y": 32 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 64, "h": 64 }
- },
- "cargo_off.png": {
- "frame": { "x": 0, "y": 2176, "w": 64, "h": 64 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 64, "h": 64 },
- "sourceSize": { "w": 64, "h": 64 },
- "pivot": { "x": 32, "y": 32 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 64, "h": 64 }
- },
- "hub_off.png": {
- "frame": { "x": 0, "y": 2240, "w": 64, "h": 64 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 64, "h": 64 },
- "sourceSize": { "w": 64, "h": 64 },
- "pivot": { "x": 32, "y": 32 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 64, "h": 64 }
- },
- "powerhub_off.png": {
- "frame": { "x": 0, "y": 2304, "w": 64, "h": 64 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 64, "h": 64 },
- "sourceSize": { "w": 64, "h": 64 },
- "pivot": { "x": 32, "y": 32 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 64, "h": 64 }
- }
- },
- "meta": {
- "app": "atlasify https://github.com/soimy/atlasify#readme",
- "version": "0.4.1",
- "image": "spritesheet-125.png",
- "format": "RGBA8888",
- "size": { "w": 8096, "h": 8096 },
- "scale": 1
- }
-}>
\ No newline at end of file
D assets/dist/spritesheet-125.png => assets/dist/spritesheet-125.png +0 -0
D assets/dist/spritesheet-375 => assets/dist/spritesheet-375 +0 -0
D assets/dist/spritesheet-375.json => assets/dist/spritesheet-375.json +0 -237
@@ 1,237 0,0 @@
-{
- "frames": {
- "starfield.png": {
- "frame": { "x": 0, "y": 0, "w": 768, "h": 768 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 768, "h": 768 },
- "sourceSize": { "w": 768, "h": 768 },
- "pivot": { "x": 384, "y": 384 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 768, "h": 768 }
- },
- "mars.png": {
- "frame": { "x": 0, "y": 768, "w": 768, "h": 768 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 768, "h": 768 },
- "sourceSize": { "w": 768, "h": 768 },
- "pivot": { "x": 384, "y": 384 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 768, "h": 768 }
- },
- "earth.png": {
- "frame": { "x": 0, "y": 1536, "w": 768, "h": 768 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 768, "h": 768 },
- "sourceSize": { "w": 768, "h": 768 },
- "pivot": { "x": 384, "y": 384 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 768, "h": 768 }
- },
- "moon.png": {
- "frame": { "x": 0, "y": 2304, "w": 768, "h": 768 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 768, "h": 768 },
- "sourceSize": { "w": 768, "h": 768 },
- "pivot": { "x": 384, "y": 384 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 768, "h": 768 }
- },
- "landingleg.png": {
- "frame": { "x": 0, "y": 3072, "w": 192, "h": 192 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 192, "h": 192 },
- "sourceSize": { "w": 192, "h": 192 },
- "pivot": { "x": 96, "y": 96 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 192, "h": 192 }
- },
- "hearty_party.png": {
- "frame": { "x": 0, "y": 3264, "w": 192, "h": 192 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 192, "h": 192 },
- "sourceSize": { "w": 192, "h": 192 },
- "pivot": { "x": 96, "y": 96 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 192, "h": 192 }
- },
- "trackindicator.png": {
- "frame": { "x": 0, "y": 3456, "w": 192, "h": 192 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 192, "h": 192 },
- "sourceSize": { "w": 192, "h": 192 },
- "pivot": { "x": 96, "y": 96 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 192, "h": 192 }
- },
- "autoplr_cfg.png": {
- "frame": { "x": 0, "y": 3648, "w": 192, "h": 192 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 192, "h": 192 },
- "sourceSize": { "w": 192, "h": 192 },
- "pivot": { "x": 96, "y": 96 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 192, "h": 192 }
- },
- "autoplr_error.png": {
- "frame": { "x": 0, "y": 3840, "w": 192, "h": 192 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 192, "h": 192 },
- "sourceSize": { "w": 192, "h": 192 },
- "pivot": { "x": 96, "y": 96 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 192, "h": 192 }
- },
- "hearty.png": {
- "frame": { "x": 0, "y": 4032, "w": 192, "h": 192 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 192, "h": 192 },
- "sourceSize": { "w": 192, "h": 192 },
- "pivot": { "x": 96, "y": 96 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 192, "h": 192 }
- },
- "hearty_ferris.png": {
- "frame": { "x": 0, "y": 4224, "w": 192, "h": 192 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 192, "h": 192 },
- "sourceSize": { "w": 192, "h": 192 },
- "pivot": { "x": 96, "y": 96 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 192, "h": 192 }
- },
- "superthruster_on.png": {
- "frame": { "x": 0, "y": 4416, "w": 192, "h": 192 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 192, "h": 192 },
- "sourceSize": { "w": 192, "h": 192 },
- "pivot": { "x": 96, "y": 96 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 192, "h": 192 }
- },
- "ecothruster_on.png": {
- "frame": { "x": 0, "y": 4608, "w": 192, "h": 192 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 192, "h": 192 },
- "sourceSize": { "w": 192, "h": 192 },
- "pivot": { "x": 96, "y": 96 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 192, "h": 192 }
- },
- "landingthruster_on.png": {
- "frame": { "x": 0, "y": 4800, "w": 192, "h": 192 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 192, "h": 192 },
- "sourceSize": { "w": 192, "h": 192 },
- "pivot": { "x": 96, "y": 96 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 192, "h": 192 }
- },
- "thruster_on.png": {
- "frame": { "x": 0, "y": 4992, "w": 192, "h": 192 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 192, "h": 192 },
- "sourceSize": { "w": 192, "h": 192 },
- "pivot": { "x": 96, "y": 96 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 192, "h": 192 }
- },
- "powerhub_on.png": {
- "frame": { "x": 0, "y": 5184, "w": 192, "h": 192 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 192, "h": 192 },
- "sourceSize": { "w": 192, "h": 192 },
- "pivot": { "x": 96, "y": 96 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 192, "h": 192 }
- },
- "hub_on.png": {
- "frame": { "x": 0, "y": 5376, "w": 192, "h": 192 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 192, "h": 192 },
- "sourceSize": { "w": 192, "h": 192 },
- "pivot": { "x": 96, "y": 96 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 192, "h": 192 }
- },
- "autoplr_on.png": {
- "frame": { "x": 0, "y": 5568, "w": 192, "h": 192 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 192, "h": 192 },
- "sourceSize": { "w": 192, "h": 192 },
- "pivot": { "x": 96, "y": 96 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 192, "h": 192 }
- },
- "landingthruster_off.png": {
- "frame": { "x": 0, "y": 5760, "w": 192, "h": 192 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 192, "h": 192 },
- "sourceSize": { "w": 192, "h": 192 },
- "pivot": { "x": 96, "y": 96 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 192, "h": 192 }
- },
- "superthruster_off.png": {
- "frame": { "x": 0, "y": 5952, "w": 192, "h": 192 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 192, "h": 192 },
- "sourceSize": { "w": 192, "h": 192 },
- "pivot": { "x": 96, "y": 96 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 192, "h": 192 }
- },
- "thruster_off.png": {
- "frame": { "x": 0, "y": 6144, "w": 192, "h": 192 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 192, "h": 192 },
- "sourceSize": { "w": 192, "h": 192 },
- "pivot": { "x": 96, "y": 96 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 192, "h": 192 }
- },
- "cargo_on.png": {
- "frame": { "x": 0, "y": 6336, "w": 192, "h": 192 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 192, "h": 192 },
- "sourceSize": { "w": 192, "h": 192 },
- "pivot": { "x": 96, "y": 96 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 192, "h": 192 }
- },
- "cargo_off.png": {
- "frame": { "x": 0, "y": 6528, "w": 192, "h": 192 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 192, "h": 192 },
- "sourceSize": { "w": 192, "h": 192 },
- "pivot": { "x": 96, "y": 96 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 192, "h": 192 }
- },
- "hub_off.png": {
- "frame": { "x": 0, "y": 6720, "w": 192, "h": 192 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 192, "h": 192 },
- "sourceSize": { "w": 192, "h": 192 },
- "pivot": { "x": 96, "y": 96 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 192, "h": 192 }
- },
- "powerhub_off.png": {
- "frame": { "x": 0, "y": 6912, "w": 192, "h": 192 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 192, "h": 192 },
- "sourceSize": { "w": 192, "h": 192 },
- "pivot": { "x": 96, "y": 96 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 192, "h": 192 }
- }
- },
- "meta": {
- "app": "atlasify https://github.com/soimy/atlasify#readme",
- "version": "0.4.1",
- "image": "spritesheet-375.png",
- "format": "RGBA8888",
- "size": { "w": 8096, "h": 8096 },
- "scale": 1
- }
-}>
\ No newline at end of file
D assets/dist/spritesheet-375.png => assets/dist/spritesheet-375.png +0 -0
D assets/dist/spritesheet-full => assets/dist/spritesheet-full +0 -0
D assets/dist/spritesheet-full.json => assets/dist/spritesheet-full.json +0 -237
@@ 1,237 0,0 @@
-{
- "frames": {
- "starfield.png": {
- "frame": { "x": 0, "y": 0, "w": 2048, "h": 2048 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 2048, "h": 2048 },
- "sourceSize": { "w": 2048, "h": 2048 },
- "pivot": { "x": 1024, "y": 1024 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 2048, "h": 2048 }
- },
- "mars.png": {
- "frame": { "x": 0, "y": 2048, "w": 2048, "h": 2048 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 2048, "h": 2048 },
- "sourceSize": { "w": 2048, "h": 2048 },
- "pivot": { "x": 1024, "y": 1024 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 2048, "h": 2048 }
- },
- "earth.png": {
- "frame": { "x": 0, "y": 4096, "w": 2048, "h": 2048 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 2048, "h": 2048 },
- "sourceSize": { "w": 2048, "h": 2048 },
- "pivot": { "x": 1024, "y": 1024 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 2048, "h": 2048 }
- },
- "moon.png": {
- "frame": { "x": 2048, "y": 0, "w": 2048, "h": 2048 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 2048, "h": 2048 },
- "sourceSize": { "w": 2048, "h": 2048 },
- "pivot": { "x": 1024, "y": 1024 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 2048, "h": 2048 }
- },
- "landingleg.png": {
- "frame": { "x": 0, "y": 6144, "w": 512, "h": 512 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 512, "h": 512 },
- "sourceSize": { "w": 512, "h": 512 },
- "pivot": { "x": 256, "y": 256 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 512, "h": 512 }
- },
- "hearty_party.png": {
- "frame": { "x": 0, "y": 6656, "w": 512, "h": 512 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 512, "h": 512 },
- "sourceSize": { "w": 512, "h": 512 },
- "pivot": { "x": 256, "y": 256 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 512, "h": 512 }
- },
- "trackindicator.png": {
- "frame": { "x": 0, "y": 7168, "w": 512, "h": 512 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 512, "h": 512 },
- "sourceSize": { "w": 512, "h": 512 },
- "pivot": { "x": 256, "y": 256 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 512, "h": 512 }
- },
- "autoplr_error.png": {
- "frame": { "x": 512, "y": 6144, "w": 512, "h": 512 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 512, "h": 512 },
- "sourceSize": { "w": 512, "h": 512 },
- "pivot": { "x": 256, "y": 256 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 512, "h": 512 }
- },
- "hearty.png": {
- "frame": { "x": 512, "y": 6656, "w": 512, "h": 512 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 512, "h": 512 },
- "sourceSize": { "w": 512, "h": 512 },
- "pivot": { "x": 256, "y": 256 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 512, "h": 512 }
- },
- "autoplr_cfg.png": {
- "frame": { "x": 512, "y": 7168, "w": 512, "h": 512 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 512, "h": 512 },
- "sourceSize": { "w": 512, "h": 512 },
- "pivot": { "x": 256, "y": 256 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 512, "h": 512 }
- },
- "hearty_ferris.png": {
- "frame": { "x": 1024, "y": 6144, "w": 512, "h": 512 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 512, "h": 512 },
- "sourceSize": { "w": 512, "h": 512 },
- "pivot": { "x": 256, "y": 256 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 512, "h": 512 }
- },
- "superthruster_on.png": {
- "frame": { "x": 1024, "y": 6656, "w": 512, "h": 512 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 512, "h": 512 },
- "sourceSize": { "w": 512, "h": 512 },
- "pivot": { "x": 256, "y": 256 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 512, "h": 512 }
- },
- "ecothruster_on.png": {
- "frame": { "x": 1024, "y": 7168, "w": 512, "h": 512 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 512, "h": 512 },
- "sourceSize": { "w": 512, "h": 512 },
- "pivot": { "x": 256, "y": 256 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 512, "h": 512 }
- },
- "landingthruster_on.png": {
- "frame": { "x": 1536, "y": 6144, "w": 512, "h": 512 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 512, "h": 512 },
- "sourceSize": { "w": 512, "h": 512 },
- "pivot": { "x": 256, "y": 256 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 512, "h": 512 }
- },
- "thruster_on.png": {
- "frame": { "x": 1536, "y": 6656, "w": 512, "h": 512 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 512, "h": 512 },
- "sourceSize": { "w": 512, "h": 512 },
- "pivot": { "x": 256, "y": 256 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 512, "h": 512 }
- },
- "hub_on.png": {
- "frame": { "x": 1536, "y": 7168, "w": 512, "h": 512 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 512, "h": 512 },
- "sourceSize": { "w": 512, "h": 512 },
- "pivot": { "x": 256, "y": 256 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 512, "h": 512 }
- },
- "powerhub_on.png": {
- "frame": { "x": 4096, "y": 0, "w": 512, "h": 512 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 512, "h": 512 },
- "sourceSize": { "w": 512, "h": 512 },
- "pivot": { "x": 256, "y": 256 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 512, "h": 512 }
- },
- "autoplr_on.png": {
- "frame": { "x": 4608, "y": 0, "w": 512, "h": 512 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 512, "h": 512 },
- "sourceSize": { "w": 512, "h": 512 },
- "pivot": { "x": 256, "y": 256 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 512, "h": 512 }
- },
- "superthruster_off.png": {
- "frame": { "x": 5120, "y": 0, "w": 512, "h": 512 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 512, "h": 512 },
- "sourceSize": { "w": 512, "h": 512 },
- "pivot": { "x": 256, "y": 256 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 512, "h": 512 }
- },
- "landingthruster_off.png": {
- "frame": { "x": 5632, "y": 0, "w": 512, "h": 512 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 512, "h": 512 },
- "sourceSize": { "w": 512, "h": 512 },
- "pivot": { "x": 256, "y": 256 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 512, "h": 512 }
- },
- "thruster_off.png": {
- "frame": { "x": 6144, "y": 0, "w": 512, "h": 512 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 512, "h": 512 },
- "sourceSize": { "w": 512, "h": 512 },
- "pivot": { "x": 256, "y": 256 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 512, "h": 512 }
- },
- "cargo_on.png": {
- "frame": { "x": 6656, "y": 0, "w": 512, "h": 512 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 512, "h": 512 },
- "sourceSize": { "w": 512, "h": 512 },
- "pivot": { "x": 256, "y": 256 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 512, "h": 512 }
- },
- "cargo_off.png": {
- "frame": { "x": 7168, "y": 0, "w": 512, "h": 512 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 512, "h": 512 },
- "sourceSize": { "w": 512, "h": 512 },
- "pivot": { "x": 256, "y": 256 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 512, "h": 512 }
- },
- "hub_off.png": {
- "frame": { "x": 4096, "y": 512, "w": 512, "h": 512 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 512, "h": 512 },
- "sourceSize": { "w": 512, "h": 512 },
- "pivot": { "x": 256, "y": 256 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 512, "h": 512 }
- },
- "powerhub_off.png": {
- "frame": { "x": 4608, "y": 512, "w": 512, "h": 512 },
- "rotated": false,
- "trimmed": false,
- "spriteSourceSize": { "x": 0, "y": 0, "w": 512, "h": 512 },
- "sourceSize": { "w": 512, "h": 512 },
- "pivot": { "x": 256, "y": 256 },
- "9slicedFrame": { "x": 0, "y": 0, "w": 512, "h": 512 }
- }
- },
- "meta": {
- "app": "atlasify https://github.com/soimy/atlasify#readme",
- "version": "0.4.1",
- "image": "spritesheet-full.png",
- "format": "RGBA8888",
- "size": { "w": 8096, "h": 8096 },
- "scale": 1
- }
-}>
\ No newline at end of file
D assets/dist/spritesheet-full.png => assets/dist/spritesheet-full.png +0 -0
D assets/final/125/autoplr_cfg.png => assets/final/125/autoplr_cfg.png +0 -0
D assets/final/125/autoplr_error.png => assets/final/125/autoplr_error.png +0 -0
D assets/final/125/autoplr_on.png => assets/final/125/autoplr_on.png +0 -0
D assets/final/125/cargo_off.png => assets/final/125/cargo_off.png +0 -0
D assets/final/125/cargo_on.png => assets/final/125/cargo_on.png +0 -0
D assets/final/125/earth.png => assets/final/125/earth.png +0 -0
D assets/final/125/ecothruster_on.png => assets/final/125/ecothruster_on.png +0 -0
D assets/final/125/hearty.png => assets/final/125/hearty.png +0 -0
D assets/final/125/hub_off.png => assets/final/125/hub_off.png +0 -0
D assets/final/125/hub_on.png => assets/final/125/hub_on.png +0 -0
D assets/final/125/landingleg.png => assets/final/125/landingleg.png +0 -0
D assets/final/125/landingthruster_off.png => assets/final/125/landingthruster_off.png +0 -0
D assets/final/125/landingthruster_on.png => assets/final/125/landingthruster_on.png +0 -0
D assets/final/125/moon.png => assets/final/125/moon.png +0 -0
D assets/final/125/powerhub_off.png => assets/final/125/powerhub_off.png +0 -0
D assets/final/125/powerhub_on.png => assets/final/125/powerhub_on.png +0 -0
D assets/final/125/starfield.png => assets/final/125/starfield.png +0 -0
D assets/final/125/superthruster_off.png => assets/final/125/superthruster_off.png +0 -0
D assets/final/125/superthruster_on.png => assets/final/125/superthruster_on.png +0 -0
D assets/final/125/thruster_off.png => assets/final/125/thruster_off.png +0 -0
D assets/final/125/thruster_on.png => assets/final/125/thruster_on.png +0 -0
D assets/final/375/autoplr_cfg.png => assets/final/375/autoplr_cfg.png +0 -0
D assets/final/375/autoplr_error.png => assets/final/375/autoplr_error.png +0 -0
D assets/final/375/autoplr_on.png => assets/final/375/autoplr_on.png +0 -0
D assets/final/375/cargo_off.png => assets/final/375/cargo_off.png +0 -0
D assets/final/375/cargo_on.png => assets/final/375/cargo_on.png +0 -0
D assets/final/375/earth.png => assets/final/375/earth.png +0 -0
D assets/final/375/ecothruster_on.png => assets/final/375/ecothruster_on.png +0 -0
D assets/final/375/hearty.png => assets/final/375/hearty.png +0 -0
D assets/final/375/hub_off.png => assets/final/375/hub_off.png +0 -0
D assets/final/375/hub_on.png => assets/final/375/hub_on.png +0 -0
D assets/final/375/landingleg.png => assets/final/375/landingleg.png +0 -0
D assets/final/375/landingthruster_off.png => assets/final/375/landingthruster_off.png +0 -0
D assets/final/375/landingthruster_on.png => assets/final/375/landingthruster_on.png +0 -0
D assets/final/375/moon.png => assets/final/375/moon.png +0 -0
D assets/final/375/powerhub_off.png => assets/final/375/powerhub_off.png +0 -0
D assets/final/375/powerhub_on.png => assets/final/375/powerhub_on.png +0 -0
D assets/final/375/starfield.png => assets/final/375/starfield.png +0 -0
D assets/final/375/superthruster_off.png => assets/final/375/superthruster_off.png +0 -0
D assets/final/375/superthruster_on.png => assets/final/375/superthruster_on.png +0 -0
D assets/final/375/thruster_off.png => assets/final/375/thruster_off.png +0 -0
D assets/final/375/thruster_on.png => assets/final/375/thruster_on.png +0 -0
D assets/final/full/autoplr_cfg.png => assets/final/full/autoplr_cfg.png +0 -0
D assets/final/full/autoplr_error.png => assets/final/full/autoplr_error.png +0 -0
D assets/final/full/autoplr_on.png => assets/final/full/autoplr_on.png +0 -0
D assets/final/full/cargo_off.png => assets/final/full/cargo_off.png +0 -0
D assets/final/full/cargo_on.png => assets/final/full/cargo_on.png +0 -0
D assets/final/full/earth.png => assets/final/full/earth.png +0 -0
D assets/final/full/ecothruster_on.png => assets/final/full/ecothruster_on.png +0 -0
D assets/final/full/hearty.png => assets/final/full/hearty.png +0 -0
D assets/final/full/hub_off.png => assets/final/full/hub_off.png +0 -0
D assets/final/full/hub_on.png => assets/final/full/hub_on.png +0 -0
D assets/final/full/landingleg.png => assets/final/full/landingleg.png +0 -0
D assets/final/full/landingthruster_off.png => assets/final/full/landingthruster_off.png +0 -0
D assets/final/full/landingthruster_on.png => assets/final/full/landingthruster_on.png +0 -0
D assets/final/full/moon.png => assets/final/full/moon.png +0 -0
D assets/final/full/powerhub_off.png => assets/final/full/powerhub_off.png +0 -0
D assets/final/full/powerhub_on.png => assets/final/full/powerhub_on.png +0 -0
D assets/final/full/starfield.png => assets/final/full/starfield.png +0 -0
D assets/final/full/superthruster_off.png => assets/final/full/superthruster_off.png +0 -0
D assets/final/full/superthruster_on.png => assets/final/full/superthruster_on.png +0 -0
D assets/final/full/thruster_off.png => assets/final/full/thruster_off.png +0 -0
D assets/final/full/thruster_on.png => assets/final/full/thruster_on.png +0 -0
M starkingdoms-client/index.html => starkingdoms-client/index.html +24 -4
@@ 6,7 6,12 @@
<title>StarKingdoms</title>
</head>
<body class="bg-grid">
-<div class="popup popup-center popup-w19" id="server_selector">
+
+ <div id="gamewindow">
+ <!-- Canvas gets added here by the game script -->
+ </div>
+
+ <div class="popup popup-center popup-w19" id="server_selector">
<h1>StarKingdoms</h1>
<h2>Join Game</h2>
@@ 60,9 65,24 @@ Here be dragons! You have a <b>prerelease server</b> selected. Expect bugs, and
<table class="mono json" id="explorer_json"></table>
</div>
-<div id="gamewindow" class="game">
- <!-- Canvas gets added here by the game script -->
-</div>
+ <div class="popup hud hidden" id="hud">
+ <table>
+ <thead>
+ <tr>
+ <th class="hud-d"></th>
+ <th class="hud-d"></th>
+ <th class="hud-d"></th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td id="pos">Position: --, --</td>
+ <td id="velocity">Velocity: --</td>
+ <td id="track">Track Angle: --</td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
<span class="footer" id="footer"></span>
M starkingdoms-client/package.json => starkingdoms-client/package.json +1 -0
@@ 10,6 10,7 @@
},
"devDependencies": {
"@types/debug": "^4.1.12",
+ "@types/node": "^20.10.0",
"typescript": "^5.2.2",
"vite": "^5.0.0"
},
R assets/src/autoplr_cfg.svg => starkingdoms-client/src/assets/autoplr_cfg.svg +0 -0
R assets/src/autoplr_error.svg => starkingdoms-client/src/assets/autoplr_error.svg +0 -0
R assets/src/autoplr_on.svg => starkingdoms-client/src/assets/autoplr_on.svg +0 -0
R assets/src/cargo_off.svg => starkingdoms-client/src/assets/cargo_off.svg +0 -0
R assets/src/cargo_on.svg => starkingdoms-client/src/assets/cargo_on.svg +0 -0
R assets/src/earth.svg => starkingdoms-client/src/assets/earth.svg +0 -0
R assets/src/ecothruster_on.svg => starkingdoms-client/src/assets/ecothruster_on.svg +0 -0
R assets/src/hearty.svg => starkingdoms-client/src/assets/hearty.svg +0 -0
R assets/src/hearty_ferris.svg => starkingdoms-client/src/assets/hearty_ferris.svg +0 -0
R assets/src/hearty_party.svg => starkingdoms-client/src/assets/hearty_party.svg +0 -0
R assets/src/hub_off.svg => starkingdoms-client/src/assets/hub_off.svg +0 -0
R assets/src/hub_on.svg => starkingdoms-client/src/assets/hub_on.svg +0 -0
R assets/src/landingleg.svg => starkingdoms-client/src/assets/landingleg.svg +0 -0
R assets/src/landingthruster_off.svg => starkingdoms-client/src/assets/landingthruster_off.svg +0 -0
R assets/src/landingthruster_on.svg => starkingdoms-client/src/assets/landingthruster_on.svg +0 -0
R assets/src/mars.svg => starkingdoms-client/src/assets/mars.svg +0 -0
A starkingdoms-client/src/assets/missing.svg => starkingdoms-client/src/assets/missing.svg +74 -0
@@ 0,0 1,74 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ width="512"
+ height="512"
+ viewBox="0 0 512 512"
+ version="1.1"
+ id="svg1"
+ inkscape:version="1.3 (0e150ed6c4, 2023-07-21)"
+ sodipodi:docname="missing.ink.svg"
+ inkscape:export-filename="missing.png"
+ inkscape:export-xdpi="96"
+ inkscape:export-ydpi="96"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:svg="http://www.w3.org/2000/svg">
+ <sodipodi:namedview
+ id="namedview1"
+ pagecolor="#505050"
+ bordercolor="#eeeeee"
+ borderopacity="1"
+ inkscape:showpageshadow="0"
+ inkscape:pageopacity="0"
+ inkscape:pagecheckerboard="0"
+ inkscape:deskcolor="#505050"
+ inkscape:document-units="px"
+ showgrid="false"
+ inkscape:zoom="2"
+ inkscape:cx="235.25"
+ inkscape:cy="241.5"
+ inkscape:window-width="2548"
+ inkscape:window-height="1416"
+ inkscape:window-x="4"
+ inkscape:window-y="1096"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="layer1" />
+ <defs
+ id="defs1" />
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1">
+ <rect
+ style="fill:#ff00ff;fill-opacity:1;stroke-width:0"
+ id="rect1"
+ width="256"
+ height="256"
+ x="0"
+ y="0" />
+ <rect
+ style="fill:#ff00ff;fill-opacity:1;stroke-width:0"
+ id="rect1-5"
+ width="256"
+ height="256"
+ x="256"
+ y="256" />
+ <rect
+ style="fill:#000000;fill-opacity:1;stroke-width:0"
+ id="rect1-5-2"
+ width="256"
+ height="256"
+ x="256"
+ y="0" />
+ <rect
+ style="fill:#000000;fill-opacity:1;stroke-width:0"
+ id="rect1-5-2-7"
+ width="256"
+ height="256"
+ x="0"
+ y="256" />
+ </g>
+</svg>
R assets/src/moon.svg => starkingdoms-client/src/assets/moon.svg +0 -0
R assets/src/powerhub_off.svg => starkingdoms-client/src/assets/powerhub_off.svg +0 -0
R assets/src/powerhub_on.svg => starkingdoms-client/src/assets/powerhub_on.svg +0 -0
R assets/src/starfield.svg => starkingdoms-client/src/assets/starfield.svg +0 -0
R assets/src/superthruster_off.svg => starkingdoms-client/src/assets/superthruster_off.svg +0 -0
R assets/src/superthruster_on.svg => starkingdoms-client/src/assets/superthruster_on.svg +0 -0
R assets/src/thruster_off.svg => starkingdoms-client/src/assets/thruster_off.svg +0 -0
R assets/src/thruster_on.svg => starkingdoms-client/src/assets/thruster_on.svg +0 -0
R assets/src/trackindicator.svg => starkingdoms-client/src/assets/trackindicator.svg +0 -0
A starkingdoms-client/src/css/game.css => starkingdoms-client/src/css/game.css +10 -0
@@ 0,0 1,10 @@
+.game {
+ width: 100vw;
+ height: 100vh;
+ margin: 0;
+ padding: 0;
+ position: fixed;
+ left: 0;
+ top: 0;
+ z-index: -1;
+}<
\ No newline at end of file
A starkingdoms-client/src/css/hud.css => starkingdoms-client/src/css/hud.css +12 -0
@@ 0,0 1,12 @@
+.hud {
+ position: absolute;
+ left: 50%;
+ bottom: 10px;
+ transform: translate(-50%);
+ margin: 0 0;
+ width: 25vw;
+}
+.hud-d {
+ margin-left: 5px;
+ margin-right: 5px;
+}<
\ No newline at end of file
M => +4 -0
@@ 5,6 5,7 @@
height: min-content;
border-radius: 5px;
z-index: 100000;
}
.popup-w19 {
width: 19%;
@@ 27,3 28,6 @@
margin: 0 0 1vh;
color: var(--sub-headline);
}
.hidden {
display: none;
}
\ No newline at end of file
M starkingdoms-client/src/css/style.css => starkingdoms-client/src/css/style.css +2 -0
@@ 5,3 5,5 @@
@import "form.css";
@import "json.css";
@import "log.css";
+@import "game.css";
+@import "hud.css";<
\ No newline at end of file
M starkingdoms-client/src/hub.ts => starkingdoms-client/src/hub.ts +69 -50
@@ 1,9 1,11 @@
import createDebug from "debug";
import {
Packet,
- PacketType,
+ PacketType, PartPositionsPacket, PlanetPositionsPacket, PlayerLeavePacket, PlayerListPacket, SpawnPlayerPacket,
} from "./protocol.ts";
import {appendPacket} from "./packet_ui.ts";
+import {global} from "./main.ts";
+import {startRender} from "./rendering.ts";
const logger = createDebug("hub");
@@ 16,63 18,80 @@ export function sendPacket(client: ClientHub, packet: Packet) {
appendPacket(packet);
}
-export async function hub_connect(url: string, username: string) {
+export async function hub_connect(url: string, username: string): Promise<ClientHub | null> {
logger("connecting to client hub at " + url)
- let ws = await _websocket_connect(url);
+ let ws = new WebSocket(url);
- logger("connected to client hub, sending username and auth details");
+ ws.onerror = (e) => {
+ console.error(e);
+ throw e;
+ }
- let client: ClientHub = {
- socket: ws
- };
+ ws.addEventListener("open", () => {
+ logger("connected to client hub, sending username and auth details");
- let packet: Packet = {
- t: PacketType.ClientLogin,
- c: {
- username,
- jwt: null
- }
- };
- sendPacket(client, packet);
+ let client: ClientHub = {
+ socket: ws
+ };
- ws.onmessage = (e) => {
- let packet: Packet = JSON.parse(e.data);
+ let packet: Packet = {
+ t: PacketType.ClientLogin,
+ c: {
+ username,
+ jwt: null
+ }
+ };
+ sendPacket(client, packet);
- appendPacket(packet);
+ ws.onmessage = (e) => {
+ let packet: Packet = JSON.parse(e.data);
- if (packet.t == PacketType.SpawnPlayer) {
- //let p = <SpawnPlayerPacket> packet.c;
- } else if (packet.t == PacketType.PlayerList) {
- //let p = <PlayerListPacket> packet.c;
- } else if (packet.t == PacketType.PlanetPositions) {
- //let p = <PlanetPositionsPacket> packet.c;
- } else if (packet.t == PacketType.PartPositions) {
- //let p = <PartPositionsPacket> packet.c;
- } else if (packet.t == PacketType.PlayerLeave) {
- //let p = <PlayerLeavePacket> packet.c;
- } else {
- logger(`unrecognized packet type ${packet.t}`);
- }
- }
+ appendPacket(packet);
- return client;
-}
-
-let socket: WebSocket | undefined = undefined;
+ if (packet.t == PacketType.SpawnPlayer) {
+ let p = <SpawnPlayerPacket> packet.c;
+ if (p.username === username) {
+ global.me = {
+ username: p.username,
+ part_id: p.id
+ };
+ logger(`client spawned (username=${p.username} part_id=${p.id})`);
+ startRender();
+ } else {
+ global.players_map.set(p.id, p.username);
+ global.inverse_players_map.set(p.username, p.id);
+ logger(`player joined (username=${p.username} part_id=${p.id})`);
+ }
+ } else if (packet.t == PacketType.PlayerList) {
+ let p = <PlayerListPacket> packet.c;
+ for (let i = 0; i < p.players.length; i++) {
+ global.players_map.set(p.players[i][0], p.players[i][1]);
+ global.inverse_players_map.set(p.players[i][1], p.players[i][0]);
+ }
+ logger(`added ${p.players.length} existing players to player list`);
+ } else if (packet.t == PacketType.PlanetPositions) {
+ let p = <PlanetPositionsPacket> packet.c;
+ for (let i = 0; i < p.planets.length; i++) {
+ global.planets_map.set(p.planets[i][0], p.planets[i][1]);
+ }
+ } else if (packet.t == PacketType.PartPositions) {
+ let p = <PartPositionsPacket> packet.c;
+ for (let i = 0; i < p.parts.length; i++) {
+ global.parts_map.set(p.parts[i][0], p.parts[i][1]);
+ }
+ } else if (packet.t == PacketType.PlayerLeave) {
+ let p = <PlayerLeavePacket> packet.c;
+ let username = global.players_map.get(p.id)!;
+ global.inverse_players_map.delete(username);
+ global.players_map.delete(p.id);
+ logger(`player removed (id=${p.id})`);
+ } else {
+ logger(`unrecognized packet type ${packet.t}`);
+ }
+ }
-function _websocket_connect(url: string): Promise<WebSocket> {
- if (socket && socket.readyState < 2) {
- // reuse socket connection
- return Promise.resolve(socket);
- }
- return new Promise((resolve, reject) => {
- socket = new WebSocket(url);
- socket.onopen = () => {
- resolve(socket!);
- };
- socket.onerror = (err) => {
- reject(err);
- };
+ return client;
});
-}
+ return null;
+}<
\ No newline at end of file
M starkingdoms-client/src/main.ts => starkingdoms-client/src/main.ts +41 -5
@@ 3,6 3,7 @@ import {ClientHub, hub_connect} from "./hub.ts";
import {ConfigServer, loadConfig} from "./config.ts";
import "./css/style.css";
import "./css/themes/catppuccin-mocha/colors.css";
+import {Part, Planet} from "./protocol.ts";
let config = await loadConfig();
@@ 16,11 17,44 @@ if (window.localStorage.getItem("stk-packet-mode") === "debug") {
}
export interface GlobalData {
- client: ClientHub | null
+ client: ClientHub | null,
+ me: GlobalMe | null,
+
+ players_map: Map<number, string>,
+ inverse_players_map: Map<string, number>,
+
+ planets_map: Map<number, Planet>,
+
+ parts_map: Map<number, Part>,
+
+ rendering: GlobalRendering | null
+}
+
+export interface GlobalMe {
+ username: string,
+ part_id: number
+}
+export interface GlobalRendering {
+ canvas: HTMLCanvasElement,
+ ctx: CanvasRenderingContext2D
}
export const global: GlobalData = {
- client: null
+ client: null,
+ me: null,
+ players_map: new Map(),
+ inverse_players_map: new Map(),
+ planets_map: new Map(),
+ parts_map: new Map(),
+ rendering: null
+}
+
+export function player(): Part | undefined {
+ if (global.me !== null) {
+ return global.parts_map.get(global.me!.part_id);
+ } else {
+ return undefined;
+ }
}
const version_string = `StarKingdoms Client ${APP_VERSION} (${COMMIT_HASH}) made with <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="footer-icon"><path d="M9.653 16.915l-.005-.003-.019-.01a20.759 20.759 0 01-1.162-.682 22.045 22.045 0 01-2.582-1.9C4.045 12.733 2 10.352 2 7.5a4.5 4.5 0 018-2.828A4.5 4.5 0 0118 7.5c0 2.852-2.044 5.233-3.885 6.82a22.049 22.049 0 01-3.744 2.582l-.019.01-.005.003h-.002a.739.739 0 01-.69.001l-.002-.001z" /></svg> by the StarKingdoms team`;
@@ 28,12 62,14 @@ document.getElementById("footer")!.innerHTML = version_string;
// Dropdown stuff
const custom_select = document.querySelector(".fm-select")!;
-const custom_select_btn = document.querySelector(".fm-select-button")!;
-custom_select_btn.addEventListener("click", (e) => {
+const custom_select_btn = <HTMLButtonElement>document.querySelector(".fm-select-button")!;
+
+custom_select_btn.onclick = (e) => {
+ e.stopPropagation();
e.preventDefault();
custom_select.classList.toggle("active");
custom_select_btn.setAttribute("aria-expanded", custom_select_btn.getAttribute("aria-expanded") === "true" ? "false" : "true");
-});
+};
const selected_value = document.querySelector(".fm-selected-value")!;
A starkingdoms-client/src/planet_colors.ts => starkingdoms-client/src/planet_colors.ts +9 -0
@@ 0,0 1,9 @@
+import {PlanetType} from "./protocol.ts";
+
+export function planet_color(type: PlanetType): string {
+ if (type === PlanetType.Earth) {
+ return "limegreen";
+ } else {
+ return "white";
+ }
+}<
\ No newline at end of file
M starkingdoms-client/src/protocol.ts => starkingdoms-client/src/protocol.ts +3 -2
@@ 11,7 11,8 @@ export enum PartType {
}
export interface Planet {
planet_type: PlanetType,
- transform: ProtoTransform
+ transform: ProtoTransform,
+ radius: number
}
export interface Part {
part_type: PartType,
@@ 32,7 33,7 @@ export interface PartPositionsPacket {
parts: [number, Part][]
}
export interface PlayerListPacket {
- players: [number, String][]
+ players: [number, string][]
}
export interface PlayerLeavePacket {
id: number
A starkingdoms-client/src/rendering.ts => starkingdoms-client/src/rendering.ts +115 -0
@@ 0,0 1,115 @@
+import {global, player} from "./main.ts";
+import {part_texture, planet_texture} from "./textures.ts";
+import {planet_color} from "./planet_colors.ts";
+
+//let t = performance.now();
+//let delta = 0.0;
+
+export function startRender() {
+ // hide the launch popup
+ document.getElementById("server_selector")!.classList.add("hidden");
+ // show the HUD
+ document.getElementById("hud")!.classList.remove("hidden");
+ // create the canvas
+ let canvas = document.createElement("canvas");
+ canvas.classList.add("game");
+ // append it
+ document.getElementById("gamewindow")!.appendChild(canvas);
+ let ctx = canvas.getContext("2d")!;
+ ctx.canvas.width = window.innerWidth;
+ ctx.canvas.height = window.innerHeight;
+
+ window.onresize = () => {
+ ctx.canvas.width = window.innerWidth;
+ ctx.canvas.height = window.innerHeight;
+ }
+
+ global.rendering = {
+ canvas: canvas,
+ ctx: ctx
+ };
+ //t = performance.now();
+ //delta = 0.0;
+ // start the render loop
+ requestAnimationFrame(renderLoop);
+}
+
+async function renderLoop(_newT: DOMHighResTimeStamp) {
+ //delta = newT - t;
+ //t = newT;
+
+ let viewer_size_x = global.rendering?.canvas.width!;
+ let viewer_size_y = global.rendering?.canvas.height!;
+
+ global.rendering!.canvas.style.setProperty("background-position", `${player()?.transform.x!/5}px ${-player()?.transform.y!/5}px`);
+
+ global.rendering!.ctx.setTransform(1, 0, 0, 1, 0, 0);
+ global.rendering!.ctx.clearRect(0, 0, viewer_size_x, viewer_size_y);
+
+ // *dont* translate the camera. we're moving everything else around us. cameracentrism.
+ // only translation will be to center our core module.
+
+ global.rendering!.ctx.translate(viewer_size_x / 2, viewer_size_y / 2);
+
+ /*
+ todo: track indicator
+ */
+
+ for (let [_id, planet] of global.planets_map) {
+ global.rendering!.ctx.drawImage(
+ await planet_texture(planet.planet_type),
+ (planet.transform.x - planet.radius - player()?.transform.x!), // dx
+ (planet.transform.y - planet.radius - player()?.transform.y!), // dy
+ planet.radius * 2, // dw
+ planet.radius * 2 // dh
+ );
+
+ global.rendering!.ctx.beginPath();
+ global.rendering!.ctx.strokeStyle = planet_color(planet.planet_type);
+ global.rendering!.ctx.lineWidth = 5;
+ global.rendering!.ctx.moveTo(player()!.transform.x - player()!.transform.x, player()!.transform.y - player()!.transform.y);
+ global.rendering!.ctx.lineTo(planet.transform.x - player()!.transform.x, planet.transform.y - player()!.transform.y);
+ global.rendering!.ctx.stroke();
+ }
+
+ for (let [_id, part] of global.parts_map) {
+ global.rendering!.ctx.save();
+
+ // x_{screen} = x_{world} - player_{x_{world}}
+ // x_{world} = x_{screen} + player_{x_{world}}
+
+ global.rendering!.ctx.translate(part.transform.x - player()!.transform.x, part.transform.y - player()!.transform.y);
+
+ global.rendering!.ctx.rotate(part.transform.rot);
+
+ global.rendering!.ctx.drawImage(
+ await part_texture(part.part_type),
+ -25, -25, 50, 50
+ );
+
+ global.rendering!.ctx.restore();
+
+ // todo: clicked stuff
+ }
+
+ for (let [id, username] of global.players_map) {
+ let part = global.parts_map.get(id);
+
+ if (part !== undefined) {
+ global.rendering!.ctx.save();
+
+ global.rendering!.ctx.translate(part!.transform.x - player()!.transform.x, part!.transform.y - player()!.transform.y);
+
+ global.rendering!.ctx.textAlign = "center";
+ global.rendering!.ctx.font = '30px ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"';
+ global.rendering!.ctx.fillStyle = "white";
+ global.rendering!.ctx.fillText(username, 0, -35);
+
+ global.rendering!.ctx.restore();
+ }
+ }
+
+ // particles stuff
+
+ requestAnimationFrame(renderLoop);
+}<
\ No newline at end of file
A starkingdoms-client/src/textures.ts => starkingdoms-client/src/textures.ts +54 -0
@@ 0,0 1,54 @@
+import {PartType, PlanetType} from "./protocol.ts";
+import tex_earth from "./assets/earth.svg";
+import tex_hearty from "./assets/hearty.svg";
+import tex_missing from "./assets/missing.svg";
+
+let planet_textures: Map<PlanetType, HTMLImageElement> = new Map();
+
+function planet_texture_url(type: PlanetType): string {
+ if (type == PlanetType.Earth) {
+ return tex_earth;
+ }
+ return tex_missing;
+}
+
+export async function planet_texture(type: PlanetType): Promise<HTMLImageElement> {
+ return new Promise((resolve, reject) => {
+ if (planet_textures.has(type)) {
+ resolve(planet_textures.get(type)!);
+ } else {
+ let img = new Image();
+ img.onload = () => {
+ planet_textures.set(type, img);
+ resolve(img);
+ };
+ img.onerror = reject;
+ img.src = planet_texture_url(type)
+ }
+ });
+}
+
+let part_textures: Map<PartType, HTMLImageElement> = new Map();
+
+function part_texture_url(type: PartType): string {
+ if (type == PartType.Hearty) {
+ return tex_hearty;
+ }
+ return tex_missing;
+}
+
+export async function part_texture(type: PartType): Promise<HTMLImageElement> {
+ return new Promise((resolve, reject) => {
+ if (part_textures.has(type)) {
+ resolve(part_textures.get(type)!);
+ } else {
+ let img = new Image();
+ img.onload = () => {
+ part_textures.set(type, img);
+ resolve(img);
+ };
+ img.onerror = reject;
+ img.src = part_texture_url(type)
+ }
+ });
+}<
\ No newline at end of file
M starkingdoms-client/tsconfig.json => starkingdoms-client/tsconfig.json +2 -1
@@ 17,7 17,8 @@
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
- "noFallthroughCasesInSwitch": true
+ "noFallthroughCasesInSwitch": true,
+ "types": ["vite/client"]
},
"include": ["src"]
}
M starkingdoms-client/vite.config.ts => starkingdoms-client/vite.config.ts +9 -2
@@ 1,10 1,17 @@
-import {defineConfig} from "vite";
+import {defineConfig, PluginOption} from "vite";
import * as child from "child_process";
const commitHash = child.execSync('git describe --no-match --always --abbrev=8 --dirty').toString().trim();
+const fullReloadAlways: PluginOption = {
+ handleHotUpdate({ server }) {
+ server.ws.send({ type: "full-reload" })
+ return []
+ },
+} as PluginOption
+
export default defineConfig({
- plugins: [],
+ plugins: [fullReloadAlways],
define: {
APP_VERSION: JSON.stringify(process.env.npm_package_version),
COMMIT_HASH: JSON.stringify(commitHash)
M starkingdoms-client/yarn.lock => starkingdoms-client/yarn.lock +12 -0
@@ 184,6 184,13 @@
resolved "https://registry.yarnpkg.com/@types/ms/-/ms-0.7.34.tgz#10964ba0dee6ac4cd462e2795b6bebd407303433"
integrity sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==
+"@types/node@^20.10.0":
+ version "20.10.0"
+ resolved "https://registry.yarnpkg.com/@types/node/-/node-20.10.0.tgz#16ddf9c0a72b832ec4fcce35b8249cf149214617"
+ integrity sha512-D0WfRmU9TQ8I9PFx9Yc+EBHw+vSpIub4IDvQivcp26PtPrdMGAq5SDcpXEo/epqa/DXotVpekHiLNTg3iaKXBQ==
+ dependencies:
+ undici-types "~5.26.4"
+
debug@^4.3.4:
version "4.3.4"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865"
@@ 277,6 284,11 @@ typescript@^5.2.2:
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.2.tgz#00d1c7c1c46928c5845c1ee8d0cc2791031d4c43"
integrity sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ==
+undici-types@~5.26.4:
+ version "5.26.5"
+ resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617"
+ integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==
+
vite@^5.0.0:
version "5.0.2"
resolved "https://registry.yarnpkg.com/vite/-/vite-5.0.2.tgz#3c94627dace83b9bf04b64eaf618038e30fb95c0"