- Home /
2d adventure posibilities
Hi. I am new to Unity3d, and before start programming I would like to know the real posibilities of implement an adventure 2d game. So, here are the questions:
I asume using GUI elements for 2d sprites is not an option. I would use textured plane objects (all placed at the same coord on Z axis). How can I set the order of printing for all 2d objects?
I know that the Unity's Editor can be customized and extended. But, would it be possible to read an external file with a scene description, and make the editor to create the desired objects with the proper textures? I mean, create powerfull tools to automatize the process of creating scenes.
Thanks in advance.
Answer by Chris D · Apr 13, 2011 at 11:16 PM
For part two of your question at least, as long as you're keeping things 2D you might want to look into using an existing level editor and just importing the data after the fact. I only suggest this because I've seen similar solutions for tile-based Flash games (and that's where I started learning).
The Ogmo editor allows you to layout your scene how you want and export it as an xml file. All you'd have to do then is parse the xml data (not sure how you'd do this but I'm sure it's possible) into Unity and have it place the appropriate "tiles" or, in this case, prefabs. I'm sure there's an easier way, but this is what comes to mind.
Answer by AngryOldMan · Apr 13, 2011 at 05:31 PM
Question 1 : You are right don't use gui elements for 2d sprites, GUi stands for Game User Interface which is usually called a HUD (heads up display) in games. If your new to Unity just keep GUI functions to being a HUD
Question 2 : Not too sure about what your asking is possible, the quickest way (without editing the editor) is to prefab a load of stuff to optimise level creation, though this method really depends on your game, if your making a bunch of small environments then you want them to be completely unique. If your making a massive sandbox game you want to prefab a shed load of stuff to make it easily reusable/duplicatable
Answer by Niall · Apr 26, 2011 at 11:04 PM
I asume using GUI elements for 2d sprites is not an option. I would use textured plane objects (all placed at the same coord on Z axis). How can I set the order of printing for all 2d objects?
You use an ortho camera and just put all sprites at different Z positions. See SpriteManager2.
I know that the Unity's Editor can be customized and extended. But, would it be possible to read an external file with a scene description, and make the editor to create the desired objects with the proper textures? I mean, create powerfull tools to automatize the process of creating scenes.
Depending on how much code you're willing to write to make the tools, you can do just about anything.