• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

HTML5 sprites seemed to be swapped

U

Uhfgood

Guest
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.
 
U

Uhfgood

Guest
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.
 
U

Uhfgood

Guest
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