~starkingdoms/starkingdoms

4289761ba0c932ee8a5fe16d75b0c1f0663d2782 — ghostlyzsh 2 years ago 2978ea9
thrust particle modification
M assets/dist/spritesheet-125.json => assets/dist/spritesheet-125.json +7 -7
@@ 54,7 54,7 @@
      "pivot": { "x": 32, "y": 32 },
      "9slicedFrame": { "x": 0, "y": 0, "w": 64, "h": 64 }
    },
    "hearty.png": {
    "autoplr_error.png": {
      "frame": { "x": 0, "y": 1152, "w": 64, "h": 64 },
      "rotated": false,
      "trimmed": false,


@@ 72,7 72,7 @@
      "pivot": { "x": 32, "y": 32 },
      "9slicedFrame": { "x": 0, "y": 0, "w": 64, "h": 64 }
    },
    "autoplr_error.png": {
    "hearty.png": {
      "frame": { "x": 0, "y": 1280, "w": 64, "h": 64 },
      "rotated": false,
      "trimmed": false,


@@ 135,7 135,7 @@
      "pivot": { "x": 32, "y": 32 },
      "9slicedFrame": { "x": 0, "y": 0, "w": 64, "h": 64 }
    },
    "hub_on.png": {
    "autoplr_on.png": {
      "frame": { "x": 0, "y": 1728, "w": 64, "h": 64 },
      "rotated": false,
      "trimmed": false,


@@ 144,7 144,7 @@
      "pivot": { "x": 32, "y": 32 },
      "9slicedFrame": { "x": 0, "y": 0, "w": 64, "h": 64 }
    },
    "powerhub_on.png": {
    "hub_on.png": {
      "frame": { "x": 0, "y": 1792, "w": 64, "h": 64 },
      "rotated": false,
      "trimmed": false,


@@ 153,7 153,7 @@
      "pivot": { "x": 32, "y": 32 },
      "9slicedFrame": { "x": 0, "y": 0, "w": 64, "h": 64 }
    },
    "autoplr_on.png": {
    "powerhub_on.png": {
      "frame": { "x": 0, "y": 1856, "w": 64, "h": 64 },
      "rotated": false,
      "trimmed": false,


@@ 207,7 207,7 @@
      "pivot": { "x": 32, "y": 32 },
      "9slicedFrame": { "x": 0, "y": 0, "w": 64, "h": 64 }
    },
    "hub_off.png": {
    "powerhub_off.png": {
      "frame": { "x": 0, "y": 2240, "w": 64, "h": 64 },
      "rotated": false,
      "trimmed": false,


@@ 216,7 216,7 @@
      "pivot": { "x": 32, "y": 32 },
      "9slicedFrame": { "x": 0, "y": 0, "w": 64, "h": 64 }
    },
    "powerhub_off.png": {
    "hub_off.png": {
      "frame": { "x": 0, "y": 2304, "w": 64, "h": 64 },
      "rotated": false,
      "trimmed": false,

M assets/dist/spritesheet-125.png => assets/dist/spritesheet-125.png +0 -0
M assets/dist/spritesheet-375.json => assets/dist/spritesheet-375.json +7 -7
@@ 54,7 54,7 @@
      "pivot": { "x": 96, "y": 96 },
      "9slicedFrame": { "x": 0, "y": 0, "w": 192, "h": 192 }
    },
    "hearty.png": {
    "autoplr_error.png": {
      "frame": { "x": 0, "y": 3456, "w": 192, "h": 192 },
      "rotated": false,
      "trimmed": false,


@@ 72,7 72,7 @@
      "pivot": { "x": 96, "y": 96 },
      "9slicedFrame": { "x": 0, "y": 0, "w": 192, "h": 192 }
    },
    "autoplr_error.png": {
    "hearty.png": {
      "frame": { "x": 0, "y": 3840, "w": 192, "h": 192 },
      "rotated": false,
      "trimmed": false,


@@ 135,7 135,7 @@
      "pivot": { "x": 96, "y": 96 },
      "9slicedFrame": { "x": 0, "y": 0, "w": 192, "h": 192 }
    },
    "hub_on.png": {
    "autoplr_on.png": {
      "frame": { "x": 0, "y": 5184, "w": 192, "h": 192 },
      "rotated": false,
      "trimmed": false,


@@ 144,7 144,7 @@
      "pivot": { "x": 96, "y": 96 },
      "9slicedFrame": { "x": 0, "y": 0, "w": 192, "h": 192 }
    },
    "powerhub_on.png": {
    "hub_on.png": {
      "frame": { "x": 0, "y": 5376, "w": 192, "h": 192 },
      "rotated": false,
      "trimmed": false,


@@ 153,7 153,7 @@
      "pivot": { "x": 96, "y": 96 },
      "9slicedFrame": { "x": 0, "y": 0, "w": 192, "h": 192 }
    },
    "autoplr_on.png": {
    "powerhub_on.png": {
      "frame": { "x": 0, "y": 5568, "w": 192, "h": 192 },
      "rotated": false,
      "trimmed": false,


@@ 207,7 207,7 @@
      "pivot": { "x": 96, "y": 96 },
      "9slicedFrame": { "x": 0, "y": 0, "w": 192, "h": 192 }
    },
    "hub_off.png": {
    "powerhub_off.png": {
      "frame": { "x": 0, "y": 6720, "w": 192, "h": 192 },
      "rotated": false,
      "trimmed": false,


@@ 216,7 216,7 @@
      "pivot": { "x": 96, "y": 96 },
      "9slicedFrame": { "x": 0, "y": 0, "w": 192, "h": 192 }
    },
    "powerhub_off.png": {
    "hub_off.png": {
      "frame": { "x": 0, "y": 6912, "w": 192, "h": 192 },
      "rotated": false,
      "trimmed": false,

M assets/dist/spritesheet-375.png => assets/dist/spritesheet-375.png +0 -0
M assets/dist/spritesheet-full.json => assets/dist/spritesheet-full.json +5 -5
@@ 54,7 54,7 @@
      "pivot": { "x": 256, "y": 256 },
      "9slicedFrame": { "x": 0, "y": 0, "w": 512, "h": 512 }
    },
    "hearty.png": {
    "autoplr_error.png": {
      "frame": { "x": 0, "y": 7168, "w": 512, "h": 512 },
      "rotated": false,
      "trimmed": false,


@@ 72,7 72,7 @@
      "pivot": { "x": 256, "y": 256 },
      "9slicedFrame": { "x": 0, "y": 0, "w": 512, "h": 512 }
    },
    "autoplr_error.png": {
    "hearty.png": {
      "frame": { "x": 512, "y": 6656, "w": 512, "h": 512 },
      "rotated": false,
      "trimmed": false,


@@ 135,7 135,7 @@
      "pivot": { "x": 256, "y": 256 },
      "9slicedFrame": { "x": 0, "y": 0, "w": 512, "h": 512 }
    },
    "hub_on.png": {
    "autoplr_on.png": {
      "frame": { "x": 1536, "y": 7168, "w": 512, "h": 512 },
      "rotated": false,
      "trimmed": false,


@@ 144,7 144,7 @@
      "pivot": { "x": 256, "y": 256 },
      "9slicedFrame": { "x": 0, "y": 0, "w": 512, "h": 512 }
    },
    "powerhub_on.png": {
    "hub_on.png": {
      "frame": { "x": 4096, "y": 0, "w": 512, "h": 512 },
      "rotated": false,
      "trimmed": false,


@@ 153,7 153,7 @@
      "pivot": { "x": 256, "y": 256 },
      "9slicedFrame": { "x": 0, "y": 0, "w": 512, "h": 512 }
    },
    "autoplr_on.png": {
    "powerhub_on.png": {
      "frame": { "x": 4608, "y": 0, "w": 512, "h": 512 },
      "rotated": false,
      "trimmed": false,

M assets/dist/spritesheet-full.png => assets/dist/spritesheet-full.png +0 -0
M client/src/index.ts => client/src/index.ts +39 -34
@@ 136,6 136,8 @@ async function client_main(server: string, username: string, texture_quality: st
    global.canvas.style.setProperty("background-image", `url("/assets/final/${texture_quality}/starfield.png")`);
    let canvas = document.getElementById("canvas")!;

    let thruster_counter = 0;

    document.onmousedown = (e) => {
        // convert screenspace to worldspace
        if (global.me !== null) {


@@ 511,13 513,16 @@ async function client_main(server: string, username: string, texture_quality: st
        const thruster_r = 52;
        const thruster_g = 189;
        const thruster_b = 235;
        const thruster_start_a = 80;
        const thruster_end_a = 0;
        const thruster_start_size = 4;
        const thruster_end_size = 50;

        let thruster_counter = 0;

        if (global.me !== null) {
            console.log(thruster_counter);
            thruster_counter += 1;
            if (thruster_counter > 200) {
            if (thruster_counter > 5) {
                console.log("resetting counter");
                thruster_counter = 0;
            } else if (thruster_counter == 1) {


@@ 530,12 535,12 @@ async function client_main(server: string, username: string, texture_quality: st
                        y: global.me.y + calculateRotated(-25, 25, global.me.rotation)[1],
                        lifetime: 500,
                        timer: 0,
                        startSize: 10,
                        finalSize: 50,
                        startSize: thruster_start_size,
                        finalSize: thruster_end_size,
                        startRotation: 0,
                        finalRotation: 180,
                        startOpacity: 40,
                        endOpacity: 0,
                        startOpacity: thruster_start_a,
                        endOpacity: thruster_end_a,
                        startR: thruster_r,
                        startG: thruster_g,
                        startB: thruster_b,


@@ 551,12 556,12 @@ async function client_main(server: string, username: string, texture_quality: st
                        y: global.me.y + calculateRotated(25, -25, global.me.rotation + Math.PI/2)[1],
                        lifetime: 500,
                        timer: 0,
                        startSize: 10,
                        finalSize: 50,
                        startSize: thruster_start_size,
                        finalSize: thruster_end_size,
                        startRotation: 0,
                        finalRotation: 180,
                        startOpacity: 40,
                        endOpacity: 0,
                        startOpacity: thruster_start_a,
                        endOpacity: thruster_end_a,
                        startR: thruster_r,
                        startG: thruster_g,
                        startB: thruster_b,


@@ 574,12 579,12 @@ async function client_main(server: string, username: string, texture_quality: st
                        y: global.me.y + calculateRotated(25, -25, global.me.rotation)[1],
                        lifetime: 500,
                        timer: 0,
                        startSize: 10,
                        finalSize: 50,
                        startSize: thruster_start_size,
                        finalSize: thruster_end_size,
                        startRotation: 0,
                        finalRotation: 180,
                        startOpacity: 40,
                        endOpacity: 0,
                        startOpacity: thruster_start_a,
                        endOpacity: thruster_end_a,
                        startR: thruster_r,
                        startG: thruster_g,
                        startB: thruster_b,


@@ 595,12 600,12 @@ async function client_main(server: string, username: string, texture_quality: st
                        y: global.me.y + calculateRotated(-25, 25, global.me.rotation + Math.PI/2)[1],
                        lifetime: 500,
                        timer: 0,
                        startSize: 10,
                        finalSize: 50,
                        startSize: thruster_start_size,
                        finalSize: thruster_end_size,
                        startRotation: 0,
                        finalRotation: 180,
                        startOpacity: 40,
                        endOpacity: 0,
                        startOpacity: thruster_start_a,
                        endOpacity: thruster_end_a,
                        startR: thruster_r,
                        startG: thruster_g,
                        startB: thruster_b,


@@ 618,12 623,12 @@ async function client_main(server: string, username: string, texture_quality: st
                        y: global.me.y + calculateRotated(25, 25, global.me.rotation)[1],
                        lifetime: 500,
                        timer: 0,
                        startSize: 10,
                        finalSize: 50,
                        startSize: thruster_start_size,
                        finalSize: thruster_end_size,
                        startRotation: 0,
                        finalRotation: 180,
                        startOpacity: 40,
                        endOpacity: 0,
                        startOpacity: thruster_start_a,
                        endOpacity: thruster_end_a,
                        startR: thruster_r,
                        startG: thruster_g,
                        startB: thruster_b,


@@ 639,12 644,12 @@ async function client_main(server: string, username: string, texture_quality: st
                        y: global.me.y + calculateRotated(-25, 25, global.me.rotation + Math.PI/2)[1],
                        lifetime: 500,
                        timer: 0,
                        startSize: 10,
                        finalSize: 50,
                        startSize: thruster_start_size,
                        finalSize: thruster_end_size,
                        startRotation: 0,
                        finalRotation: 180,
                        startOpacity: 40,
                        endOpacity: 0,
                        startOpacity: thruster_start_a,
                        endOpacity: thruster_end_a,
                        startR: thruster_r,
                        startG: thruster_g,
                        startB: thruster_b,


@@ 662,12 667,12 @@ async function client_main(server: string, username: string, texture_quality: st
                        y: global.me.y + calculateRotated(-25, 25, global.me.rotation)[1],
                        lifetime: 500,
                        timer: 0,
                        startSize: 10,
                        finalSize: 50,
                        startSize: thruster_start_size,
                        finalSize: thruster_end_size,
                        startRotation: 0,
                        finalRotation: 180,
                        startOpacity: 40,
                        endOpacity: 0,
                        startOpacity: thruster_start_a,
                        endOpacity: thruster_end_a,
                        startR: thruster_r,
                        startG: thruster_g,
                        startB: thruster_b,


@@ 683,12 688,12 @@ async function client_main(server: string, username: string, texture_quality: st
                        y: global.me.y + calculateRotated(-25, -25, global.me.rotation + Math.PI/2)[1],
                        lifetime: 500,
                        timer: 0,
                        startSize: 10,
                        finalSize: 50,
                        startSize: thruster_start_size,
                        finalSize: thruster_end_size,
                        startRotation: 0,
                        finalRotation: 180,
                        startOpacity: 40,
                        endOpacity: 0,
                        startOpacity: thruster_start_a,
                        endOpacity: thruster_end_a,
                        startR: thruster_r,
                        startG: thruster_g,
                        startB: thruster_b,