3 years ago

Fixed a bug with Animals; I changed their draw code to clip off the bottom of the sprite when In water, but this changed where the origin point is. All good now!
(please ignore how hats float, they need a new sprite)

Fix in the article

#gameDev #goblins


The Fix:

Add a couple temp variables
var _xO = (-sprite_width/2); ///Puts us back to the middle)
var _xSq = ((1-xSc)*(sprite_width/2)); ///Adjusts the offset based on how much the sprite has been squashed. When not squished this is 0, as it squashes this increases and keeps the sprite centre.

Then for the draw x position in draw_sprite_general use: x+_xO+xSq



2 comments

Loading...

Next up

Woop!

Lol, wish I could force the game to generate things like this, but it's not really possible with the perlin noise generation.

TCGP Has the Gold packs back and I need like 150+ of them so I did 12 pulls, got some good ones!

Doki Doki Literature Club is celebrating Monika's birthday and the 8th anniversary of DDLC with exclusive stickers, avatar frames and backgrounds on Game Jolt! 

Head over to the shop to collect yours 👉 https://gamejolt.com/#shop

New pack day! Let's open a couple 20 pulls!

Mae Borowski is the main character of Night in the Woods! It's an adventure game that tells the story of her return to her hometown of Possum Springs. She was confirmed as canonically pan in a social media post by the game's creator Scott Benson.

PIKACHU NOOOOOoooOOOOo!!!!

I want that cactus card!!

Finally! It has taken me 17 days to get this from the Wonder Pick, I would have gotten it sooner but I pressed the wrong place not realising my phone screen wasnt locked (I always press the same location every day)

Finished the set too! (Except shinies)

The Knightling launches on August 28! Wishlist it now so you don't miss out: https://bit.ly/KnightlingSteam

To celebrate the game's impending release, we've added The Knightling Pack and The Knightling Community Pack back to the Shop!

Charged Sticker Appreciation Post!

Thank you all so much for the support, it really helps me out a lot!

I hope you're all doing well and staying safe! Please take care!