PDA

View Full Version : Request for 2D startup article in Unity3D



BlackShipsFillt
13-01-2010, 11:17 AM
Hi Guys, A couple of you suggested that I do an article/tutorial on beginning 2D game development in Unity3D.

I'm happy to do this, though it may have to wait a week or two, but what I want to know from you guys is what you want in such an article.

The trouble with Unity, and probably my biggest gripe about the tool, is that it doesn't come with any native sprite class. It does come with particle system classes, which work for sprites in most circumstances, but proper sprites would be more elegant and run faster (because of the way the particles have to be handled)...

There is however, what has become, a standard sprite system in Unity, the SpriteManager class (this is what I have been using for my 2D game development in Unity). But implementing it requires a little bit of Unity knowledge (which is where an introduction, and an example project, into sprites in Unity would be helpful)

Okay. So if a couple of you are keen on me doing this I have a few questions :

Why do you want to do this in Unity? There are other 2D tools out there: Torque 2D, GameMaker, MediaFusion to name a few. Because sprites aren't native to Unity they'll be longer to set up and poorly integrated into the editor (though the Editor classes can be programmed if for example you want to create a decent level editor). Unity may have some advantages over some of these, C# is a pretty sweet language, being able to hit "Play" at anytime is awesome and Unity does handle all kinds of file management things and has fantastic debugging options (because the game is running in the editor) as well as Unity being portable to multiple platforms. Unity may also have performance advantages over some of these.

What kind of games do you want to make? I imagine most of you will be using Unity Indie which means Crimsonland clones are out of the question (because without the RenderToTexture, and hence no persistent blood, Crimsonland is pretty meh)... Platformers require level design which means building some editor tools (which really does require a good grasp of Unity)... Shootemups are pretty straight forward, though they really benefit from full screen post render effects (once again Unity Pro)... With Strategy, Defence, Starcontrol clones, Puzzlers etc. I'd probably just give you sprites because the rest is custom game logic.

What flavour would you like your sprites? I've done my last couple games in a pixelised style, but it is possible to use sprites that are properly filtered with millions of colours. Also in my last couple games I've animated my sprites... This requires building a sprite sheet which is a little bit of photoshop work and management. I imagine you'd want to use Unity because it can handle a large quantity of sprites, once again requiring a spritesheet (therefore making 1000 sprites just the one draw call).

What level of experience with Unity or other game engines do you have? I'd probably request that you guys first do the very beginner Unity tutorials found on the Unity site (http://unity3d.com/support/documentation/Manual/Unity%20Basics.html) just so that I don't have to explain the interface.

How much of an introduction do you want? I could probably just upload a nearly empty project with the classes I use for sprites right now... But then you really are going to getting a glimpse into the mind of what may very well seem a deranged madman, and you may not be that much better off than you are right now.

Anyway... let me know.

Fengol
13-01-2010, 12:16 PM
I think, assuming the basics on the link you gave (although I'm still struggling to find my way around Unity), exactly the steps for one of your 2D games. It doesn't have to be a walkthough (although that would be nice if you have the time) but some pointers to getting started with the SpriteManager, collision detection and input handling.

Unity seems to be gathering a lot of buzz in the indie news which is why I'm interested in it, but since I don't have access to 3D models I'm also keen to learn about 2D games; hence the request for an article from the master!

BlackShipsFillt
13-01-2010, 02:08 PM
Okay... though you say collision detection... Are you planning on using Unity's physics engine (which is all in 3D but can be forced to conform to 2D)... I do at some point want to import Box2D into Unity3D, but it may take a little while and will probably increase the level of expertise required to work on the project.

Neither of my previous two 2D games used Unity's Collision Detection, I didn't need it, but it's easy to work with.

Fengol
13-01-2010, 02:15 PM
I think it's safe to say that while your audience would probably have watched the tutorial videos on the Unity site and read through "some" of the PDF material, they're still fairly new to Unity and it's possibilities and features. Comments like the one above should be a boxout in your article.

BlackShipsFillt
13-01-2010, 04:52 PM
Right now I'm leaning towards doing a little Starcontrol mockup... Like the battle part of Strange Adventures... It could have sprites (for the ships), collisions (for the projectiles hitting ships), particles (for explosions), raycasting (for the lasers), instantiation and destruction, mouse clicking (for selection, also using raycasting), parenting (for turrents on the ships), sounds, textfields and behaviours (the control of the ships and enemy ships) as well as some persistent global level stuff. This would pretty much cover the basics for a 2D game.

Fengol
13-01-2010, 04:57 PM
Sounds AWESOME!

BlackShipsFillt
13-01-2010, 05:14 PM
Know of a place I can get some free or CC sprites for spaceships? I could make some myself, but it'd be a bit pointless...

Nandrew
14-01-2010, 01:42 PM
Lost Garden (http://lostgarden.com/) tends to have sprite resources, but for spaceships specifically? ... ehhh, dunno where I'd look for that. :P Maybe something in the Resources thread can help out.

BlackShipsFillt
14-01-2010, 02:02 PM
I'll probably just make them myself, I saw some brilliant spaceship designs at PixelJoint, I'll probably adapt those into a gradient based style (because they need to rotate)... I'm busy fiddling with my comp 24 entry, tutorial is going to have to wait until after the Jam.

xyber
15-01-2010, 11:21 AM
Cool, an intro to SpriteManager would benefit the Unity3D community too.
Btw, did you check out SpriteManage2 yet? I was thinking of buying it but not right now since v1 will be fine for the stuff I need do.

BlackShipsFillt
15-01-2010, 12:09 PM
Oh no! I think I'm probably going to have to buy SpriteManager2... I better get this SpriteManager1 tutorial done quick before it becomes obsolete.

BlackShipsFillt
15-01-2010, 06:34 PM
Oooh!! Just typed in "Unity3d spriteManager tutorial" in google (to see if there already was such a tutorial) and this thread comes up third... damn, I better get on it... I'll try find some time in the next day or two, I reckon I'll just get it to the point where the project's basics are setup, which will be useful for the Game Jam.

So just some sprites, their controls, some text, sound and buttons for now.