SlideShare a Scribd company logo
1 of 38
Game Project Unity Petri Lankoski aalto.fi
Getting Started Creating a new project Select File -> New Project Write the project name Select (at least) the following Packages to the project Character Controller Scripts Terrain Assets Click Create Project Getting Started with Unity
Anatomy of the Unity Project Getting Started with Unity
Navigating in Unity Getting Started with Unity Move tool (shortcut: W) Play Mode Rotate tool (shortcut: E) Hand tool (shortcut: Q) ,[object Object]
 ALT click-drag to orbit camera around
 CTR click-drag to zoomScale tool (shortcut: R) On scene view: ,[object Object]
 Hold right mouse to enable
 ASWD movement
 Q up, E down,[object Object]
Working with the Scene Add in-build plane Game Objects -> Create Other -> Plane Set Position <0,0,0> Set Scale to <10,10,10> Delete Main Camera Getting Started with Unity
Making Movable Camera Hierarchy: select Main Camera Project: Open Standard Assets / Prefabs Drag First Person Controller to Hierarchy Set Position to <0,2,0> if the First Person Controller drops thought the Plane (Save Scene: File->Save Scene) Getting Started with Unity
Making Movable Camera Getting Started with Unity
Adding Details Finder: Drop PlaneTexture.psd to Assets Folder Adding Details to Plane Hierarchy -> Popup Menu -> Create -> Material Rename it to PlaneMaterial Drop the PlaneTextureto the PlaneMaterial Drop the PlaneMaterialto the Plane Try Transparent/Diffuse shader Texture should have transparency Getting Started with Unity Shader Texture
Adding Details Light: Game Object -> Create Other -> Directional Light Move and rotate the light in Scene view or in Inspector Add cylinder on the plain; add material and texture to the cube Getting Started with Unity Drag with  mouse Rotate Move
Adding Sounds Finder: drop a sound file to Assets folder Add an Game Object to Scene Drag and Drop the sound file to the Game Object Rolloff factor determines how fast sound fades when distance grows Getting Started with Unity
Adding Animated Model Finder: Drop the model (e.g., Abby.fbx) to Assets folder Drag and Drop the model to Scene (or Hierarchy) Set Position <8,1.1,0) Getting Started with Unity
Test the Model Getting Started with Unity
Setting Up Bone Animations The Model Abby has different animations: Idle: 1-200 Idle: 201-390 Idle Action: 391-660 Walk: 819-898 Etc. We need to split animations to use them in Unity Getting Started with Unity
Creating Prefab Create a New Scene File -> New Scene Add Plane and scale it bigger (x & z) Rename “Abby” to “Abby Model” (project view) Create Abby prefab Project Popup -> Create -> Prefab Rename “New Prefab” to “Abby” Drag-and-drop Abby Model to Abby Getting Started with Unity
Creating Prefab Adding control scripts to Abby Drag-and-drop ThirdPersonController to Abby Change values of CharacterController of Abby Height: 1.7 Radius: 0.3 Add animations to the scripts Add SmootFollow to Main Camera Drag-and-drop Abby to Scene view Make her stand on the plain Drag-and-drop Abby to Main Camera/SmoothFollow/Target Getting Started with Unity
xx Getting Started with Unity
xx Getting Started with Unity
Adding New Animation Control Create new C# script AbbyAnim Attach the script to Abby (on Scene view) Add idle action animation clip to the Abby/AbbyAnim Apply changes to prefab Getting Started with Unity More about character animation,  http://unity3d.com/support/documentation/Manual/Character-Animation.html
public class AbbyAnim : MonoBehaviour { private Animation _animation; public AnimationClip action; void Awake() { _animation = GetComponent(typeof(Animation)) as Animation; if (! _animation) { Debug.LogError(“…”); } if (! action) { Debug.LogError(“…”); return;} _animation[action.name].wrapMode = WrapMode.Once; } … Getting Started with Unity
… void Update() { if(Input.GetKey(“z”) { _animation.Play(action.name); } } } Getting Started with Unity
Mono Behavior Can be attached to game objects Unity Calls MonoBehavior Initialization Awake(): called for every MonoBbehavior Start(): called for every MonoBehaviour after all the Awake()s Game Loop calls Update(): called in every frame, most things happens here LateUpdate(): called after every Update()s are exceted. Use for, e.g., follow camera FixedUpdate(): use for physics thing, e.g., RagDoll handling OnGUI(), for GUI drawing, can be called several times in each frame  Other useful things: Invoke(), InvokeRepeating(), StartCouroutine() Getting Started with Unity
User Interface public class ExampleGUI : MonoBehaviour { public GUISkingSkin; public string infoText = "”; private boolshowThingies; void Start() { if(gSkin==null)  { Debug.LogError(“ gSkin is not set”); } showThingies = false; 	} } Getting Started with Unity
User Interface… void OnGUI() { GUI.skin = gSkin; // Seting skin for changins how GUI looks in inspector GUI.matrix = Matrix4x4.TRS(Vector3.zero, Quaternion.identity, new Vector3(Screen.width / 1280.0f, Screen.height / 854.0f, 1)); GUILayout.BeginArea (new Rect (1100, 750, 100, 100)); if(showThingies) { if(GUILayout.Button ("Hide")) { showThingies = !showThingies; } 		} 		else { if(GUILayout.Button ("Show")) { showThingies = !showThingies; } 		} GUILayout.EndArea (); if(showThingies) {  GUI.Label(newRect (600, 400, 200, 200), infoText, "blackBG"); }  Getting Started with Unity
User Interface Create a game object for attaching GUI script Game Object->Create Empty Rename the new object to, e.g., GUI Cube Drag-and-drop ExampleGUI script to GUI Cube Create GUI Skin Project -> popup -> GUI Skin Drag and drop the skin to ExampleGUI : GSkin Getting Started with Unity
User Interface Experiment with GUI Skin settings Play to see how the settings changes GUI Getting Started with Unity
Models and Animations Characters 15-60 bones Hierarchy! Consistent naming (the same names for same type of things) 2500-5000 triangles Textures Optimal size: 2nx2m (1x1, 2x2, …, 128x256, … 256x256, …, 256x1024, …, 1024x1024,) In some cases SoftImage does texture optimizing  Optimal size: small as possible Older cards do not support over 1024x1024 Getting Started with Unity
Material – Shader – Texture Material defines Shader Defines method to render an object, texture properties, etc. Texture(s) Color definitions Other assets E.g., cubemap required for rendering Getting Started with Unity
Models and Animations Object needs to be drawn for every of its texture Object with 4 textures will be draw 4 times Combine textures in SoftImage Use different textures only if you, e.g., need different shaders Unity and SoftImage have different shaders Use simplest possible shader in Unity Opt for shaders without bumbs, transparencies unless you use these Getting Started with Unity
Code Optimizing ,[object Object],Avoid object lookups, e.g., GameObject.Find() calls within these Cache lookup results when possible Use MonoBehaviour.enabled to disable/enable MonoBehavior if you do not want to execute Update(), … MonoBehaviour.Invoke(), MonoBehaviour.InvokeRepeating() and Couroutines are alternative to Update() Functionality is not needed to execute in every frame E.g., use InvokeRepeating() to execute of function for every 0.5s Do not add empty Update(), FixedUpdate(), LateUpdate(), OnGUI()  Call overhead! Getting Started with Unity
Version Control External version control with Pro Needs to be enabled from Edit->Project Settings->Editor Set up the system: http://unity3d.com/support/documentation/Manual/ExternalVersionControlSystemSupport.html CVS, Perforce, Subversion, … Binary files, (textures, models, sounds) do not work work well with these Unity Pro project will be incompatible with Unity DropBox as version control Drop the project folder to a DropBox folder to check in a version and vice versa CVS, Perforce, Subversion for version control for scripts Unity and Unity Pro projects will be compable Unity Pro only features will be automatically disabled in Unity Regular backup (e.g., zip the project folder) Archive backups to have snapshop of the project to rollback Getting Started with Unity
Terrain Editor Terrain->Create Terrain Getting Started with Unity More about Terrain Editor, http://unity3d.com/support/documentation/Manual/Terrains.html
Terrain Editor… Getting Started with Unity
Terrain Editor… Getting Started with Unity

More Related Content

What's hot

게임 인공지능 설계
게임 인공지능 설계게임 인공지능 설계
게임 인공지능 설계ByungChun2
 
게임 프로그래밍 기초 공부법
게임 프로그래밍 기초 공부법게임 프로그래밍 기초 공부법
게임 프로그래밍 기초 공부법Chris Ohk
 
NDC 2010 이은석 - 마비노기 영웅전 포스트모템 1부
NDC 2010 이은석 - 마비노기 영웅전 포스트모템 1부NDC 2010 이은석 - 마비노기 영웅전 포스트모템 1부
NDC 2010 이은석 - 마비노기 영웅전 포스트모템 1부Eunseok Yi
 
Unite2019 HLOD를 활용한 대규모 씬 제작 방법
Unite2019 HLOD를 활용한 대규모 씬 제작 방법Unite2019 HLOD를 활용한 대규모 씬 제작 방법
Unite2019 HLOD를 활용한 대규모 씬 제작 방법장규 서
 
Unreal Engine (For Creating Games) Presentation
Unreal Engine (For Creating Games) PresentationUnreal Engine (For Creating Games) Presentation
Unreal Engine (For Creating Games) PresentationNitin Sharma
 
임태현, 게임 서버 디자인 가이드, NDC2013
임태현, 게임 서버 디자인 가이드, NDC2013임태현, 게임 서버 디자인 가이드, NDC2013
임태현, 게임 서버 디자인 가이드, NDC2013devCAT Studio, NEXON
 
Final Year Game Project Presentation
Final Year Game Project Presentation Final Year Game Project Presentation
Final Year Game Project Presentation Nusrat Jahan Shanta
 
[NDC 2010] 그럴듯한 랜덤 생성 컨텐츠 만들기
[NDC 2010] 그럴듯한 랜덤 생성 컨텐츠 만들기[NDC 2010] 그럴듯한 랜덤 생성 컨텐츠 만들기
[NDC 2010] 그럴듯한 랜덤 생성 컨텐츠 만들기Yongha Kim
 
Unity Introduction
Unity IntroductionUnity Introduction
Unity IntroductionJuwal Bose
 
[IGC 2016] 실전시나리오라이팅 - PD가 원하면 나는 쓴다
[IGC 2016] 실전시나리오라이팅 - PD가 원하면 나는 쓴다[IGC 2016] 실전시나리오라이팅 - PD가 원하면 나는 쓴다
[IGC 2016] 실전시나리오라이팅 - PD가 원하면 나는 쓴다Hwang Sang Hun
 
Unity 3D game engine seminar
Unity 3D game engine  seminarUnity 3D game engine  seminar
Unity 3D game engine seminarNikhilThorat15
 
Unreal Engine 4 Introduction
Unreal Engine 4 IntroductionUnreal Engine 4 Introduction
Unreal Engine 4 IntroductionSperasoft
 
게임 프레임워크의 아키텍쳐와 디자인 패턴
게임 프레임워크의 아키텍쳐와 디자인 패턴게임 프레임워크의 아키텍쳐와 디자인 패턴
게임 프레임워크의 아키텍쳐와 디자인 패턴MinGeun Park
 
[IGC2018] 캡콤 토쿠다 유야 - 몬스터헌터 월드의 게임 컨셉과 레벨 디자인
[IGC2018] 캡콤 토쿠다 유야 - 몬스터헌터 월드의 게임 컨셉과 레벨 디자인[IGC2018] 캡콤 토쿠다 유야 - 몬스터헌터 월드의 게임 컨셉과 레벨 디자인
[IGC2018] 캡콤 토쿠다 유야 - 몬스터헌터 월드의 게임 컨셉과 레벨 디자인강 민우
 
An Introduction To Game development
An Introduction To Game developmentAn Introduction To Game development
An Introduction To Game developmentAhmed
 

What's hot (20)

게임 인공지능 설계
게임 인공지능 설계게임 인공지능 설계
게임 인공지능 설계
 
게임 프로그래밍 기초 공부법
게임 프로그래밍 기초 공부법게임 프로그래밍 기초 공부법
게임 프로그래밍 기초 공부법
 
NDC 2010 이은석 - 마비노기 영웅전 포스트모템 1부
NDC 2010 이은석 - 마비노기 영웅전 포스트모템 1부NDC 2010 이은석 - 마비노기 영웅전 포스트모템 1부
NDC 2010 이은석 - 마비노기 영웅전 포스트모템 1부
 
Unity
UnityUnity
Unity
 
Unite2019 HLOD를 활용한 대규모 씬 제작 방법
Unite2019 HLOD를 활용한 대규모 씬 제작 방법Unite2019 HLOD를 활용한 대규모 씬 제작 방법
Unite2019 HLOD를 활용한 대규모 씬 제작 방법
 
Unreal Engine (For Creating Games) Presentation
Unreal Engine (For Creating Games) PresentationUnreal Engine (For Creating Games) Presentation
Unreal Engine (For Creating Games) Presentation
 
First-person Shooters
First-person ShootersFirst-person Shooters
First-person Shooters
 
임태현, 게임 서버 디자인 가이드, NDC2013
임태현, 게임 서버 디자인 가이드, NDC2013임태현, 게임 서버 디자인 가이드, NDC2013
임태현, 게임 서버 디자인 가이드, NDC2013
 
Final Year Game Project Presentation
Final Year Game Project Presentation Final Year Game Project Presentation
Final Year Game Project Presentation
 
[NDC 2010] 그럴듯한 랜덤 생성 컨텐츠 만들기
[NDC 2010] 그럴듯한 랜덤 생성 컨텐츠 만들기[NDC 2010] 그럴듯한 랜덤 생성 컨텐츠 만들기
[NDC 2010] 그럴듯한 랜덤 생성 컨텐츠 만들기
 
Unity Introduction
Unity IntroductionUnity Introduction
Unity Introduction
 
[IGC 2016] 실전시나리오라이팅 - PD가 원하면 나는 쓴다
[IGC 2016] 실전시나리오라이팅 - PD가 원하면 나는 쓴다[IGC 2016] 실전시나리오라이팅 - PD가 원하면 나는 쓴다
[IGC 2016] 실전시나리오라이팅 - PD가 원하면 나는 쓴다
 
Unity 3D, A game engine
Unity 3D, A game engineUnity 3D, A game engine
Unity 3D, A game engine
 
Unity 3D game engine seminar
Unity 3D game engine  seminarUnity 3D game engine  seminar
Unity 3D game engine seminar
 
Unreal Engine 4 Introduction
Unreal Engine 4 IntroductionUnreal Engine 4 Introduction
Unreal Engine 4 Introduction
 
Unity - Game Engine
Unity - Game EngineUnity - Game Engine
Unity - Game Engine
 
게임 프레임워크의 아키텍쳐와 디자인 패턴
게임 프레임워크의 아키텍쳐와 디자인 패턴게임 프레임워크의 아키텍쳐와 디자인 패턴
게임 프레임워크의 아키텍쳐와 디자인 패턴
 
[IGC2018] 캡콤 토쿠다 유야 - 몬스터헌터 월드의 게임 컨셉과 레벨 디자인
[IGC2018] 캡콤 토쿠다 유야 - 몬스터헌터 월드의 게임 컨셉과 레벨 디자인[IGC2018] 캡콤 토쿠다 유야 - 몬스터헌터 월드의 게임 컨셉과 레벨 디자인
[IGC2018] 캡콤 토쿠다 유야 - 몬스터헌터 월드의 게임 컨셉과 레벨 디자인
 
An Introduction To Game development
An Introduction To Game developmentAn Introduction To Game development
An Introduction To Game development
 
Game development in android
Game development in androidGame development in android
Game development in android
 

Viewers also liked

Luis cataldi unreal engine for educators
Luis cataldi   unreal engine for educatorsLuis cataldi   unreal engine for educators
Luis cataldi unreal engine for educatorsLuis Cataldi
 
Anatomy of a Modern Game design Document - Ralf Adam, Vera Frisch - 4C:Kyiv
Anatomy of a Modern Game design Document - Ralf Adam, Vera Frisch - 4C:KyivAnatomy of a Modern Game design Document - Ralf Adam, Vera Frisch - 4C:Kyiv
Anatomy of a Modern Game design Document - Ralf Adam, Vera Frisch - 4C:KyivRalf C. Adam
 
Graduation Project Documentation.PDF
Graduation Project Documentation.PDFGraduation Project Documentation.PDF
Graduation Project Documentation.PDFMostafa Elhoushi
 
System analysis and design
System analysis and design System analysis and design
System analysis and design Razan Al Ryalat
 
LAFS PREPRO Session 2 - Game Documentation
LAFS PREPRO Session 2 - Game DocumentationLAFS PREPRO Session 2 - Game Documentation
LAFS PREPRO Session 2 - Game DocumentationDavid Mullich
 
System Analysis and Design
System Analysis and DesignSystem Analysis and Design
System Analysis and DesignAamir Abbas
 
6 SWOT Analysis Examples to Help You Write Your Own
6 SWOT Analysis Examples to Help You Write Your Own6 SWOT Analysis Examples to Help You Write Your Own
6 SWOT Analysis Examples to Help You Write Your OwnPalo Alto Software
 

Viewers also liked (8)

Bob the blower
Bob the blowerBob the blower
Bob the blower
 
Luis cataldi unreal engine for educators
Luis cataldi   unreal engine for educatorsLuis cataldi   unreal engine for educators
Luis cataldi unreal engine for educators
 
Anatomy of a Modern Game design Document - Ralf Adam, Vera Frisch - 4C:Kyiv
Anatomy of a Modern Game design Document - Ralf Adam, Vera Frisch - 4C:KyivAnatomy of a Modern Game design Document - Ralf Adam, Vera Frisch - 4C:Kyiv
Anatomy of a Modern Game design Document - Ralf Adam, Vera Frisch - 4C:Kyiv
 
Graduation Project Documentation.PDF
Graduation Project Documentation.PDFGraduation Project Documentation.PDF
Graduation Project Documentation.PDF
 
System analysis and design
System analysis and design System analysis and design
System analysis and design
 
LAFS PREPRO Session 2 - Game Documentation
LAFS PREPRO Session 2 - Game DocumentationLAFS PREPRO Session 2 - Game Documentation
LAFS PREPRO Session 2 - Game Documentation
 
System Analysis and Design
System Analysis and DesignSystem Analysis and Design
System Analysis and Design
 
6 SWOT Analysis Examples to Help You Write Your Own
6 SWOT Analysis Examples to Help You Write Your Own6 SWOT Analysis Examples to Help You Write Your Own
6 SWOT Analysis Examples to Help You Write Your Own
 

Similar to Game Project / Working with Unity

Workingwithunity 110519054824-phpapp01
Workingwithunity 110519054824-phpapp01Workingwithunity 110519054824-phpapp01
Workingwithunity 110519054824-phpapp01Srijib Roy
 
Introduction-to-Unity.ppt
Introduction-to-Unity.pptIntroduction-to-Unity.ppt
Introduction-to-Unity.pptGravityboi
 
Introduction to-unity
Introduction to-unityIntroduction to-unity
Introduction to-unityvafa3
 
Getting Started with Starling and Feathers
Getting Started with Starling and FeathersGetting Started with Starling and Feathers
Getting Started with Starling and FeathersJoseph Labrecque
 
Getting started with Verold and Three.js
Getting started with Verold and Three.jsGetting started with Verold and Three.js
Getting started with Verold and Three.jsVerold
 
Flash auto play image gallery
Flash auto play image galleryFlash auto play image gallery
Flash auto play image galleryBoy Jeorge
 
The java swing_tutorial
The java swing_tutorialThe java swing_tutorial
The java swing_tutorialsumitjoshi01
 
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
 
Om Pawar MP AJP.docx
Om Pawar MP AJP.docxOm Pawar MP AJP.docx
Om Pawar MP AJP.docxOmpawar61
 
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
 

Similar to Game Project / Working with Unity (20)

Workingwithunity 110519054824-phpapp01
Workingwithunity 110519054824-phpapp01Workingwithunity 110519054824-phpapp01
Workingwithunity 110519054824-phpapp01
 
Introduction-to-Unity.ppt
Introduction-to-Unity.pptIntroduction-to-Unity.ppt
Introduction-to-Unity.ppt
 
Introduction to-unity
Introduction to-unityIntroduction to-unity
Introduction to-unity
 
Introduction-to-Unity.ppt
Introduction-to-Unity.pptIntroduction-to-Unity.ppt
Introduction-to-Unity.ppt
 
Getting Started with Starling and Feathers
Getting Started with Starling and FeathersGetting Started with Starling and Feathers
Getting Started with Starling and Feathers
 
Getting started with Verold and Three.js
Getting started with Verold and Three.jsGetting started with Verold and Three.js
Getting started with Verold and Three.js
 
Flash auto play image gallery
Flash auto play image galleryFlash auto play image gallery
Flash auto play image gallery
 
Unity3D Programming
Unity3D ProgrammingUnity3D Programming
Unity3D Programming
 
Awt and swing in java
Awt and swing in javaAwt and swing in java
Awt and swing in java
 
28 awt
28 awt28 awt
28 awt
 
The java swing_tutorial
The java swing_tutorialThe java swing_tutorial
The java swing_tutorial
 
The java rogramming swing _tutorial for beinners(java programming language)
The java rogramming swing _tutorial for beinners(java programming language)The java rogramming swing _tutorial for beinners(java programming language)
The java rogramming swing _tutorial for beinners(java programming language)
 
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
 
Synfig
SynfigSynfig
Synfig
 
Om Pawar MP AJP.docx
Om Pawar MP AJP.docxOm Pawar MP AJP.docx
Om Pawar MP AJP.docx
 
swings.pptx
swings.pptxswings.pptx
swings.pptx
 
08graphics
08graphics08graphics
08graphics
 
Unity 3d scripting tutorial
Unity 3d scripting tutorialUnity 3d scripting tutorial
Unity 3d scripting tutorial
 
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
 

More from Petri Lankoski

A brief introduction to quantitative analysis
A brief introduction to quantitative analysisA brief introduction to quantitative analysis
A brief introduction to quantitative analysisPetri Lankoski
 
Game Analysis at HEVGA PhD Summer School
Game Analysis at HEVGA PhD Summer SchoolGame Analysis at HEVGA PhD Summer School
Game Analysis at HEVGA PhD Summer SchoolPetri Lankoski
 
Constructive Alignment in Teaching Game Research in Game Development Bachelor...
Constructive Alignment in Teaching Game Research in Game Development Bachelor...Constructive Alignment in Teaching Game Research in Game Development Bachelor...
Constructive Alignment in Teaching Game Research in Game Development Bachelor...Petri Lankoski
 
Level Design Course Intro and Assingnts
Level Design Course Intro and AssingntsLevel Design Course Intro and Assingnts
Level Design Course Intro and AssingntsPetri Lankoski
 
Quantitative analysis: A brief introduction
Quantitative analysis: A brief introductionQuantitative analysis: A brief introduction
Quantitative analysis: A brief introductionPetri Lankoski
 
Embodiment, Game Characters and Game Design
Embodiment, Game Characters and Game DesignEmbodiment, Game Characters and Game Design
Embodiment, Game Characters and Game DesignPetri Lankoski
 
Game research methods book introduction
Game research methods book introductionGame research methods book introduction
Game research methods book introductionPetri Lankoski
 
Escape: Level Design Exercise in Unity
Escape: Level Design Exercise in UnityEscape: Level Design Exercise in Unity
Escape: Level Design Exercise in UnityPetri Lankoski
 
Formal analysis of gameplay
Formal analysis of gameplayFormal analysis of gameplay
Formal analysis of gameplayPetri Lankoski
 
Simulations: Evaluating game system behavior
Simulations: Evaluating game system behavior Simulations: Evaluating game system behavior
Simulations: Evaluating game system behavior Petri Lankoski
 
Designprocesser lecture1
Designprocesser lecture1Designprocesser lecture1
Designprocesser lecture1Petri Lankoski
 
Gameplay Design Workshop 1/2 (2011)
Gameplay Design Workshop 1/2 (2011)Gameplay Design Workshop 1/2 (2011)
Gameplay Design Workshop 1/2 (2011)Petri Lankoski
 
Gameplay Design Workshop 2/2 (2011)
Gameplay Design Workshop 2/2 (2011)Gameplay Design Workshop 2/2 (2011)
Gameplay Design Workshop 2/2 (2011)Petri Lankoski
 
How can game studies support game design practice?
How can game studies support game design practice?How can game studies support game design practice?
How can game studies support game design practice?Petri Lankoski
 

More from Petri Lankoski (20)

A brief introduction to quantitative analysis
A brief introduction to quantitative analysisA brief introduction to quantitative analysis
A brief introduction to quantitative analysis
 
Game Analysis at HEVGA PhD Summer School
Game Analysis at HEVGA PhD Summer SchoolGame Analysis at HEVGA PhD Summer School
Game Analysis at HEVGA PhD Summer School
 
Constructive Alignment in Teaching Game Research in Game Development Bachelor...
Constructive Alignment in Teaching Game Research in Game Development Bachelor...Constructive Alignment in Teaching Game Research in Game Development Bachelor...
Constructive Alignment in Teaching Game Research in Game Development Bachelor...
 
Perforce
PerforcePerforce
Perforce
 
Level Design Course Intro and Assingnts
Level Design Course Intro and AssingntsLevel Design Course Intro and Assingnts
Level Design Course Intro and Assingnts
 
Quantitative analysis: A brief introduction
Quantitative analysis: A brief introductionQuantitative analysis: A brief introduction
Quantitative analysis: A brief introduction
 
Embodiment, Game Characters and Game Design
Embodiment, Game Characters and Game DesignEmbodiment, Game Characters and Game Design
Embodiment, Game Characters and Game Design
 
Game research methods book introduction
Game research methods book introductionGame research methods book introduction
Game research methods book introduction
 
Escape: Level Design Exercise in Unity
Escape: Level Design Exercise in UnityEscape: Level Design Exercise in Unity
Escape: Level Design Exercise in Unity
 
Formal analysis of gameplay
Formal analysis of gameplayFormal analysis of gameplay
Formal analysis of gameplay
 
Level Design
Level Design Level Design
Level Design
 
Game system design
Game system designGame system design
Game system design
 
Simulations: Evaluating game system behavior
Simulations: Evaluating game system behavior Simulations: Evaluating game system behavior
Simulations: Evaluating game system behavior
 
Models for story
Models for storyModels for story
Models for story
 
Designprocesser lecture1
Designprocesser lecture1Designprocesser lecture1
Designprocesser lecture1
 
Unity programming 1
Unity programming 1Unity programming 1
Unity programming 1
 
Gameplay Design Workshop 1/2 (2011)
Gameplay Design Workshop 1/2 (2011)Gameplay Design Workshop 1/2 (2011)
Gameplay Design Workshop 1/2 (2011)
 
Gameplay Design Workshop 2/2 (2011)
Gameplay Design Workshop 2/2 (2011)Gameplay Design Workshop 2/2 (2011)
Gameplay Design Workshop 2/2 (2011)
 
How can game studies support game design practice?
How can game studies support game design practice?How can game studies support game design practice?
How can game studies support game design practice?
 
Game Project / Focus
Game Project / FocusGame Project / Focus
Game Project / Focus
 

Recently uploaded

Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxPooja Bhuva
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfDr Vijay Vishwakarma
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxCeline George
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jisc
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxPooja Bhuva
 

Recently uploaded (20)

Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 

Game Project / Working with Unity

  • 1. Game Project Unity Petri Lankoski aalto.fi
  • 2. Getting Started Creating a new project Select File -> New Project Write the project name Select (at least) the following Packages to the project Character Controller Scripts Terrain Assets Click Create Project Getting Started with Unity
  • 3. Anatomy of the Unity Project Getting Started with Unity
  • 4.
  • 5. ALT click-drag to orbit camera around
  • 6.
  • 7. Hold right mouse to enable
  • 9.
  • 10. Working with the Scene Add in-build plane Game Objects -> Create Other -> Plane Set Position <0,0,0> Set Scale to <10,10,10> Delete Main Camera Getting Started with Unity
  • 11. Making Movable Camera Hierarchy: select Main Camera Project: Open Standard Assets / Prefabs Drag First Person Controller to Hierarchy Set Position to <0,2,0> if the First Person Controller drops thought the Plane (Save Scene: File->Save Scene) Getting Started with Unity
  • 12. Making Movable Camera Getting Started with Unity
  • 13. Adding Details Finder: Drop PlaneTexture.psd to Assets Folder Adding Details to Plane Hierarchy -> Popup Menu -> Create -> Material Rename it to PlaneMaterial Drop the PlaneTextureto the PlaneMaterial Drop the PlaneMaterialto the Plane Try Transparent/Diffuse shader Texture should have transparency Getting Started with Unity Shader Texture
  • 14. Adding Details Light: Game Object -> Create Other -> Directional Light Move and rotate the light in Scene view or in Inspector Add cylinder on the plain; add material and texture to the cube Getting Started with Unity Drag with mouse Rotate Move
  • 15. Adding Sounds Finder: drop a sound file to Assets folder Add an Game Object to Scene Drag and Drop the sound file to the Game Object Rolloff factor determines how fast sound fades when distance grows Getting Started with Unity
  • 16. Adding Animated Model Finder: Drop the model (e.g., Abby.fbx) to Assets folder Drag and Drop the model to Scene (or Hierarchy) Set Position <8,1.1,0) Getting Started with Unity
  • 17. Test the Model Getting Started with Unity
  • 18. Setting Up Bone Animations The Model Abby has different animations: Idle: 1-200 Idle: 201-390 Idle Action: 391-660 Walk: 819-898 Etc. We need to split animations to use them in Unity Getting Started with Unity
  • 19. Creating Prefab Create a New Scene File -> New Scene Add Plane and scale it bigger (x & z) Rename “Abby” to “Abby Model” (project view) Create Abby prefab Project Popup -> Create -> Prefab Rename “New Prefab” to “Abby” Drag-and-drop Abby Model to Abby Getting Started with Unity
  • 20. Creating Prefab Adding control scripts to Abby Drag-and-drop ThirdPersonController to Abby Change values of CharacterController of Abby Height: 1.7 Radius: 0.3 Add animations to the scripts Add SmootFollow to Main Camera Drag-and-drop Abby to Scene view Make her stand on the plain Drag-and-drop Abby to Main Camera/SmoothFollow/Target Getting Started with Unity
  • 21. xx Getting Started with Unity
  • 22. xx Getting Started with Unity
  • 23. Adding New Animation Control Create new C# script AbbyAnim Attach the script to Abby (on Scene view) Add idle action animation clip to the Abby/AbbyAnim Apply changes to prefab Getting Started with Unity More about character animation, http://unity3d.com/support/documentation/Manual/Character-Animation.html
  • 24. public class AbbyAnim : MonoBehaviour { private Animation _animation; public AnimationClip action; void Awake() { _animation = GetComponent(typeof(Animation)) as Animation; if (! _animation) { Debug.LogError(“…”); } if (! action) { Debug.LogError(“…”); return;} _animation[action.name].wrapMode = WrapMode.Once; } … Getting Started with Unity
  • 25. … void Update() { if(Input.GetKey(“z”) { _animation.Play(action.name); } } } Getting Started with Unity
  • 26. Mono Behavior Can be attached to game objects Unity Calls MonoBehavior Initialization Awake(): called for every MonoBbehavior Start(): called for every MonoBehaviour after all the Awake()s Game Loop calls Update(): called in every frame, most things happens here LateUpdate(): called after every Update()s are exceted. Use for, e.g., follow camera FixedUpdate(): use for physics thing, e.g., RagDoll handling OnGUI(), for GUI drawing, can be called several times in each frame Other useful things: Invoke(), InvokeRepeating(), StartCouroutine() Getting Started with Unity
  • 27. User Interface public class ExampleGUI : MonoBehaviour { public GUISkingSkin; public string infoText = "”; private boolshowThingies; void Start() { if(gSkin==null) { Debug.LogError(“ gSkin is not set”); } showThingies = false; } } Getting Started with Unity
  • 28. User Interface… void OnGUI() { GUI.skin = gSkin; // Seting skin for changins how GUI looks in inspector GUI.matrix = Matrix4x4.TRS(Vector3.zero, Quaternion.identity, new Vector3(Screen.width / 1280.0f, Screen.height / 854.0f, 1)); GUILayout.BeginArea (new Rect (1100, 750, 100, 100)); if(showThingies) { if(GUILayout.Button ("Hide")) { showThingies = !showThingies; } } else { if(GUILayout.Button ("Show")) { showThingies = !showThingies; } } GUILayout.EndArea (); if(showThingies) { GUI.Label(newRect (600, 400, 200, 200), infoText, "blackBG"); } Getting Started with Unity
  • 29. User Interface Create a game object for attaching GUI script Game Object->Create Empty Rename the new object to, e.g., GUI Cube Drag-and-drop ExampleGUI script to GUI Cube Create GUI Skin Project -> popup -> GUI Skin Drag and drop the skin to ExampleGUI : GSkin Getting Started with Unity
  • 30. User Interface Experiment with GUI Skin settings Play to see how the settings changes GUI Getting Started with Unity
  • 31. Models and Animations Characters 15-60 bones Hierarchy! Consistent naming (the same names for same type of things) 2500-5000 triangles Textures Optimal size: 2nx2m (1x1, 2x2, …, 128x256, … 256x256, …, 256x1024, …, 1024x1024,) In some cases SoftImage does texture optimizing Optimal size: small as possible Older cards do not support over 1024x1024 Getting Started with Unity
  • 32. Material – Shader – Texture Material defines Shader Defines method to render an object, texture properties, etc. Texture(s) Color definitions Other assets E.g., cubemap required for rendering Getting Started with Unity
  • 33. Models and Animations Object needs to be drawn for every of its texture Object with 4 textures will be draw 4 times Combine textures in SoftImage Use different textures only if you, e.g., need different shaders Unity and SoftImage have different shaders Use simplest possible shader in Unity Opt for shaders without bumbs, transparencies unless you use these Getting Started with Unity
  • 34.
  • 35. Version Control External version control with Pro Needs to be enabled from Edit->Project Settings->Editor Set up the system: http://unity3d.com/support/documentation/Manual/ExternalVersionControlSystemSupport.html CVS, Perforce, Subversion, … Binary files, (textures, models, sounds) do not work work well with these Unity Pro project will be incompatible with Unity DropBox as version control Drop the project folder to a DropBox folder to check in a version and vice versa CVS, Perforce, Subversion for version control for scripts Unity and Unity Pro projects will be compable Unity Pro only features will be automatically disabled in Unity Regular backup (e.g., zip the project folder) Archive backups to have snapshop of the project to rollback Getting Started with Unity
  • 36. Terrain Editor Terrain->Create Terrain Getting Started with Unity More about Terrain Editor, http://unity3d.com/support/documentation/Manual/Terrains.html
  • 37. Terrain Editor… Getting Started with Unity
  • 38. Terrain Editor… Getting Started with Unity
  • 39. Terrain Editor… Getting Started with Unity
  • 40. Terrain Editor… Getting Started with Unity
  • 41. Terrain Editor… Getting Started with Unity
  • 42. More Information Unity manual http://unity3d.com/support/documentation/Manual/ Unity scripting reference http://unity3d.com/support/documentation/ScriptReference/ Unity Scripts and Tips Wiki http://www.unifycommunity.com/wiki/ Unity Tutorials http://unity3d.com/support/resources/tutorials/ Lies and Seductions source code http://mlab.taik.fi/~plankosk/blog/?p=308 Getting Started with Unity

Editor's Notes

  1. Unity Project in the filesystem is a folder that contains folders Assets, Library, and Temp. Models, textures, scripts etc. goes to Assets folder. Assets folder can contain subfolders. Just drag and drop in Finder assets were you want to put them.BUT, rename things in Unity, NOT in Finder, because renaming in Finder will break dependencies in Unity.
  2. Test by hitting PLAY. You can test and see your game in Game window . Controls: ASDW or cursor keys + mouse
  3. By default, as Play Automatically is selected, the animations of the model are played, but we do now we do not have any control over them