Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by richardelms

Hi Guys

Got a strange problem where my sprite is a bit squashed when facing right, but fine when facing left.

Pic here: http://www.flickr.com/photos/richardelms/12207106415/

Would really appreciate any ideas people have.

Thanks

Rich

1 decade ago by richardelms

Looks like its an iPad scaling issue, perhaps i just need to be smarter bout how i do that.

1 decade ago by dominic

Yep, seems like you changed the aspect ratio when scaling.

If your game is in 16:9 aspect ratio internally (for instance 320x180) and you scale it up to 1024x768 in 4:3 aspect ratio (the iPad's resolution), you will stretch the image vertically, which is probably not desired.

What's your game's resolution?

1 decade ago by richardelms

To be honest i'm not exactly sure, here is how I am launching the game.

var height = 214;
var scale = window.innerHeight / height;
var width = window.innerWidth / scale;

canvas.style.width = window.innerWidth;
canvas.style.height = window.innerHeight;
ig.System.scaleMode = ig.System.SCALE.CRISP;

 if( ig.ua.mobile ) {
ig.main('#canvas', StartScreen, 60, width, height, 1, MyLoader);
}else{
	ig.main('#canvas', StartScreen, 60, 378, 214, 2, MyLoader);
}


I initially optimised it for an iPhone 5 screen i think.

Is there a better way to do it?

Thanks
Page 1 of 1
« first « previous next › last »