New games every week!
Got a Bug In It! Blog
3rd December 2021
Over in the Advent calendar, Michael Fernie's caught a bug..

-=-=-

Michael Fernie

Buzzard Attack has a sprite issue. When moving left it turns the player into a bunch of reddish pixels. I think its playing the wrong sprite frame.


To which Trey Dahlberg replies..

Trey Dahlberg

Buzzard Attack appears to fixed now, or at least I wasn't seeing either of those problems


Aaaah, browsers being browsers..
Here's what I'm assuming is happening in Michael's browser..

Usually, to draw a sprite facing the other way, you "Scale = 0-Scale", which flips the sprite.. You can do this on the X or Y axis, or both, for a nice set of mirrored sprites.
Michael's browser is apparently ending up showing the wrong sprite from the overall spritesheet.
I *think* this means that, once flipped, the browser is then using the "same" co-ordinates..

Imagine you have sprites 1,2,3 and 4 lined up, and then flip them around.. 1 is now on the right, and 4 on the left.
If you ask for sprite 1 to be drawn, flipped, the browser should know to draw the 4th sprite, not the 1st. Because everything's backwards.
From the sounds of things, that's not happening, and the browser's still drawing the first sprite, which is now the wrong sprite.
.. Or at least, I'm guessing that's what's happening.
Because I cannot see it on any browser I'm using.

Which probably means it's down to a chipset/driver combination, instead, and hardware acceleration taking over the maths.

But, hey, what do I know. Browsers are dumb sometimes, and anyone who's tried to make CSS behave itself knows that it can be a struggle to get anything to work right!

If Michael could let me know what browser/system he's using, I might be able to track down the bug.
For now I'm looking into a couple of tweaks to the maths, and hoping that'll fix it.

Bah, humbug! Merry Xmas!

||LIVE UPDATE||

As I was about to post this, Michael has indeed posted a comment, telling me he's on an iPhone.
Which is even worse, now, because I can't see that happening on MY iPhone!!!

Oh no!!
Obscure bug!!!
AAARGGGHH!!!!

I'll tweak, and let you know how I get on. (and/or you'll let me know how I got on!!)
Views 78, Upvotes 6  
Jse , Bugs
New games every week!
Site credits : Jayenkai made this.
(c) Jayenkai 2023 and onwards, RSS feed

Blog - Got a Bug In It! - AGameAWeek