2D Toolkit Forum
2D Toolkit => Support => Topic started by: vambier on October 24, 2012, 09:10:16 am
-
I'm making a game with your toolkit and want to get it on as many devices as possible.
Currently we're developing for ipad1, ipad2 and since yesterday ipad mini :) since these are all 1024x768 screens.
We also want to get our game on the older iphones/ipods, iphone 5 and ipad 3/4 but these all got different screen resolutions.
Eventually we also want to get it to the pc/mac but I'm guessing that will require the same steps(correct me if I'm wrong)
I have no idea how to do this in unity/2d toolkit, you got any pointers for me about how to achieve this?
-
Really depends on how you have your scene set up. Do you use tk2dCamera or just a normal ortho camera?
-
I use tk2dCamera
-
Add a default resolution override (wildcard override) as shown here, and your game will automatically fit whatever resolution it runs on. Thats a good start, I suppose. Beyond that, it really depends on what you want to do.
-
Well there lies the problem. I'm developing on 1024x768, but when I add an override for say 480x320 I only see the bottom left corner of my screen, so it seems like the view is not scaling back. Same when I set it to a higher resolution but then I see my game screen in the bottom left corner with a lot extra space around it.
-
Just adding the default override (-1, -1 fit center) will make it fill the screen. How have you got it set up?
-
Thanks, I will give that a try.
Do you mean the setup of my tk2dCamera?
-
Yes
-
I'll have to check the settings when I get back from work.
But I just used a basic tk2dCamera with the override set to 1024x768 and created an anchor which is the parent for all my other sprites in the scene.
-
Don't set a fixed override, just delete it and create a new one. Leave it at defaults.
-
Thanks! I'll try that first thing tonight
-
I tried it and it works! But since I'm developing at a resolution of 1024x768 I get two black borders on the side of the iphone, is it possible to stretch the image so that it fits the screen? I know my image won't be the same but it's better than the black borders.
-
That's not something I want to support out of the box due to the pandoras box of support issues its going to open up. There will be pretty horrible artefacts in some circumstances due to how everything gets scaled into non-square pixels - it could also end up picking incorrect mips for objects with mipmaps ending up with blur results. If you still want to do this, drop me an email and I'll tell you what lines to change, but keep in mind its unsupported :)
-
I mailed you about this:-)