2D Games

I’m new to Unity and was wondering if it is possible to use Unity to create 2D games? With this I don’t mean 3D games viewed from the side, but 2D (flat) games with images not 3D objects.

Yes, that’s possible, but know Unity isn’t optimized for that sort of development process. We have the UnityGUI system which allows you (primarily) to create in-game user interfaces (buttons, text, images, and so on), if you wanted you could use that and create an entirely 2D based game.

I found this link game: http://www.tumbledrop.com/. Made using Unity right?

Yes, that’s definitely a Unity game. The trick is whether or not they happened to do everything via UnityGUI or not. The other way to go about making 2D games is to use flat planes in a 3D world, apply images as textures on those planes, then use an orthographic camera to get a nice, clean and flat 2D look.

I just finished a 2D game for the iPhone http://www.youtube.com/watch?v=io6KtPDEWVY and it went pretty smoothly. I haven’t used any 2D engines before so I don’t know what I’m missing in terms of 2D specific collision and animation features, but if you’re comfortable with 3D engines producing a 2D or 2.5D game isn’t too difficult.

I am currently developing a proof of concept of my game idea in 2D using XNA and once Unity comes to Windows I plan on porting it over to 3D inside of Unity.

I’m mainly using 2D right now to get something up fast, flesh out my ideas and get the state machine diagrams correct which will work for moving a 3D player around or a 2D player.

Is Unity coming to windows???

Eventually, yes. They’re working on it.

@iam69: yes, it’s coming in Unity 2.5 which is not more than a couple of months away.

In the future, please note that basic forum etiquette says that you should (a) use the search function before posting questions as this has been asked/answered many many times already, and (b) you should not bury your question here in another thread on totally different topic.

Noted :slight_smile:

I was just looking at that tumbledrop game, and it certainly looks like they’re using polygon planes with textures applied to them, as that would be the easiest way to apply physics to them as they have.

One thing I’m curious about is how they’re animating the faces on each block. I assume its some kind of animated texture - any ideas on how you’d go about that? I’ve been considering taking a stab at a 2d game built on textured planes and wasn’t sure how I could swap what texture was being displayed on the same object without constantly swapping materials.

Don’t swap materials, just either:

(a) repeatedly swap out the one material’s main texture

(b) use a “long” texture (16 x 128 for example, really a long series of 16x16 textures) and then repeatedly adjust the texture offset to show only the 16x16 block of interest

Both of the above prevent you from having to constantly swap materials, but you do need to think about what materials are on what objects so various entities can be animated separately.

I am planning to do a 2D game for wiiware and I still dont know what to do: use 3D planes with textures or use the GUI system. What would you recommend me? The first problem I can think about the 3D planes is the resolution changes will affect to the planes sizes…

I recommend you look into SpriteUI and GUIManager (search for them, they each have their own dedicated topics).

SpriteUI 2 was actually just released a week or so ago. These are plugins for Unity which allows excellent control and manipulation. For example, Waddlefield.com, that iPhone game uses GUIManager exclusively for all it’s sprite input, movement, etc.

Hey I have been having a look to SpriteUI and seems nice but it seems it is specific for iphone.

SpriteUI - SpriteManager 1 are actually generic and work independent of the platform as they optimize the stuff on mesh level.

SpriteManager 2.0 works on any platform too but the automatic batching only exists on Unity iPhone

But I downloaded the SpriteUI from the topic http://forum.unity3d.com/viewtopic.php?t=22371

that is supposed to be the last version and when I try to execute the example I get iphone related errors because the class SpriteUI has specific calls for iphone :o Any idea what should I do?

I just noticed this thread and saw the tumble drop trailer. I’m so curious on how did they make the GUI animation tweening effect. Does anyone know how to make animated GUIs like in the trailer?
-Hakimo

Nevermind thanks, just found out about iTween :wink:
-Hakimo