diff --git a/js/game/pet.js b/js/game/pet.js index 83a0ec6..611fc44 100644 --- a/js/game/pet.js +++ b/js/game/pet.js @@ -1,9 +1,9 @@ -import { GIF } from "../libs/gif.js"; +//import { GIF } from "../libs/gif.js"; import { GameObject } from "./core.js"; // Our sprite sheet is on a grid of 64pxs // Each row is 64px tall, and each frame is 64px wide -const SPRITE_SIZE = 64; +const SPRITE_SIZE = 128; const SPRITE_SHEET = { JUMP: { row: 0, @@ -61,16 +61,9 @@ export class Pet extends GameObject { this.directionDuration = 0; // Assets - //this.gifSrc = "https://raw.githubusercontent.com/tonybaloney/vscode-pets/master/media/dog/akita_walk_8fps.gif" - //this.gifSrc = "./Group.png" - this.gifSrc = ""; + //this.gifSrc = ""; this.petImage = new Image(); - //this.petImage.src = "./Group.png" - this.petImage.src = - "https://comfyui-output.nyc3.cdn.digitaloceanspaces.com/Group%204.png"; - - this.petGif = GIF(); - this.petGif.load(this.gifSrc); + this.petImage.src = "https://comfyui-output.nyc3.cdn.digitaloceanspaces.com/corgi-sprite-128x128.png" /** * Creates render sprite functions @@ -216,7 +209,7 @@ export class Pet extends GameObject { slowFpsBy = 10 // Slows down fps by n amount ) { const _spriteFramesY = SPRITE_SIZE * spriteFramesY; - const spriteRenderSize = SPRITE_SIZE * 2; // This is the final size users see the sprite as + const spriteRenderSize = SPRITE_SIZE; // This is the final size users see the sprite as ctx.imageSmoothingEnabled = true; ctx.imageSmoothingQuality = "high"; diff --git a/js/game/stage.js b/js/game/stage.js index 6dee5fb..f2da5e7 100644 --- a/js/game/stage.js +++ b/js/game/stage.js @@ -41,6 +41,8 @@ export class ComfyPetsStage extends ComfyNode { this.gameButton.fontWeight = "bold"; this.gameButton.fontFamily = "Courier New"; + this.size = [400,200] + // Stage objects this.pets = []; this.foods = []; @@ -48,8 +50,7 @@ export class ComfyPetsStage extends ComfyNode { // Assets this.backgroundImage = new Image(); - this.backgroundImage.src = - "https://media.istockphoto.com/id/1333010525/vector/simple-flat-pixel-art-illustration-of-cartoon-outdoor-landscape-background-pixel-arcade.jpg?s=612x612&w=0&k=20&c=uTGqB9fhmjzaNd17EGRHYU04_70K7a3M8ilRoJjDwtY="; + this.backgroundImage.src = "https://comfyui-output.nyc3.cdn.digitaloceanspaces.com/Summer2.png" } addPet() { diff --git a/js/libs/gif.js b/js/libs/gif.js.deprecated similarity index 100% rename from js/libs/gif.js rename to js/libs/gif.js.deprecated