★ TouchArcade needs your help. Click here to support us on Patreon.

Unity3D Question: 2D puzzle game + images for iOS

10-26-2012, 03:00 PM
#1
Joined: Sep 2012
Location: Buffalo NY
Posts: 32
Unity3D Question: 2D puzzle game + images for iOS

Ok so I got a 2D puzzle game. I got 5 rows and 5 columns of cubes each with a different image in them. The images come from a sprite sheet.
The background is another image.

Very simple...

So I am at the point where I need to consider art for the iPhone and iPad retina and non retina devices.

Has anyone done a 2D game with images and sprite sheets in Unity3D?

I'm at the point where I need to know best practices for this kind of thing.

How should the camera work? I got it set to orthographic instead of perspective. Also images, Do I need to make sprite sheets for retina and non retina devices?

My initial thought is to, on startup, find out the screen width and height to help determine what device I am using. Then, programmatically load the correct images with the correct resolution. I'll also programatically space the boxes so that it takes up the most real estate. The iPad will need bigger images to take up more of the space as opposed to the iPhone correct?

Does this sound like what should be done? Does anyone have any other suggestions?

Any help would be much appreciated.

blaQk Sheep | We Make Games

Games:
Deadstorm (iOS only)
Super Monster Match (iOS)
Apps:
Spendify (iOS only)
10-26-2012, 04:48 PM
#2
Joined: Nov 2008
Location: Porto, Portugal
Posts: 118
Although I still haven't built a full game in Unity3D, I'm also starting to do some 2D tests on there.

What I recommend is that you use something like Matt Rix's "Futile" framework, as it makes the 3D-focused Unity environment a little bit more 2D-friendly. You can download everything you need and also check out a very detailed tutorial on his site.

Your art assets will have to have multiple resolutions in order to support different devices. You just find out what device is running the app and you load the corresponding texture atlas. I recommend Texture Packer to create the atlases/spritesheets, as it exports to a Unity-compatible format.

This is all the help I can give right now, seeing as I'm also starting out.
Good luck on your project!
10-27-2012, 05:58 PM
#3
Joined: May 2010
Location: Lincoln, UK
Posts: 343
I'm working on a 2D board game / puzzle app in Unity. I have put all the graphics that will change at the same time into an atlas. I create the atlas at the different sizes I need (easy as they were made with vectors in Illustrator). I change the texture in the material to whichever size atlas I want to use. That changes every object that uses the material. That way is easier to program, less prone to bugs, and maintains batching.
10-30-2012, 05:04 AM
#4
Joined: Dec 2011
Location: India
Posts: 136
How about keeping one atlas and moving the camera towards/away from the plane?
Have you checked out the Orthello2D framework? http://www.wyrmtale.com/orthello