diff --git a/game/bot.aseprite b/game/bot.aseprite new file mode 100644 index 00000000..c23b0399 Binary files /dev/null and b/game/bot.aseprite differ diff --git a/game/bot.png b/game/bot.png new file mode 100644 index 00000000..bb9322fd Binary files /dev/null and b/game/bot.png differ diff --git a/game/main.ts b/game/main.ts index d044d883..fd199e3b 100644 --- a/game/main.ts +++ b/game/main.ts @@ -2,15 +2,15 @@ import { cls, print, spr, use_texture } from "./graphics"; import { load_texture } from "./assets"; import { since_start, since_last_frame } from "./time"; -let the_texture: number | undefined = undefined; +let bot_sprite: number | undefined = undefined; export function init() { print("Hello world!"); // Start this load, but then... - load_texture("./happy-tree.png").then((n) => { - print("Tree loaded at", since_start()); - the_texture = n; + load_texture("./bot.png").then((n) => { + print("Bot loaded at", since_start()); + bot_sprite = n; }); } @@ -18,10 +18,10 @@ export function update() {} export function draw() { cls(0.1, 0.2, 0.3); - if (the_texture != undefined) { + if (bot_sprite != undefined) { // ...it gets resolved here? - use_texture(the_texture); - spr((320 - 256) / 2, 0, 256, 240, 0, 0); + use_texture(bot_sprite); + spr(10, 10, 32, 32, 0, 0); } // print("FRAME TIME:", since_last_frame()); }