- Home /
2D platformer advice
For my next uni project i want to create a 2D platformer in Unity and so far i have only been making basic 3D games. Was wondering if there are any good tutorials out there that could help me. and im not talking about that 2.5D gameplay tutorial unity has. i want it all flat with sprite sheets and such. Thank you.
Answer by CHPedersen · Sep 12, 2011 at 11:57 AM
The simplest answer is that if you want it to be completely 2D, then you shouldn't be using a 3D engine to do it. The entire basis of a 3D engine is to place cameras in space and send vertices through the graphics adapter's rendering pipeline. This approach isn't suited for true 2D games.
Try the SDL library instead. It's designed for true 2D, and if you've become accustomed to .Net and maybe even C# from working with Unity, you'll be pleased to find it has a .Net implementation. You can find it here:
http://cs-sdl.sourceforge.net/
Read about SDL here:
Answer by Naszia · Sep 12, 2011 at 12:37 PM
Sorry but it has to be Unity as its for a uni project. was after some help to get something like this
Yeah, it's not too difficult in Unity. Here's the game I'm rebuilding with Unity as GameSalad just couldn't do it justice...
http://www.youtube.com/watch?v=13NqZ-ov2uw
it's very simple to do, just takes a bit of mucking aroundsetting up cameras etc. Actually easier than 3D, in a lot of ways!
Answer by POLYGAMe · Sep 12, 2011 at 12:31 PM
You CAN do it in Unity, just takes a bit of mucking around. Flick the camera to orthographic mode and map textures (sprite sheets) to primitive objects. There is a pretty good plugin somewhere that allows you to create a custom plane with any amount of triangles, as opposed to Unity's stock MASSIVE plane. This helps keep the poly count low.
I suggest messing around with that "2.5D" tutorial and changing the camera to orthographic, and doing a bit of research on animated textures... it's not too tough. I've built 2D games in GameSalad ( a cool tool for the non-coder, but pretty buggy and slow) and I'm finding Unity just as easy now that I have my head around the code and GUI and it's MUCH more versatile :)
Thanks very much. A quick question. how to i get transparency with my textures?
Use .png files. $$anonymous$$ake sure the background is transparent on the image and when you import it into Unity, you'll want to set it to transparent/diffuse in the dropdown menu for the shader in the inspector:)
If that is what you were looking for, then you asked for the wrong thing, I think. You mentioned explicitly you didn't want 2.5D, but what is suggested here is the definition 2.5D, see the article at:
http://en.wikipedia.org/wiki/2.5D
As soon as you use a 3D engine to render a game where you've constricted movement to a plane, 2.5D is what you get. If you don't want that, as you started out saying, then Unity isn't the right choice. :P
But by switching to orthographic view, you DO get 2D (especially if you are mapping animated textures to simple planes). Sure, behind the scenes, it's a 3D engine, but the result is a proper 2D game. There is no such thing as pure 2D, these days... everything is done by mapping textures to polygons, even with most 2D engines. I've done a bit of program$$anonymous$$g with Windows GDI and DirectX and DirectX, despite being a 3D dev tool, is still much more efficient for 2D game dev. Long gone are the days of "real" sprites.
Right you are! and while im here can any of you tell me how to get a sprite like character run cycle that only woks when im actually running?
Answer by kgoswami · Sep 13, 2011 at 03:21 AM
Look up the unity forum post for OMG pirates game. They used unity to make a 2d game.
http://forum.unity3d.com/threads/34994-OMG-Pirates!
Here is the link to the forum discussion. They tell u amazing stuff about making 2d games in Unity 3d
Your answer
Follow this Question
Related Questions
Unity iPhone Tutorial? 1 Answer
2d games advice 4 Answers
2D Platform game ladder climbing 1 Answer
How to recalculate collider bounds when i animate a 2d sprite? 1 Answer