0

I am so happy that my new game is almost done and close to release. But throughout development I skipped a vital part, making it work on all screens. The entire time I was only testing on my iPhone 4 and now the game plays very differently if I run it on other devices.

Now, what is the easiest way to make the game run EXACTLY THE SAME on all devices? I am willing to have to change a lot of code.

//EDIT

I found this, which I could do... But the remaining problem is that positions represent different areas of the screen with different device models. For instance, any position would be lower and farther to the left on the iPad as compared to the ipod compared to the size of the screen. This breaks my game.

Community
  • 1
  • 1

2 Answers2

1

If you are talking about the all iphone Device then they all are having the same resoultion so you no need to worry about it. Only the Difference comes is the Hardware that draw the 2d/3d things open GL has been updated device by device. Not the Resolution. hope it will help you !!!

B25Dec
  • 2,301
  • 5
  • 31
  • 54
0

If it is performance you are worried about, then you will need to do some optimizations.

For positions, instead of hardcoding them, get the screen size with the

CGSize winsize = [[CCDirector sharedDirector] screenSize];

EX: Hardcoded(iPhone): CGPoint screencenter = ccp(240, 160); //DON'T use this!

EX: Device independent: CGPoint screencenter = ccp(winsize.width/2, winsize.height/2); //Use this!

That will get the center of the screen on any device.

You can obviously use the win size variable to correctly position anything.

tallen11
  • 1,387
  • 2
  • 17
  • 33