M assets/dist/spritesheet-125.json => assets/dist/spritesheet-125.json +4 -4
@@ 135,7 135,7 @@
"pivot": { "x": 32, "y": 32 },
"9slicedFrame": { "x": 0, "y": 0, "w": 64, "h": 64 }
},
- "autoplr_on.png": {
+ "hub_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 }
},
- "hub_on.png": {
+ "autoplr_on.png": {
"frame": { "x": 0, "y": 1792, "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 }
},
- "powerhub_off.png": {
+ "hub_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 }
},
- "hub_off.png": {
+ "powerhub_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 +4 -4
@@ 135,7 135,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": 5184, "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 }
},
- "powerhub_on.png": {
+ "autoplr_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 }
},
- "powerhub_off.png": {
+ "hub_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 }
},
- "hub_off.png": {
+ "powerhub_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 +7 -7
@@ 63,7 63,7 @@
"pivot": { "x": 256, "y": 256 },
"9slicedFrame": { "x": 0, "y": 0, "w": 512, "h": 512 }
},
- "autoplr_cfg.png": {
+ "autoplr_error.png": {
"frame": { "x": 512, "y": 6144, "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,
@@ 81,7 81,7 @@
"pivot": { "x": 256, "y": 256 },
"9slicedFrame": { "x": 0, "y": 0, "w": 512, "h": 512 }
},
- "hearty.png": {
+ "autoplr_cfg.png": {
"frame": { "x": 512, "y": 7168, "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 }
},
- "autoplr_on.png": {
+ "hub_on.png": {
"frame": { "x": 1536, "y": 7168, "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 }
},
- "hub_on.png": {
+ "autoplr_on.png": {
"frame": { "x": 4608, "y": 0, "w": 512, "h": 512 },
"rotated": false,
"trimmed": false,
@@ 207,7 207,7 @@
"pivot": { "x": 256, "y": 256 },
"9slicedFrame": { "x": 0, "y": 0, "w": 512, "h": 512 }
},
- "powerhub_off.png": {
+ "hub_off.png": {
"frame": { "x": 4096, "y": 512, "w": 512, "h": 512 },
"rotated": false,
"trimmed": false,
@@ 216,7 216,7 @@
"pivot": { "x": 256, "y": 256 },
"9slicedFrame": { "x": 0, "y": 0, "w": 512, "h": 512 }
},
- "hub_off.png": {
+ "powerhub_off.png": {
"frame": { "x": 4608, "y": 512, "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 +16 -16
@@ 327,12 327,12 @@ async function client_main(server: string, username: string, texture_quality: st
global.context.drawImage(global.spritesheet_img!, indic_tex.frame.x,
indic_tex.frame.y,
- indic_tex.frame.w,
- indic_tex.frame.h,
- -indic_tex.frame.w/2,
- -indic_tex.frame.h/2,
- indic_tex.frame.w,
- indic_tex.frame.h
+ indic_tex.frame.w-1,
+ indic_tex.frame.h-1,
+ -(indic_tex.frame.w-1)/2,
+ -(indic_tex.frame.h-1)/2,
+ indic_tex.frame.w-1,
+ indic_tex.frame.h-1
);
global.context.restore();
@@ 350,8 350,8 @@ async function client_main(server: string, username: string, texture_quality: st
global.context.drawImage(global.spritesheet_img!,
tex.frame.x, // sx
tex.frame.y, // sy
- tex.frame.w, // sw
- tex.frame.h, // sh
+ tex.frame.w-1, // sw
+ tex.frame.h-1, // sh
(planet.x - planet.radius - global.me?.x!), // dx
(planet.y - planet.radius - global.me?.y!), // dy
planet.radius * 2, // dw
@@ 407,8 407,8 @@ async function client_main(server: string, username: string, texture_quality: st
global.context.drawImage(global.spritesheet_img!,
tex.frame.x,
tex.frame.y,
- tex.frame.w,
- tex.frame.h,
+ tex.frame.w-1,
+ tex.frame.h-1,
-25,
-25, 50, 50);
@@ 425,8 425,8 @@ async function client_main(server: string, username: string, texture_quality: st
global.context.drawImage(global.spritesheet_img!,
tex.frame.x,
tex.frame.y,
- tex.frame.w,
- tex.frame.h,
+ tex.frame.w-1,
+ tex.frame.h-1,
-25,
-25, 50, 50);
global.context.globalAlpha = 1.0;
@@ 447,8 447,8 @@ async function client_main(server: string, username: string, texture_quality: st
global.context.drawImage(global.spritesheet_img!,
tex.frame.x,
tex.frame.y,
- tex.frame.w,
- tex.frame.h,
+ tex.frame.w-1,
+ tex.frame.h-1,
-25,
-25, 50, 50);
@@ 501,8 501,8 @@ async function client_main(server: string, username: string, texture_quality: st
global.context.drawImage(global.spritesheet_img!,
tex.frame.x, // sx
tex.frame.y, // sy
- tex.frame.w, // sw
- tex.frame.h, // sh
+ tex.frame.w-1, // sw
+ tex.frame.h-1, // sh
-25, -25, 50, 50); // dh
global.context.restore();
M server/src/main.rs => server/src/main.rs +3 -0
@@ 16,6 16,7 @@
use crate::manager::{ClientManager};
use crate::timer::timer_main;
+use crate::entity::Entity;
use async_std::net::{TcpListener};
use async_std::sync::Arc;
use async_std::sync::RwLock;
@@ 92,6 93,8 @@ async fn main() {
env!("STK_BUILD")
);
+ info!("{}", std::mem::size_of::<Entity>());
+
if std::env::var("STK_API_KEY").is_err() {
error!(
"Unable to read the API key from STK_API_KEY. Ensure it is set, and has a valid value."