• Hey! Guest! The 36th GMC Jam will take place between February 27th, 12:00 UTC - March 2nd, 12:00 UTC. Why not join in! Click here to find out more!

HTML5 sprites seemed to be swapped

Uhfgood

Member
I have a bare-bones app (will be a breakout clone) that seems to swap two sprite graphics. I created a sprite for the walls in my breakout clone, and then the paddle is it's own sprite as well. If I run it in windows or on my LG phone (android) it looks fine... (I stretch out the top and side walls), but when I run it for html5 the paddle gets stretched and put on the top, and the top wall graphic gets put down where the paddle should be.

I have no idea why it would be swapped. Ideas? I'm using some code to scale my 135x240 screen to the height of the display, so it may like in there some where.
 

Uhfgood

Member
Here's an image to show you what I mean:

WinVsHtml5_BreakBit.png

The windows version is on the left (The android version also outputs properly), the html5 is on the right, notice the paddle is on top and the little box with "T" in it is on the botom.

Not really sure why it would be doing this.
 
M

Mishtiff

Guest
Create a new sprite for your paddle colored red. Go into your code and change the sprite for your paddle to the new sprite. See if the same effect happens, or if it somehow changes it to blue again. If that is the case, that means somewhere in your code you have coded it to do so. Let me know what happens.
 

Uhfgood

Member
Quick question, how in the world did that fix it?

in fact even the top sprite is correct now

I bet it needed a clean build, huh?
 
Top