Can Unity do 2D games? :?:
What kind do you mean? Unity is a 3D engine made for making 3D games. You could make a game that is limited to two demensions easyly but it would be hard to avoid your world being rendered in 3D space, if you don’t want that.
If you want to make a 2D game that is rendered in 3D space but is still 2D, Unity is as good a choice as any other.
If you want to make a true 2D game and don’t want to do things in 3D you would be MUCH better off using something else.
For 2D, SDL or BlitzMax immediately come to mind.
I would suggest flash, you can really do some amazing things with it. this is a really cool experimental flash game with graphics rivaling some blitz.
Bill
Unity can do 2D games, and I’d even argue that it can do 2D games very well.
First off there is a difference between 2D gameplay and 2D graphics, and it’d be good to differentiate between them in this post. Doing 2D gameplay is rock easy in Unity, and if you’re careful, even with the physics engine. These scripts are may be helpful:
http://unify.bluegillweb.com/scriptwiki/index.php/Force2D
http://unify.bluegillweb.com/scriptwiki/index.php/ShipControls
As far as 2D graphics goes, well, the sky is the limit. Of course there is GUI Text and GUI Textures, but you can also put textures on planes and just arrange the camera looking at the planes in isometric mode and it’ll be perfectly 2D. On top of that, you also still get all the sweet shaders and per pixel lighting all set up for you and easy to use.
A way to use animated sprites is to arrange your frames on a homogenous grid. Now you’ve got something that is scarily similar to a font texture. You can easily make a “font” and put that font on a TextMesh component and there is your sprite. You can control the frame displayed numerically just as you normally would. I know someone who has tried this and he said it worked really well.
So in short, 2D in Unity:
- You get Unity’s great workflow.
- You get a physics engine that works well in 2D as long as you don’t push it oddly.
- You get all the lighting effects, which is something that 2D engines normally really lack. You could also easily not have any lights for that retro look.
- You’ve got a lot of the work done for you (physics, collisions, lighting, you name it) that you’d be stuck implementing in other specialized 2D engines.
I don’t know of another engine that offers this, specialized 2D ones included.
-Jon
Select your main camera. Tick isometric. Set your object’s positions in the z axis to 0. Make camera face the objects. (Tweak.) Done.
-Jon
That is cool; however, I bet I could write a version of it in Unity in about an hour with better looking graphics, full physics, and a much higher framerate. Not to mention eery lighting, motion blur, bloom… Mind you I’ve been using Unity for a while, but I really doubt they made this game nearly that quickly in Flash.
Flash has its place, but I think this is an example of Flash being the wrong tool for this game. I also think Unity really has a place in 2D games.
-Jon
Torque Game Builder (formerly Torque 2D), is a pretty nice 2D game engine. It’s currently in beta, but is still pretty usable.
Also, here are some more stupid Flash tricks:
Dim3 even has a demo level of a 2D game (rendered in 3D of course).
Okay, let’s see it! You’ve had an hour to work on it.
As most of the time: What’s best depends on your project and your skills.
Are you only after offline i would go for blitzmax as it’s fast, stable, cheap and built for this purpose until the 3d module arrives.
As aarku said there are also points which speak for unity but unity isn’t a 2d engine and so you’ll have to deal with all the issues (sprite collisions, animations,drawing lines,…) on your own.
Flash plays in a different league as it’s a multimedia-tool not only with games in mind. Beside of that’s the most spread plugin on the web it’s more expensive and has no hw-acceleration at all.
Regards,
taumel
Thanks guys, that was the response I was looking for.
As aarku said there are also points which speak for unity but unity isn’t a 2d engine and so you’ll have to deal with all the issues (sprite collisions, animations,drawing lines,…) on your own.
Couldn’t you just use some box colliders for sprite collisions…
And LineRenderer for drawing lines. That leaves a sprite animation class which wouldn’t be a big deal to write.
@klindeman
How do you check for more pixel exact things then - any collisionmap support?
After the rough test with bounding boxes you would first have to calculate the texture-coordinate and lookup if they are set or not.
Depending on the amount of sprites and the game-logic this could make you a quadtree/bounding-box/texture-lookup thing.
Alternatively to the texture-lookup you could also write a vector collision definition for each graphic but you’ll first also have to do this.
Or you just do it the jumpman-style and use insane tolerances for the collisions… :O)
@aarku
Yeah, but all this stuff (it isn’t jut about the lines) you’ll first have to write.
update
I just had a few minutes… ;O) … http://www.marune.de/taumel/test/_max/lilcol/lilcol.zip
update2
Threw in a sound. Now back to serious work again.
update3
Gummidrop graphics…
That is cool; however, I bet I could write a version of it in Unity in about an hour with better looking graphics, full physics, and a much higher framerate. Not to mention eery lighting, motion blur, bloom…
Am I the only one here that really wishes he would?