SlideShare a Scribd company logo
1 of 44
Download to read offline
Unity3D Introduction Meeting 
GarageGeeks HQ 
25 / 1 / 2012
Hi ! 
● I am Noam Gat 
● (Ex) Game Developer at Omek (with Unity) 
● Team member in Ogre3D graphics engine 
● GameIS Member (Join us!)
And you are... 
● Mostly programmers 
● Little to no experience in game-dev 
● Disagree? Raise your hand!
Lama Anglit? 
כי זה יותר נוח! ● 
נלמד כמה מושגים, עדיף שיהיו מקושרים ● 
לסביבה שנעבוד בה. 
אני מפחד מעברית. ●
Mission Statement 
What are we NOT going to do ? 
● Learn how to program / design games 
● Learn enough to develop a game on our own 
● Be 100% punctual and exact
Mission Statement 
So what are we going to do ? 
● Understand what a GAME ENGINE is 
● Get a broad sense of how to work with unity 
● Be able to work / talk with other UNITY devs
What is a game ? 
Lets look at it from a 
programmer's point of view...
What is a game ? 
My “Hello world” program : 
● Has a start point and an end point 
int main() 
{ 
print(“Hello world”); 
} 
Often called a “procedural” program
What is a game ? 
My “GUI / Forms / Widgets” program : 
● Doesn't have a known end point / time. 
void OnButtonDown() 
{ 
MessageBox.Show(“Hello world”); 
} 
Often called an “event based” program
What is a game ? 
But why does “OnButtonDown” get called? 
● Because the RUNTIME ENGINE invokes it. 
We already don't control everything, but have 
just enough power to do what we need.
What is an event ? 
Depends on who you ask. 
● GUI Apps? Mouse and keyboard movement 
and presses, socket connections etc. 
● Games? Input, network, physics, and 
(IMO the difference) - Time
What is a game ? 
“A game is just an event-based application 
in which things happen even if nobody does 
anything” 
Noam Gat, “Unity 3D Introduction Meeting”, 25.1.2012
What is a game engine? 
A GAME ENGINE is an environment that 
manages the different ENTITIES and 
SUBSYSTEMS of a game and sends the 
correct events to the code that the 
developer writes.
What subsystems? 
Central managers of different aspects 
● Scene graphs (Hierarchy) 
● Presentation (Graphics and Audio) 
● Input (On-site and remote) 
● Resources (Art and tech - Project) 
● Logic (Physics, AI, Behaviors)
Entities ? 
● ENTITIES are a design pattern in which 
systems are broken down into small 
pieces that work together to create 
complex behavior. In UNITY these are called 
GAME OBJECTS.
Hello box
Hello box 
What's in the box? 
● A TRANSFORM (position in the world) 
● A MESH (visual geometry) 
● A MATERIAL (rendering properties like color) 
● A COLLIDER (physics geometry) 
● A RIGID BODY (physical properties like mass)
Hello box 
TRANSFORM 
MESH 
COLLIDER 
MATERIAL 
RIGID BODY 
Do we always need everything?
Modularity 
If we don't need physics, we can remove components. 
Can we remove any more components?
Unity Editor 
The INSPECTOR shows the components of an object 
The SCENE view shows us the world as it is 
The GAME view shows us the world from the camera 
The HIERARCHY shows us the objects in the current scene 
The PROJECT shows us all of the assets in the project
I want to code ! 
Coding in Unity is done via custom BEHAVIORS written 
in the Mono (like .NET) environment. 
Unity supports C# and variants of javascript, python. 
We will use javascript / C# today.
I want to code 
But first : How to navigate in the world in the editor. 
MOVIE
Exercise #1 : Spinning Cube 
1. Split into groups of 2 – 4 people 
2. Create a new (empty) unity project 
3. Create a scene and put a box in it, without physics 
4. Create a javascript script in the project, and put the 
following line in the Update function : 
transform.RotateAroundLocal(Vector3.up, 1); 
5. Attach the script to the cube in the scene 
6. Press play and watch the magic happen!
Exercise #1 : Post Mortem 
What happened? 
1. The cube has a BEHAVIOR on it 
2. UNITY calls its Update() function (why? docs) 
3. The cube spins around a bit : 
transform.RotateAroundLocal(Vector3.up, 1); 
4. After spinning a bit for a lot of frames, it spins a lot
Exercise #1 : Post Mortem 
Do we really know what is happening? 
How fast is the cube spinning?
Exercise #2 : In Control 
In the same group, modify the script so that 
A: It contains a modifyable rotating speed, called 
“turns per second”. Do this with this line : 
public var turnsPerSecond = 1.0f; 
B: The cube rotates along that speed. Hint : 
Time.deltaTime, Mathf.PI 
C: Try changing the parameter at 
Runtime!
Exercise #2 : In Control 
Solution : 
transform.RotateAroundLocal(Vector3.up, 
Time.deltaTime * turnsPerSecond * Mathf.PI * 2); 
(Not important if you missed the 2)
Exercise #2 : In Control 
We just learned how to configure our entities! 
- It makes it easy to separate logic (code) from design 
decisions (parameters for components). 
- Even <Insert none-coder stereotype here> can 
control the spinning cube!
Exercise #2.1 : In Control-er 
Its not a game if we don't have any gameplay... 
OMG LETS CONTROL THE SPINNING SPEED!!! 
1. Declare two new parameters : 
public var turnMoreKey = KeyCode.D; 
public var turnLessKey = KeyCode.A; 
2. Use Input.GetKey(...) to control the spinning speed.
Prefabs 
After a few components your objects could get complicated. 
You might want to classify a “cube with a transform spinner” 
A “spinning cube”.
Exercise #2.2 : In Control-est 
1. Create a prefab by dragging the cube to the project view. 
2. Create one instance of the prefab for each team member 
by dragging it to the scene. 
Give each instance different control keys. 
3. Battle it out for the spinningest cube!
Summary 
Yadda yadda yadda. 
I'll crowdsource this one.
Congratulations ! 
You now know Unity! 
You can do anything you want with it! 
Lets play spinning cube!
No, really. 
You understand how different systems connect to each 
other (we used the INPUT subsystem to control a 
TRANSFORM COMPONENT of a specific 
GAMEOBJECT) 
Lets try to learn how to learn.
Exercise #3 : Gone Fishing 
We want to know how each player is doing. 
For each cube, display an on-screen string in the form of : 
“Dudu's cube : Y rotation is 121.221 degrees” 
How will we do this? 
Help → Manual / Reference Manual / Scripting Reference 
We are looking for a Graphical User Interface (GUI) 
No cheating (Forums / internet) for this one please!
Hierarchies 
Pretty good video here as well, I'll just play it
Exercise #4 : Tabletop 
1. Create a simple scene of a table, a tray on the table 
and some fruits on the tray. 
2. Use parenting to create a correct hierarchy. 
3. Place transform spinners on many elements in your 
scene. Check that the scene makes sense when you 
move them.
Summary 
What have we learned? 
● What should a GAME ENGINE give us 
● How does UNITY separate itself into different 
SUBSYSTEMS and COMPONENTS 
● How can we extend UNITY and make our code run in it 
● How to answer our own questions about UNITY
Exercise #5 : Explore! 
1. Open the “Angry Bots” sample project. 
2. Spend about 5-10 minutes looking around, another 
three minutes deciding on something to do in it, 
then take 15-20 minutes to do it (if time permits). 
3. GL HF!
What now ? 
You don't know how to make games... YET
Be like the squirrel 
You should (hopefully) be able to take a big problem 
(“how to create a game?”) and rip it apart to smaller 
questions and research into them on your own.
Give it a whirl 
1. Global game jam 
This weekend! 
2. Advanced unity meetings 
Israeli Unity3D developers UNITE! 
3. Facebook groups. 
Israeli Unity3d developers 
4. The only limit is yourself. 
Welcome to zombo.com
Questions?
Cheers!

More Related Content

What's hot

Introduction to Unity3D Game Engine
Introduction to Unity3D Game EngineIntroduction to Unity3D Game Engine
Introduction to Unity3D Game EngineMohsen Mirhoseini
 
Unity 3D
Unity 3DUnity 3D
Unity 3Dgema123
 
Unity Introduction
Unity IntroductionUnity Introduction
Unity IntroductionJuwal Bose
 
Unreal Engine Basics 05 - User Interface
Unreal Engine Basics 05 - User InterfaceUnreal Engine Basics 05 - User Interface
Unreal Engine Basics 05 - User InterfaceNick Pruehs
 
The Basics of Unity - The Game Engine
The Basics of Unity - The Game EngineThe Basics of Unity - The Game Engine
The Basics of Unity - The Game EngineOrisysIndia
 
Introduction to AR with Unity3D
Introduction to AR with Unity3DIntroduction to AR with Unity3D
Introduction to AR with Unity3DAndreas Blick
 
Building Non-Linear Narratives in Horizon Zero Dawn
Building Non-Linear Narratives in Horizon Zero DawnBuilding Non-Linear Narratives in Horizon Zero Dawn
Building Non-Linear Narratives in Horizon Zero DawnGuerrilla
 
Introduction to Game Development
Introduction to Game DevelopmentIntroduction to Game Development
Introduction to Game DevelopmentSumit Jain
 
Game Development with Unity
Game Development with UnityGame Development with Unity
Game Development with Unitydavidluzgouveia
 
Game Project / Working with Unity
Game Project / Working with UnityGame Project / Working with Unity
Game Project / Working with UnityPetri Lankoski
 
3-Game Graphics (Game Design and Development)
3-Game Graphics (Game Design and Development)3-Game Graphics (Game Design and Development)
3-Game Graphics (Game Design and Development)Hafiz Ammar Siddiqui
 
PRESENTATION ON Game Engine
PRESENTATION ON Game EnginePRESENTATION ON Game Engine
PRESENTATION ON Game EngineDiksha Bhargava
 
Game Engine Architecture
Game Engine ArchitectureGame Engine Architecture
Game Engine ArchitectureAttila Jenei
 
Streamlined landscape creation with new Terrain Tools- Unite Copenhagen 2019
Streamlined landscape creation with new Terrain Tools- Unite Copenhagen 2019Streamlined landscape creation with new Terrain Tools- Unite Copenhagen 2019
Streamlined landscape creation with new Terrain Tools- Unite Copenhagen 2019Unity Technologies
 
An Introduction To Game development
An Introduction To Game developmentAn Introduction To Game development
An Introduction To Game developmentAhmed
 
Game engines and Their Influence in Game Design
Game engines and Their Influence in Game DesignGame engines and Their Influence in Game Design
Game engines and Their Influence in Game DesignPrashant Warrier
 
MMO Design Architecture by Andrew
MMO Design Architecture by AndrewMMO Design Architecture by Andrew
MMO Design Architecture by AndrewAgate Studio
 
Introdução ao Desenvolvimemto de Jogos com Unity
Introdução ao Desenvolvimemto de Jogos com UnityIntrodução ao Desenvolvimemto de Jogos com Unity
Introdução ao Desenvolvimemto de Jogos com UnityWandreson Souza
 

What's hot (20)

Introduction to Unity3D Game Engine
Introduction to Unity3D Game EngineIntroduction to Unity3D Game Engine
Introduction to Unity3D Game Engine
 
Unity 3D
Unity 3DUnity 3D
Unity 3D
 
Unity Introduction
Unity IntroductionUnity Introduction
Unity Introduction
 
Unreal Engine Basics 05 - User Interface
Unreal Engine Basics 05 - User InterfaceUnreal Engine Basics 05 - User Interface
Unreal Engine Basics 05 - User Interface
 
The Basics of Unity - The Game Engine
The Basics of Unity - The Game EngineThe Basics of Unity - The Game Engine
The Basics of Unity - The Game Engine
 
Unity 3d Basics
Unity 3d BasicsUnity 3d Basics
Unity 3d Basics
 
Introduction to AR with Unity3D
Introduction to AR with Unity3DIntroduction to AR with Unity3D
Introduction to AR with Unity3D
 
Building Non-Linear Narratives in Horizon Zero Dawn
Building Non-Linear Narratives in Horizon Zero DawnBuilding Non-Linear Narratives in Horizon Zero Dawn
Building Non-Linear Narratives in Horizon Zero Dawn
 
Introduction to Game Development
Introduction to Game DevelopmentIntroduction to Game Development
Introduction to Game Development
 
Game Development with Unity
Game Development with UnityGame Development with Unity
Game Development with Unity
 
Game Project / Working with Unity
Game Project / Working with UnityGame Project / Working with Unity
Game Project / Working with Unity
 
3-Game Graphics (Game Design and Development)
3-Game Graphics (Game Design and Development)3-Game Graphics (Game Design and Development)
3-Game Graphics (Game Design and Development)
 
PRESENTATION ON Game Engine
PRESENTATION ON Game EnginePRESENTATION ON Game Engine
PRESENTATION ON Game Engine
 
Game Engine Architecture
Game Engine ArchitectureGame Engine Architecture
Game Engine Architecture
 
Streamlined landscape creation with new Terrain Tools- Unite Copenhagen 2019
Streamlined landscape creation with new Terrain Tools- Unite Copenhagen 2019Streamlined landscape creation with new Terrain Tools- Unite Copenhagen 2019
Streamlined landscape creation with new Terrain Tools- Unite Copenhagen 2019
 
An Introduction To Game development
An Introduction To Game developmentAn Introduction To Game development
An Introduction To Game development
 
Game engines and Their Influence in Game Design
Game engines and Their Influence in Game DesignGame engines and Their Influence in Game Design
Game engines and Their Influence in Game Design
 
Game dev process
Game dev processGame dev process
Game dev process
 
MMO Design Architecture by Andrew
MMO Design Architecture by AndrewMMO Design Architecture by Andrew
MMO Design Architecture by Andrew
 
Introdução ao Desenvolvimemto de Jogos com Unity
Introdução ao Desenvolvimemto de Jogos com UnityIntrodução ao Desenvolvimemto de Jogos com Unity
Introdução ao Desenvolvimemto de Jogos com Unity
 

Viewers also liked

Unity Programming
Unity Programming Unity Programming
Unity Programming Sperasoft
 
Introduction to Unity3D and Building your First Game
Introduction to Unity3D and Building your First GameIntroduction to Unity3D and Building your First Game
Introduction to Unity3D and Building your First GameSarah Sexton
 
Mobile AR Lecture6 - Introduction to Unity 3D
Mobile AR Lecture6 - Introduction to Unity 3DMobile AR Lecture6 - Introduction to Unity 3D
Mobile AR Lecture6 - Introduction to Unity 3DMark Billinghurst
 
Unity Презентация
Unity ПрезентацияUnity Презентация
Unity ПрезентацияDmitriy Bolshakov
 
Academy PRO: Unity 3D. Scripting
Academy PRO: Unity 3D. ScriptingAcademy PRO: Unity 3D. Scripting
Academy PRO: Unity 3D. ScriptingBinary Studio
 
Introductory Virtual Reality in Unity3d
Introductory Virtual Reality in Unity3dIntroductory Virtual Reality in Unity3d
Introductory Virtual Reality in Unity3dBond University
 
Pathfinding - Part 2: Examples in Unity
Pathfinding - Part 2: Examples in UnityPathfinding - Part 2: Examples in Unity
Pathfinding - Part 2: Examples in UnityStavros Vassos
 
Code and Memory Optimisation Tricks
Code and Memory Optimisation Tricks Code and Memory Optimisation Tricks
Code and Memory Optimisation Tricks Sperasoft
 
Unity3D Scripting: State Machine
Unity3D Scripting: State MachineUnity3D Scripting: State Machine
Unity3D Scripting: State MachineSperasoft
 
C# 101: Intro to Programming with C#
C# 101: Intro to Programming with C#C# 101: Intro to Programming with C#
C# 101: Intro to Programming with C#Hawkman Academy
 
Unity 2d sharp
Unity 2d sharpUnity 2d sharp
Unity 2d sharpJerel Hass
 
2D Game Development with Starling
2D Game Development with Starling2D Game Development with Starling
2D Game Development with StarlingJuwal Bose
 
My Level Design For 2D Scroll Game
My Level Design For 2D Scroll GameMy Level Design For 2D Scroll Game
My Level Design For 2D Scroll GameArron96
 

Viewers also liked (20)

Unity Programming
Unity Programming Unity Programming
Unity Programming
 
Unity presentation
Unity presentationUnity presentation
Unity presentation
 
Introduction to Unity3D and Building your First Game
Introduction to Unity3D and Building your First GameIntroduction to Unity3D and Building your First Game
Introduction to Unity3D and Building your First Game
 
Unity 3d scripting tutorial
Unity 3d scripting tutorialUnity 3d scripting tutorial
Unity 3d scripting tutorial
 
Mobile AR Lecture6 - Introduction to Unity 3D
Mobile AR Lecture6 - Introduction to Unity 3DMobile AR Lecture6 - Introduction to Unity 3D
Mobile AR Lecture6 - Introduction to Unity 3D
 
Unity 5 Overview
Unity 5 OverviewUnity 5 Overview
Unity 5 Overview
 
Unity is strength presentation slides
Unity is strength presentation slidesUnity is strength presentation slides
Unity is strength presentation slides
 
Unity Презентация
Unity ПрезентацияUnity Презентация
Unity Презентация
 
Academy PRO: Unity 3D. Scripting
Academy PRO: Unity 3D. ScriptingAcademy PRO: Unity 3D. Scripting
Academy PRO: Unity 3D. Scripting
 
Introductory Virtual Reality in Unity3d
Introductory Virtual Reality in Unity3dIntroductory Virtual Reality in Unity3d
Introductory Virtual Reality in Unity3d
 
Pathfinding - Part 2: Examples in Unity
Pathfinding - Part 2: Examples in UnityPathfinding - Part 2: Examples in Unity
Pathfinding - Part 2: Examples in Unity
 
Code and Memory Optimisation Tricks
Code and Memory Optimisation Tricks Code and Memory Optimisation Tricks
Code and Memory Optimisation Tricks
 
Securing PHP Applications
Securing PHP ApplicationsSecuring PHP Applications
Securing PHP Applications
 
NYPF14 Report - CDA
NYPF14 Report - CDANYPF14 Report - CDA
NYPF14 Report - CDA
 
Agile Retrospectives
Agile RetrospectivesAgile Retrospectives
Agile Retrospectives
 
Unity3D Scripting: State Machine
Unity3D Scripting: State MachineUnity3D Scripting: State Machine
Unity3D Scripting: State Machine
 
C# 101: Intro to Programming with C#
C# 101: Intro to Programming with C#C# 101: Intro to Programming with C#
C# 101: Intro to Programming with C#
 
Unity 2d sharp
Unity 2d sharpUnity 2d sharp
Unity 2d sharp
 
2D Game Development with Starling
2D Game Development with Starling2D Game Development with Starling
2D Game Development with Starling
 
My Level Design For 2D Scroll Game
My Level Design For 2D Scroll GameMy Level Design For 2D Scroll Game
My Level Design For 2D Scroll Game
 

Similar to Unity introduction for programmers

Gamemaker lesson 1
Gamemaker lesson 1Gamemaker lesson 1
Gamemaker lesson 1iain bruce
 
School For Games 2015 - Unity Engine Basics
School For Games 2015 - Unity Engine BasicsSchool For Games 2015 - Unity Engine Basics
School For Games 2015 - Unity Engine BasicsNick Pruehs
 
DSC RNGPIT - Getting Started with Game Development Day 1
DSC RNGPIT - Getting Started with Game Development Day 1DSC RNGPIT - Getting Started with Game Development Day 1
DSC RNGPIT - Getting Started with Game Development Day 1DeepMevada1
 
Academy PRO: Unity 3D. Environment
Academy PRO: Unity 3D. EnvironmentAcademy PRO: Unity 3D. Environment
Academy PRO: Unity 3D. EnvironmentBinary Studio
 
2%20-%20Scripting%20Tutorial
2%20-%20Scripting%20Tutorial2%20-%20Scripting%20Tutorial
2%20-%20Scripting%20Tutorialtutorialsruby
 
2%20-%20Scripting%20Tutorial
2%20-%20Scripting%20Tutorial2%20-%20Scripting%20Tutorial
2%20-%20Scripting%20Tutorialtutorialsruby
 
How We Won Gamedev By Rolling Our Own Tech (no notes)
How We Won Gamedev By Rolling Our Own Tech (no notes)How We Won Gamedev By Rolling Our Own Tech (no notes)
How We Won Gamedev By Rolling Our Own Tech (no notes)Mihai Gosa
 
Introduction to Game Programming: Using C# and Unity 3D - Chapter 3 (Preview)
Introduction to Game Programming: Using C# and Unity 3D - Chapter 3 (Preview)Introduction to Game Programming: Using C# and Unity 3D - Chapter 3 (Preview)
Introduction to Game Programming: Using C# and Unity 3D - Chapter 3 (Preview)noorcon
 
Unity - Building Your First Real-Time 3D Project - All Slides
Unity - Building Your First Real-Time 3D Project - All SlidesUnity - Building Your First Real-Time 3D Project - All Slides
Unity - Building Your First Real-Time 3D Project - All SlidesNexusEdgesupport
 
Unity3d scripting tutorial
Unity3d scripting tutorialUnity3d scripting tutorial
Unity3d scripting tutorialhungnttg
 
GameMaker 1) intro to gamemaker
GameMaker 1) intro to gamemakerGameMaker 1) intro to gamemaker
GameMaker 1) intro to gamemakeriain bruce
 
Introduction to Box2D Physics Engine
Introduction to Box2D Physics EngineIntroduction to Box2D Physics Engine
Introduction to Box2D Physics Enginefirstthumb
 
2 d gameplaytutorial
2 d gameplaytutorial2 d gameplaytutorial
2 d gameplaytutorialunityshare
 
Unty3D Awesome Assets - uTomate
Unty3D Awesome Assets - uTomateUnty3D Awesome Assets - uTomate
Unty3D Awesome Assets - uTomateTaras Leskiv
 
COMP521-report
COMP521-reportCOMP521-report
COMP521-reportMinjoo Cha
 
Cross platform game development
Cross platform game developmentCross platform game development
Cross platform game developmentJerel Hass
 
6 surprising ways_to_use_jupyter_0
6 surprising ways_to_use_jupyter_06 surprising ways_to_use_jupyter_0
6 surprising ways_to_use_jupyter_0Weghlis Azzariou
 

Similar to Unity introduction for programmers (20)

Gamemaker lesson 1
Gamemaker lesson 1Gamemaker lesson 1
Gamemaker lesson 1
 
School For Games 2015 - Unity Engine Basics
School For Games 2015 - Unity Engine BasicsSchool For Games 2015 - Unity Engine Basics
School For Games 2015 - Unity Engine Basics
 
DSC RNGPIT - Getting Started with Game Development Day 1
DSC RNGPIT - Getting Started with Game Development Day 1DSC RNGPIT - Getting Started with Game Development Day 1
DSC RNGPIT - Getting Started with Game Development Day 1
 
Academy PRO: Unity 3D. Environment
Academy PRO: Unity 3D. EnvironmentAcademy PRO: Unity 3D. Environment
Academy PRO: Unity 3D. Environment
 
2%20-%20Scripting%20Tutorial
2%20-%20Scripting%20Tutorial2%20-%20Scripting%20Tutorial
2%20-%20Scripting%20Tutorial
 
2%20-%20Scripting%20Tutorial
2%20-%20Scripting%20Tutorial2%20-%20Scripting%20Tutorial
2%20-%20Scripting%20Tutorial
 
Unity workshop
Unity workshopUnity workshop
Unity workshop
 
How We Won Gamedev By Rolling Our Own Tech (no notes)
How We Won Gamedev By Rolling Our Own Tech (no notes)How We Won Gamedev By Rolling Our Own Tech (no notes)
How We Won Gamedev By Rolling Our Own Tech (no notes)
 
Introduction to Game Programming: Using C# and Unity 3D - Chapter 3 (Preview)
Introduction to Game Programming: Using C# and Unity 3D - Chapter 3 (Preview)Introduction to Game Programming: Using C# and Unity 3D - Chapter 3 (Preview)
Introduction to Game Programming: Using C# and Unity 3D - Chapter 3 (Preview)
 
Unity - Building Your First Real-Time 3D Project - All Slides
Unity - Building Your First Real-Time 3D Project - All SlidesUnity - Building Your First Real-Time 3D Project - All Slides
Unity - Building Your First Real-Time 3D Project - All Slides
 
Unity3d scripting tutorial
Unity3d scripting tutorialUnity3d scripting tutorial
Unity3d scripting tutorial
 
GameMaker 1) intro to gamemaker
GameMaker 1) intro to gamemakerGameMaker 1) intro to gamemaker
GameMaker 1) intro to gamemaker
 
Introduction to Box2D Physics Engine
Introduction to Box2D Physics EngineIntroduction to Box2D Physics Engine
Introduction to Box2D Physics Engine
 
2 d gameplaytutorial
2 d gameplaytutorial2 d gameplaytutorial
2 d gameplaytutorial
 
Unty3D Awesome Assets - uTomate
Unty3D Awesome Assets - uTomateUnty3D Awesome Assets - uTomate
Unty3D Awesome Assets - uTomate
 
Soc research
Soc researchSoc research
Soc research
 
COMP521-report
COMP521-reportCOMP521-report
COMP521-report
 
Cross platform game development
Cross platform game developmentCross platform game development
Cross platform game development
 
intern.pdf
intern.pdfintern.pdf
intern.pdf
 
6 surprising ways_to_use_jupyter_0
6 surprising ways_to_use_jupyter_06 surprising ways_to_use_jupyter_0
6 surprising ways_to_use_jupyter_0
 

Recently uploaded

『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书rnrncn29
 
Levelling - Rise and fall - Height of instrument method
Levelling - Rise and fall - Height of instrument methodLevelling - Rise and fall - Height of instrument method
Levelling - Rise and fall - Height of instrument methodManicka Mamallan Andavar
 
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...Erbil Polytechnic University
 
CME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTES
CME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTESCME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTES
CME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTESkarthi keyan
 
Robotics Group 10 (Control Schemes) cse.pdf
Robotics Group 10  (Control Schemes) cse.pdfRobotics Group 10  (Control Schemes) cse.pdf
Robotics Group 10 (Control Schemes) cse.pdfsahilsajad201
 
KCD Costa Rica 2024 - Nephio para parvulitos
KCD Costa Rica 2024 - Nephio para parvulitosKCD Costa Rica 2024 - Nephio para parvulitos
KCD Costa Rica 2024 - Nephio para parvulitosVictor Morales
 
Virtual memory management in Operating System
Virtual memory management in Operating SystemVirtual memory management in Operating System
Virtual memory management in Operating SystemRashmi Bhat
 
Cost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based questionCost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based questionSneha Padhiar
 
A brief look at visionOS - How to develop app on Apple's Vision Pro
A brief look at visionOS - How to develop app on Apple's Vision ProA brief look at visionOS - How to develop app on Apple's Vision Pro
A brief look at visionOS - How to develop app on Apple's Vision ProRay Yuan Liu
 
Katarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School CourseKatarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School Coursebim.edu.pl
 
Curve setting (Basic Mine Surveying)_MI10412MI.pptx
Curve setting (Basic Mine Surveying)_MI10412MI.pptxCurve setting (Basic Mine Surveying)_MI10412MI.pptx
Curve setting (Basic Mine Surveying)_MI10412MI.pptxRomil Mishra
 
CS 3251 Programming in c all unit notes pdf
CS 3251 Programming in c all unit notes pdfCS 3251 Programming in c all unit notes pdf
CS 3251 Programming in c all unit notes pdfBalamuruganV28
 
"Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ..."Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ...Erbil Polytechnic University
 
Mine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxMine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxRomil Mishra
 
Immutable Image-Based Operating Systems - EW2024.pdf
Immutable Image-Based Operating Systems - EW2024.pdfImmutable Image-Based Operating Systems - EW2024.pdf
Immutable Image-Based Operating Systems - EW2024.pdfDrew Moseley
 
Turn leadership mistakes into a better future.pptx
Turn leadership mistakes into a better future.pptxTurn leadership mistakes into a better future.pptx
Turn leadership mistakes into a better future.pptxStephen Sitton
 
DEVICE DRIVERS AND INTERRUPTS SERVICE MECHANISM.pdf
DEVICE DRIVERS AND INTERRUPTS  SERVICE MECHANISM.pdfDEVICE DRIVERS AND INTERRUPTS  SERVICE MECHANISM.pdf
DEVICE DRIVERS AND INTERRUPTS SERVICE MECHANISM.pdfAkritiPradhan2
 
Comprehensive energy systems.pdf Comprehensive energy systems.pdf
Comprehensive energy systems.pdf Comprehensive energy systems.pdfComprehensive energy systems.pdf Comprehensive energy systems.pdf
Comprehensive energy systems.pdf Comprehensive energy systems.pdfalene1
 
Javier_Fernandez_CARS_workshop_presentation.pptx
Javier_Fernandez_CARS_workshop_presentation.pptxJavier_Fernandez_CARS_workshop_presentation.pptx
Javier_Fernandez_CARS_workshop_presentation.pptxJavier Fernández Muñoz
 

Recently uploaded (20)

『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书
『澳洲文凭』买麦考瑞大学毕业证书成绩单办理澳洲Macquarie文凭学位证书
 
Levelling - Rise and fall - Height of instrument method
Levelling - Rise and fall - Height of instrument methodLevelling - Rise and fall - Height of instrument method
Levelling - Rise and fall - Height of instrument method
 
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
 
CME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTES
CME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTESCME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTES
CME 397 - SURFACE ENGINEERING - UNIT 1 FULL NOTES
 
Robotics Group 10 (Control Schemes) cse.pdf
Robotics Group 10  (Control Schemes) cse.pdfRobotics Group 10  (Control Schemes) cse.pdf
Robotics Group 10 (Control Schemes) cse.pdf
 
KCD Costa Rica 2024 - Nephio para parvulitos
KCD Costa Rica 2024 - Nephio para parvulitosKCD Costa Rica 2024 - Nephio para parvulitos
KCD Costa Rica 2024 - Nephio para parvulitos
 
Virtual memory management in Operating System
Virtual memory management in Operating SystemVirtual memory management in Operating System
Virtual memory management in Operating System
 
Cost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based questionCost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based question
 
A brief look at visionOS - How to develop app on Apple's Vision Pro
A brief look at visionOS - How to develop app on Apple's Vision ProA brief look at visionOS - How to develop app on Apple's Vision Pro
A brief look at visionOS - How to develop app on Apple's Vision Pro
 
Katarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School CourseKatarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School Course
 
Curve setting (Basic Mine Surveying)_MI10412MI.pptx
Curve setting (Basic Mine Surveying)_MI10412MI.pptxCurve setting (Basic Mine Surveying)_MI10412MI.pptx
Curve setting (Basic Mine Surveying)_MI10412MI.pptx
 
CS 3251 Programming in c all unit notes pdf
CS 3251 Programming in c all unit notes pdfCS 3251 Programming in c all unit notes pdf
CS 3251 Programming in c all unit notes pdf
 
"Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ..."Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ...
 
Mine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxMine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptx
 
Immutable Image-Based Operating Systems - EW2024.pdf
Immutable Image-Based Operating Systems - EW2024.pdfImmutable Image-Based Operating Systems - EW2024.pdf
Immutable Image-Based Operating Systems - EW2024.pdf
 
Designing pile caps according to ACI 318-19.pptx
Designing pile caps according to ACI 318-19.pptxDesigning pile caps according to ACI 318-19.pptx
Designing pile caps according to ACI 318-19.pptx
 
Turn leadership mistakes into a better future.pptx
Turn leadership mistakes into a better future.pptxTurn leadership mistakes into a better future.pptx
Turn leadership mistakes into a better future.pptx
 
DEVICE DRIVERS AND INTERRUPTS SERVICE MECHANISM.pdf
DEVICE DRIVERS AND INTERRUPTS  SERVICE MECHANISM.pdfDEVICE DRIVERS AND INTERRUPTS  SERVICE MECHANISM.pdf
DEVICE DRIVERS AND INTERRUPTS SERVICE MECHANISM.pdf
 
Comprehensive energy systems.pdf Comprehensive energy systems.pdf
Comprehensive energy systems.pdf Comprehensive energy systems.pdfComprehensive energy systems.pdf Comprehensive energy systems.pdf
Comprehensive energy systems.pdf Comprehensive energy systems.pdf
 
Javier_Fernandez_CARS_workshop_presentation.pptx
Javier_Fernandez_CARS_workshop_presentation.pptxJavier_Fernandez_CARS_workshop_presentation.pptx
Javier_Fernandez_CARS_workshop_presentation.pptx
 

Unity introduction for programmers

  • 1. Unity3D Introduction Meeting GarageGeeks HQ 25 / 1 / 2012
  • 2. Hi ! ● I am Noam Gat ● (Ex) Game Developer at Omek (with Unity) ● Team member in Ogre3D graphics engine ● GameIS Member (Join us!)
  • 3. And you are... ● Mostly programmers ● Little to no experience in game-dev ● Disagree? Raise your hand!
  • 4. Lama Anglit? כי זה יותר נוח! ● נלמד כמה מושגים, עדיף שיהיו מקושרים ● לסביבה שנעבוד בה. אני מפחד מעברית. ●
  • 5. Mission Statement What are we NOT going to do ? ● Learn how to program / design games ● Learn enough to develop a game on our own ● Be 100% punctual and exact
  • 6. Mission Statement So what are we going to do ? ● Understand what a GAME ENGINE is ● Get a broad sense of how to work with unity ● Be able to work / talk with other UNITY devs
  • 7. What is a game ? Lets look at it from a programmer's point of view...
  • 8. What is a game ? My “Hello world” program : ● Has a start point and an end point int main() { print(“Hello world”); } Often called a “procedural” program
  • 9. What is a game ? My “GUI / Forms / Widgets” program : ● Doesn't have a known end point / time. void OnButtonDown() { MessageBox.Show(“Hello world”); } Often called an “event based” program
  • 10. What is a game ? But why does “OnButtonDown” get called? ● Because the RUNTIME ENGINE invokes it. We already don't control everything, but have just enough power to do what we need.
  • 11. What is an event ? Depends on who you ask. ● GUI Apps? Mouse and keyboard movement and presses, socket connections etc. ● Games? Input, network, physics, and (IMO the difference) - Time
  • 12. What is a game ? “A game is just an event-based application in which things happen even if nobody does anything” Noam Gat, “Unity 3D Introduction Meeting”, 25.1.2012
  • 13. What is a game engine? A GAME ENGINE is an environment that manages the different ENTITIES and SUBSYSTEMS of a game and sends the correct events to the code that the developer writes.
  • 14. What subsystems? Central managers of different aspects ● Scene graphs (Hierarchy) ● Presentation (Graphics and Audio) ● Input (On-site and remote) ● Resources (Art and tech - Project) ● Logic (Physics, AI, Behaviors)
  • 15. Entities ? ● ENTITIES are a design pattern in which systems are broken down into small pieces that work together to create complex behavior. In UNITY these are called GAME OBJECTS.
  • 17. Hello box What's in the box? ● A TRANSFORM (position in the world) ● A MESH (visual geometry) ● A MATERIAL (rendering properties like color) ● A COLLIDER (physics geometry) ● A RIGID BODY (physical properties like mass)
  • 18. Hello box TRANSFORM MESH COLLIDER MATERIAL RIGID BODY Do we always need everything?
  • 19. Modularity If we don't need physics, we can remove components. Can we remove any more components?
  • 20. Unity Editor The INSPECTOR shows the components of an object The SCENE view shows us the world as it is The GAME view shows us the world from the camera The HIERARCHY shows us the objects in the current scene The PROJECT shows us all of the assets in the project
  • 21. I want to code ! Coding in Unity is done via custom BEHAVIORS written in the Mono (like .NET) environment. Unity supports C# and variants of javascript, python. We will use javascript / C# today.
  • 22. I want to code But first : How to navigate in the world in the editor. MOVIE
  • 23. Exercise #1 : Spinning Cube 1. Split into groups of 2 – 4 people 2. Create a new (empty) unity project 3. Create a scene and put a box in it, without physics 4. Create a javascript script in the project, and put the following line in the Update function : transform.RotateAroundLocal(Vector3.up, 1); 5. Attach the script to the cube in the scene 6. Press play and watch the magic happen!
  • 24. Exercise #1 : Post Mortem What happened? 1. The cube has a BEHAVIOR on it 2. UNITY calls its Update() function (why? docs) 3. The cube spins around a bit : transform.RotateAroundLocal(Vector3.up, 1); 4. After spinning a bit for a lot of frames, it spins a lot
  • 25. Exercise #1 : Post Mortem Do we really know what is happening? How fast is the cube spinning?
  • 26. Exercise #2 : In Control In the same group, modify the script so that A: It contains a modifyable rotating speed, called “turns per second”. Do this with this line : public var turnsPerSecond = 1.0f; B: The cube rotates along that speed. Hint : Time.deltaTime, Mathf.PI C: Try changing the parameter at Runtime!
  • 27. Exercise #2 : In Control Solution : transform.RotateAroundLocal(Vector3.up, Time.deltaTime * turnsPerSecond * Mathf.PI * 2); (Not important if you missed the 2)
  • 28. Exercise #2 : In Control We just learned how to configure our entities! - It makes it easy to separate logic (code) from design decisions (parameters for components). - Even <Insert none-coder stereotype here> can control the spinning cube!
  • 29. Exercise #2.1 : In Control-er Its not a game if we don't have any gameplay... OMG LETS CONTROL THE SPINNING SPEED!!! 1. Declare two new parameters : public var turnMoreKey = KeyCode.D; public var turnLessKey = KeyCode.A; 2. Use Input.GetKey(...) to control the spinning speed.
  • 30. Prefabs After a few components your objects could get complicated. You might want to classify a “cube with a transform spinner” A “spinning cube”.
  • 31. Exercise #2.2 : In Control-est 1. Create a prefab by dragging the cube to the project view. 2. Create one instance of the prefab for each team member by dragging it to the scene. Give each instance different control keys. 3. Battle it out for the spinningest cube!
  • 32. Summary Yadda yadda yadda. I'll crowdsource this one.
  • 33. Congratulations ! You now know Unity! You can do anything you want with it! Lets play spinning cube!
  • 34. No, really. You understand how different systems connect to each other (we used the INPUT subsystem to control a TRANSFORM COMPONENT of a specific GAMEOBJECT) Lets try to learn how to learn.
  • 35. Exercise #3 : Gone Fishing We want to know how each player is doing. For each cube, display an on-screen string in the form of : “Dudu's cube : Y rotation is 121.221 degrees” How will we do this? Help → Manual / Reference Manual / Scripting Reference We are looking for a Graphical User Interface (GUI) No cheating (Forums / internet) for this one please!
  • 36. Hierarchies Pretty good video here as well, I'll just play it
  • 37. Exercise #4 : Tabletop 1. Create a simple scene of a table, a tray on the table and some fruits on the tray. 2. Use parenting to create a correct hierarchy. 3. Place transform spinners on many elements in your scene. Check that the scene makes sense when you move them.
  • 38. Summary What have we learned? ● What should a GAME ENGINE give us ● How does UNITY separate itself into different SUBSYSTEMS and COMPONENTS ● How can we extend UNITY and make our code run in it ● How to answer our own questions about UNITY
  • 39. Exercise #5 : Explore! 1. Open the “Angry Bots” sample project. 2. Spend about 5-10 minutes looking around, another three minutes deciding on something to do in it, then take 15-20 minutes to do it (if time permits). 3. GL HF!
  • 40. What now ? You don't know how to make games... YET
  • 41. Be like the squirrel You should (hopefully) be able to take a big problem (“how to create a game?”) and rip it apart to smaller questions and research into them on your own.
  • 42. Give it a whirl 1. Global game jam This weekend! 2. Advanced unity meetings Israeli Unity3D developers UNITE! 3. Facebook groups. Israeli Unity3d developers 4. The only limit is yourself. Welcome to zombo.com