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 FernieBuzzard 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 DahlbergBuzzard 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 123, Upvotes 18
Jse
,
Bugs
New games every week!
|