I just put up a tutorial on the wiki here, involving the 2D shooter + level editor project from here. No, this isn't the long-awaited 2D platformer tutorial; it's just something I put together over the last couple of days. It's not about how to create a 2D game, but about working with and extending a Unity project, with some scripting, so I don't think there will be any overlap. At first it was just going to be a brief thing, but somehow it got...longer. I tried not to make many assumptions about the hypothetical reader's abilities, so I guess it's more oriented towards beginners. It could probably use some screenshots. However, I've also attached here an extended version of the project from the above link, with everything from the tutorial up till Part 7, section 2 included (except Part 6, section 1a, 'cause I was too lazy), which might be useful as an illustration if I explained stuff wrong or left something out. Which is likely , so let me know about mistakes, etc.
NOTE: a newer version is available here. It's mostly the same as the attached version, but recompiled as a Unity 2.6.1 project. I'd replace the attachment here but that doesn't work for larger files anymore, so I'm leaving it for posterity or something...maybe people who for some reason are using an earlier Unity version....
Wow, this looks like you've invested quite some time into it. I only rushed over it but it looks very good!
I can't use these two things together.
Thanks; hopefully someone gets something from it. Forgot to say, I updated the project from the first link (the non-extended version), so if anyone downloaded that previously, it's been changed a little since then and won't quite work with the tutorial.
(I don't think Santa says "yo ho ho" unless he's also a pirate with a bottle of rum. )
/me starts singing Yo-ho, Yo-ho a pirate's life for me!
I can't use these two things together.
I now know that Eric IS Santa! Thanks very much for all the gifts during the last few weeks.
// aka Unity forum member #5 (and yet, I still can't code)
wow eric that's awesome - finally got a chance to look at it and its chock full of cool stuff (that level editor is sweet!)
fantastic work & very generous of you ; )
OK, it's been bugging me for days that I didn't implement all the scripting suggestions from the last couple pages of the tutorial, so I went ahead and finished it (except for the "lots o' stuff" part). So now the enemy ships won't crash into walls and they do pathfinding, so they can go around walls instead. Updated project folder above...replace the SimpleEnemy prefab on the Manager script with the Enemy prefab if you want to see the more advanced scripts in action. I updated Part 7 of the tutorial to cover some of the new stuff.
Thanks Eric for this great asset and tutorial!
Very helpful to us Unity newbies.
Happy new year!
Go play some jazz...
This is great...Ill dig thru this as well! thank you!
Looks like there are still lots of people who love the ol 2d!
( doh - Im using iPhone Unity - so the types are all required to be strict...do you you have a web based gameplay version of this? )
I put #pragma strict on all the scripts...there were only 2-3 lines that needed to be changed after doing that, but here's the whole lot anyway.
this is awesome...thank you for sharing. Its like Asteroids in a cave!
thank you again.
I downloaded the code but kept getting the following error on Unity 2.1:
Assets/2DShooter Assets/Scripts/FPSCounter.js(7,2): BCE0153: 'UnityEngine.RequireComponent' can be applied on one of these targets only : Class.
I had to replace it with
Also, it's amazing how horrible I am at this game.
Oops, thought I fixed that ages ago. Anyway you can make levels as easy as you want them to be, so make a level without any enemies, then you will be awesome at the game.
I got that error on my pc, unity 2.51
MissingReferenceException: The variable shootSound of 'BulletControl' doesn't exist anymore. This happened in the game object "Bullet2".
You probably need to select the "Bullet2" in the hierarchy and reassign the shootSound variable of the 'BulletControl' script in the inspector.
Awesome game and scripts Eric5h5, thanks again and a merry yo ho ho with a bottle of brandy!
Surely the day to be remembered is December 20, 2007 rather than today.... Thanks though.
Well - seems like I'm three years too late for this thread but the tutorial and sample project are both awesome still!
I opened the sample project in Unity 3.0, did the automatic project upgrade it prompts you for and got a bunch of compile errors since it seems that they have made an official Unity class named 'EditorGUI' which conflicts with the script in the sample project. In case anyone's stuck on that I just renamed both the script file and all references to it in LevelEditor.js to 'MyEditorGUI' and now it's working great.
Thank you Eric!