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 ape

I have an unscaled game that uses 960x640 as its dimensions.

ig.main( '#canvas', HerpDerp, 60, 960, 640, 1);

I can't seem to figure out how to adjust the dimensions and scaling that it works on the iPhone using the iOSImpact Beta. I've tried dividing the dimensions by 2, 4, etc, adjusting the scaling.

Also, I may have found a bug related to my problem. If I do this...

ig.main( '#canvas', HerpDerp, 60, 960, 300, 1);

...the top edge of the canvas is 20 pixels below the top edge of the screen. I've not looked at the iOSImpact code closely yet, but my guess is that it's because the iPhone y-axis is reverse that of Impact - y:0 is at the bottom edge of the screen.

So, what's the trick to using every pixel, unscaled?

1 decade ago by dominic

The "native" resolution of iOSImpact is 480x320. It's not using the retina resolution as you then would have to scale the game down for the iPhone3GS and older devices. Maybe this (scaling down) makes sense for some types of games!?

For 3D games, supporting the retina resolution is quite trivial, but 2D games are often "pixel perfect" so I'm not sure what would be the best solution to support the retina display without breaking support for the iPhone 3GS. Any ideas?

And yes, you're right, cocoa actually has the origin at the bottom left of the screen, not at the top left. I will fix and maybe add an option to specify the origin of your opengl window yourself when I get back home.

1 decade ago by stahlmanDesign

Is there a way to make the buttons follow with the screen rotation? On the iPad when you flip it around, the buttons are upside down and not in the right place (the touch zone is not where the button graphic is).

1 decade ago by Malte

Where is it possible to change the code to retina resolution?

1 decade ago by badmike

I also want to add support for the retina display.

There is an issue with the mouse.x/y coordinates on the retina display when sticking to 480x320. I fixed that in the ios.input.js by dividing all assigments with devicePixelRatio:

this.mouse.x = Math.round(x / ig.system.scale / devicePixelRatio);
this.mouse.y = Math.round(y / ig.system.scale / devicePixelRatio);

But I think real support for the retina display is a big missing feature for iOSImpact.
Page 1 of 1
« first « previous next › last »