LET'S UNITY!!

A casual introduction to the Unity engine, with lots of helpful hints on how to approach it!

  • slash
  • 04/19/2015 02:56 PM
  • 21436 views
Let's...



Getting Started with Unity!

Hi! I'm Slash and I'm here to teach you about Unity3D. It's incredibly popular lately and there's already a number of designers on this site that use it (like me!) but there's no tutorials at all! Since it's my favorite game engine and since Kentona has been bugging me for it for a while, I figured I could write something up. Hopefully it helps~


What's the purpose of this tutorial?

This tutorial is meant to introduce game developers to the Unity3D game engine! If you’ve been interested in getting started with Unity, but have had trouble figuring out where to begin, this is the place. Don’t worry about your level of programming or 3D skills! I'll point game makers of all levels to where they should start. This tutorial introduces you to the very basics of Unity, provides links and analyses of walkthroughs for making simple games like space shooters and roguelikes in Unity, and ends with a list of links to further useful resources.


What is Unity3D?

Unity3D is a game engine - a program used to make games, like Microsoft Word is used to write essays and contracts. It was originally designed to make 3D games, but was always capable of making 2D games, and in the past few years has shifted toward a more generalized tool capable of both.


What’s Unity3D got to offer?

  • Can make 2D or 3D games of nearly any scope and size, from small mini-games to MMOs, online FPSes, and giant RPGs.
  • Can make games for many, many platforms: Windows, Mac, Linux, iOS, Android, WiiU, PS3/PS4, PS Vita, Xbox360, XBOne, and more!
  • Realistic physics, if you’re into that!
  • Easy-to-use particle effects!
  • Tons of free and premium plugins.
  • A widespread array of community support, including free scripts, tutorials, and walkthroughs.
  • A robust API with solid documentation, supporting both JavaScript and C# - your choice!





Games made with Unity! From top-left to bottom-right: Kerbal Space Program, Mobius Final Fantasy, Thomas Was Alone, Hearthstone



Okay, but how is Unity3D different than RPG Maker?

Unity is a much more general tool than VX Ace or other RPG Makers are. RM specializes in making traditional RPGs in the style of Dragon Quest and makes those kinds of games incredibly well and efficiently, with low barrier to entry. Unity is capable of making nearly any kind of game you can think of, but at the cost of more front-loaded work. It takes some time to learn how to work in Unity, moreso than RPG Maker, which has been designed to do a lot of the work for you.

If you’re mainly interested in making the kinds of games RPG Maker excels at, you might want to stick with it! It’ll likely be faster than learning Unity. If you’re interesting in something that RM isn’t quite adept at, Unity’s a great place to start.


How much work is it to learn Unity3D?

If you picked up Unity right now, in a few hours you could probably have a simple game with a character running around picking up objects - even if you don’t have much experience with code. If you practiced for a week or two, you could remake a very simple game like Asteroids. It would probably take at least a few months of solid practice to start on an RPG. However, this tutorial includes several walkthroughs that should help you get going in the right direction!

Of course, everyone’s going to be different! If you have a background writing code, it’ll be easier to jump in - but there’s still a bit to learn. If you don’t, it’s totally possible to learn code alongside learning Unity! That’s how I got started.


Getting Unity!

If you’re interested in giving Unity a shot, let’s get down to business. First off, download Unity from the Unity3D website - it’s totally free, and takes about 1.2 GB of space:

During the download & install process, it’ll ask you what you’re interested in installing:

  • You might want to include the Example Project if you want to see more examples of what you can do in Unity, and it’s a great way to experiment with tweaks and code easily within an already-built setting.

  • I definitely recommend downloading the Standard Assets. There’s a lot of helpful premade things in there that can make starting out in Unity easier, including scripts, particle effects, and more.



Let’s take a look at Unity:

Before we get started making something, let’s take a little walk around Unity and see how it’s all laid out! You don’t have to memorize everything yet, but this should get you at least acquainted with the common tools and windows you’ll be using.




Toolbar: Contains buttons for common actions in Unity, including the Play / Stop controls for testing your game quickly.

Scene: This is where you can physically lay out objects for your game. You can drag and drop objects from your project folder here. You can also select, reposition, rotate, resize, and generally interact with the objects that compose the scene. This is comparable to the mapping window in RPG Maker.

Inspector: This is where a lot of the tweaks get made! From here, you can edit the object that is currently selected. Each Component attached to that object will be listed here, and you can edit values for those Components here - whether it’s resizing an object, changing its color, or attaching a particle effect.

Hierarchy: The hierarchy contains a list of all of the objects within your scene. The currently selected object will be highlighted. From here, you can select objects, create parent-child relationships between objects, and rename objects.

Project: Here, we have a list of all of your assets - the files associated with your project. Right-clicking will allow you to create new assets or folders for organization, and you can also easily import assets by just dragging them into the Unity project view from your desktop or elsewhere on your computer.




Game: When you click the "Play" button from the toolbar, the Scene view will become the Game view, and you'll jump right into the currently loaded scene. This allows you to quickly test a scene without interrupting your development! While you're in this mode, you can easily tweak values in the Inspector. Note that any changes you make to the Inspector in Play mode won't be saved - it's just for testing!

  • If you're interested in more details about the Unity interface, read through Learning the Interface in Unity's online manual.
  • You may notice that the views in Unity can be in different positions - each one has a tab that allows you to rearrange your workstation, and each can be individually resized to your liking.
  • There’s lots of little buttons floating around the Unity interface, but most of them aren’t important for now! You can learn them as you go along.



The Breakdown

From here, we're going to be saying farewell to my part of the tutorial. You can go in any direction you please now at your own pace! My recommendations:

1) Follow one or more of the Walkthroughs below, in order of difficulty. Each one will get you more familiar with Unity.
2) When you want to branch out, check out some of the Bonus links below the walkthroughs. There you'll find everything from free assets, scripts, help with code, and more.


Let’s Make Something - A Collection of Walkthroughs!

I originally started this article with the intention of writing a little walkthrough to get newbies familiar with Unity… however, I did some research and it looks like there’s already a ton of great tutorials on Unity's website! So instead, I decided to go through some of these tutorials and write up a summary. This section will help you choose a tutorial that's right for you and tackle it.

I’ve gone through three tutorials and written a little bit about them, including the difficulty level, time it’ll take to complete, what you’ll learn, and how much code it’ll expect from you.




1) Roll-a-Ball

In your first foray into Unity development, create a simple rolling ball game that teaches you many of the principles of working with Game Objects, Components, Prefabs, Physics and Scripting.

Difficulty: Easy
Time to Complete: 2-4 hours
Experience Required: Very little. This tutorial walks you through each line of the code, so no previous scripting experience is needed. It’s intended for people who have never worked with Unity at all.
What you’ll learn:
  • Creating and setting up a scene in Unity
  • Placing and editing objects within the scene
  • Basic scripting within Unity
  • The basics of physics-based movement and collision
  • The basics of setting up a GUI
  • General overview of the Unity interface.


My thoughts: If you’ve worked with other similar game engines, such as Unreal, you could skip this tutorial, but it’s still a good way to learn Unity's interface and workflow. If you haven’t worked with a 3D game engine before, I highly recommend starting here! It's more of a prototype than a game, but it's quick and easy and will get you headed in the right direction.





2) Space Shooter

Expand your knowledge and experience of working with Unity by creating a simple top down arcade style shooter. Using basic assets provided by Unity Technologies, built-in components and writing simple custom code, understand how to work with imported Mesh Models, Audio, Textures and Materials while practicing more complicated Scripting principles.

Difficulty: Easy
Time to Complete: 3-6 hours
Experience Required: Only a little. This tutorial provides all the code necessary and explains it as you go along. If you completed the previous tutorial, you should be ready for this one.
What you'll learn:
  • How to import outside assets such as 3D models, textures, and sounds
  • Setting up objects with imported assets to create a spaceship player, lasers, asteroids, enemies and explosions
  • Camera management, lighting, and scene visuals like backgrounds
  • Using prefab objects to create multiple clones of a base object (to fire copies of a laser object)
  • More practice with physics movement and collision to determine laser hits, asteroid collisions, and boundaries of the level
  • Making an invisible "Game Controller" which manages the game state and waves of enemies


My thoughts: This will get you comfortable with a lot of the core workflow within Unity, and works as a slightly more advanced version of the last tutorial. You'll end up with a game fully decked out with real assets (provided to you), so the end result is much more satisfying. Small games like these are a great way to learn quickly.





2D Zombie Roguelike!

Difficulty: Intermediate
Time to Complete: 4-8 hours
Experience Required: Some coding experience and familiarity within Unity is required. If you've done the previous two tutorials, you should be fine!
What you'll learn:
  • Working with 2D Sprites within Unity, including animations
  • Procedural level generation for 2D tile-based levels
  • Scripting players, enemies, destructible walls, pickups, UI, and level transitions
  • Porting your game to a mobile device


My thoughts: This is the tutorial I think you all will really get into. It's trickier than the last two, so I recommend beginning with those, but creating a fully-complete roguelike is just cool. Being able to push it to your phone or tablet afterwards is even cooler. If you finish this project and you're looking for more, I recommend experimenting with settings in the Inspector and your scripts to add new features!



Bonus Places to Explore & More Ways to Learn!


Official Unity links

Unity's Online Manual

Contains a thorough introduction and explanation of each tool within Unity. When you decide you need to learn something for what you're making, look it up here, either through the Table of Contents on the left, or the search bar at the top.

Unity's Scripting API

A solid documentation of each scripting function within Unity. This can be switched between C# and JavaScript to match the language you're using, and there is a search bar in the top-right. In combination with the Unity Scripting Guide from the manual (and some general Googling), it's entirely possible to teach yourself to write code for Unity games from scratch.

Unity Asset Store

An online collection of assets that can be accessed and downloaded from within Unity3D - 3D models, scripts, sounds, sprites, and entire tools that give your editor new capabilities. Though it's called the "store", there are many free assets, such as the 3D model for Unity-chan, Unity3D's cute anime mascot..


Other sites!

Unify Community Wiki, an absolutely enormous collection of scripts, shaders, particle effects, and other things for use within Unity, all free!

Visual Studio for Unity, a plug-in by Microsoft for using Visual Studio to edit within Unity, if that's your thing!

CG Textures, a collection of free-to-use textures for free and commercial games. Perfect for easily creating 3D environments.

Unity Patterns, a collection of useful scripts and tutorials on some more intermediate topics like Object Pooling and customizing the Editor.



Well, that about wraps it up! If you have any questions or comments, leave a post below. I hope this helped you!

Posts

Pages: 1
slash
APATHY IS FOR COWARDS
4158
I'll keep an eye out for more helpful links and update the Links section when I can!

I went the whole article without making fun of unity, go me :D
sweet beans! This is the kind of stuff that spoonfeeds me to a point where I actually get into an engine. (I am unmotivated like that)
slash
APATHY IS FOR COWARDS
4158
author=kentona
sweet beans! This is the kind of stuff that spoonfeeds me to a point where I actually get into an engine. (I am unmotivated like that)


Yeaaa buddy! I'm glad, that's what I was hoping for. Unity has a lot of great tutorials and resources out there, but trying to figure out where to start can be pretty overwhelming.
CashmereCat
Self-proclaimed Puzzle Snob
11638
Ohhhhhhhhh yes! Sweet. Bookmarking this for later reading after I finish this assignment due in 12 hours (help).
Nice to see unity tutorials here!. This guide may prove to be useful for total visual studio noobs like me (the interface is huge and even finding font & font color options could prove to be a challenge)

http://twiik.net/articles/how-to-use-visual-studio-with-unity

unity
You're magical to me.
12540
author=slash
I'll keep an eye out for more helpful links and update the Links section when I can!

I went the whole article without making fun of unity, go me :D


Haha, thanks for that! This tutorial looks great, btw :DDDDDD
slash
APATHY IS FOR COWARDS
4158
author=ricifidi
Nice to see unity tutorials here!. This guide may prove to be useful for total visual studio noobs like me (the interface is huge and even finding font & font color options could prove to be a challenge)

http://twiik.net/articles/how-to-use-visual-studio-with-unity



Ah, fantastic! I'm super glad I switched to Visual Studio. I got by with MonoDevelop fine, but VS has all the really nice code completion and auto-syntax settings, it's great :D

author=unity
Haha, thanks for that! This tutorial looks great, btw :DDDDDD


Thanks ^^

I had so many good ones too!

"Making Games with Unity! (not that unity)"
"We Dream of Unity"
"A First Date with Unity" I think this one was Nessy's

author=CashmereCat
Ohhhhhhhhh yes! Sweet. Bookmarking this for later reading after I finish this assignment due in 12 hours (help).


You got this, dude! /o/
unity
You're magical to me.
12540
author=slash
author=unity
Haha, thanks for that! This tutorial looks great, btw :DDDDDD
"Making Games with Unity! (not that unity)"
"We Dream of Unity"
"A First Date with Unity" I think this one was Nessy's


^///^;; hehe
Pages: 1