SlideShare una empresa de Scribd logo
1 de 64
Descargar para leer sin conexión
Alexandria University
Faculty of Engineering
Computer & Systems Engineering Dep.
 Game Development
 Unity Interface
 Basic Components
 Control The Main Character
 Game Design
 Gameplay
 Basic component
 Enemy AI
 Memory management
 optimization
 Game Development
 Unity Interface
 Basic Components
 Control The Main Character
 Game Design
 Gameplay
 Basic component
 Enemy AI
 Memory management
 optimization
 The anatomy of a video game
 game development process
 Game Concepts and Game Play Instruction
A game usually simulates situations where
players are supposed to overcome challenges
and achieve the goals of the game. The user
interacts with the game while playing it and
follows the rules of the game.
A game usually consists of:
 The Rules
 The Goals
 The Challenges
A game usually simulates situations where
players are supposed to overcome challenges
and achieve the goals of the game. The user
interacts with the game while playing it and
follows the rules of the game.
A game usually consists of:
 The Rules
 The Goals
 The Challenges
2D Art :
 Concept Art
 Sprites
 Texture Art
 UI Artist
3D Art :
 Modeling Concept Art
 Wrapping & Texturing
 Animation
2D Art :
 Concept Art
 Sprites
 Texture Art
 UI Artist
3D Art :
 Modeling Concept Art
 Wrapping & Texturing
 Animation
 What is Unity ?
 Why Unity
 The interface
 Execution Order of Event Functions
 A game engine is a software designed to help developing
games. The tool incorporates most of the components
required in a game such as rendering, scripting, audio,
physics, networking and so on.
 Companies often go on developing their own engine for their
own games.
 Unity is a powerful 3d game engine that will allow you to
create professional games.
 Unity is written in C and C++ but developing a game will be
done using C# , java script and Boo.
 Unity uses the professional Nvidia PhysX engine to reproduce
all in-game physics.
 A game engine is a software designed to help developing
games. The tool incorporates most of the components
required in a game such as rendering, scripting, audio,
physics, networking and so on.
 Companies often go on developing their own engine for their
own games.
 Unity is a powerful 3d game engine that will allow you to
create professional games.
 Unity is written in C and C++ but developing a game will be
done using C# , java script and Boo.
 Unity uses the professional Nvidia PhysX engine to reproduce
all in-game physics.
 Unity plays equally brilliant on 10 global platforms:
modern browsers, Android, iOS, Wii, Playstation 3, Xbox 360,
Windows, Linux, Flash, and MacOs
 Instead of spending your time and budget on independent
development for each platform, Unity allows us to actually
focus on making games.
 Unity allows you to amaze gamers with brilliant full-HD
quality and visual effects.
 thousands of games powered by Unity
 Unity plays equally brilliant on 10 global platforms:
modern browsers, Android, iOS, Wii, Playstation 3, Xbox 360,
Windows, Linux, Flash, and MacOs
 Instead of spending your time and budget on independent
development for each platform, Unity allows us to actually
focus on making games.
 Unity allows you to amaze gamers with brilliant full-HD
quality and visual effects.
 thousands of games powered by Unity
int main() {
Initialize();
while (isRunning)
{
Process();
Update();
Render();
}
ShutDown();
}
int main() {
Initialize();
while (isRunning)
{
Process();
Update();
Render();
}
ShutDown();
}
There are a number of event functions that get executed in a
predetermined order as a script executes.
First Scene Load
Awake()
Before the first frame update
Start()
Update Order
Update()
LateUpdate()
FixedUpdate()
Rendering
Culling
There are a number of event functions that get executed in a
predetermined order as a script executes.
First Scene Load
Awake()
Before the first frame update
Start()
Update Order
Update()
LateUpdate()
FixedUpdate()
Rendering
Culling
 Mecanim workflow
 Asset preparation and
import.
 Humanoid character setup.
 Bringing characters to life.
 Mecanim workflow
 Asset preparation and
import.
 Humanoid character setup.
 Bringing characters to life.
 Asset Preparation
 triangulated mesh.
 Rigging
 Skinning
 Humanoid character setup
 Export & Verify
 Asset Preparation
 triangulated mesh.
 Rigging
 Skinning
 Humanoid character setup
 Export & Verify
 Bringing characters to life:
 Mecanim State Machines
 Animation States
 Animation Transitions
 Animation Parameters
 Bringing characters to life:
 Mecanim State Machines
 Animation States
 Animation Transitions
 Animation Parameters
 Design the game
 Terrain edition
 Adding Water and Skybox
 Import Assets
 Lightmapping and Fog
 Design the game
 Terrain edition
 Adding Water and Skybox
 Import Assets
 Lightmapping and Fog
 Isolated islands
 The design of The Island.
 The blocks between two islands
 Sketching
The Static Environment The dynamic
Environment
 Sketching
The Static Environment The dynamic
Environment
 Terrain edition Terrain edition
A skybox is a cubemap—a series of six textures placed inside a
cube and rendered seamlessly to appear as a surrounding sky
and horizon. This cubemap sits around the 3D world at all times,
and much like the actual horizon, it is not an object the player
can ever get to. The skybox is simply a cube wrapping the whole
scene in.
 placing the game Elements or Models ( props ,Tress, Bridges ,
Rocks , Houses , static props , particles, Fences ) And
Invisible Borders(Colliders ).
 Each Element Consist Of : Meshes ,Textures and Materials.
Use a Single Skinned Mesh Renderer
Use as Few Materials as Possible
Use a small size Of textures
 Lightmapping is the method of
baking, rendering to a texture file—
the lighting that happens to be
affecting a rendered 3D object. This
can be done in modeling
applications, but Unity also allows
you to lightmap all of your lights and
environment elements in one.
• The horizon line might look a little
sharp, we could extend the water
to a point that it is far enough or
we can blur the vision a little. For
this purpose, we use the Fog.
 Lightmapping is the method of
baking, rendering to a texture file—
the lighting that happens to be
affecting a rendered 3D object. This
can be done in modeling
applications, but Unity also allows
you to lightmap all of your lights and
environment elements in one.
• The horizon line might look a little
sharp, we could extend the water
to a point that it is far enough or
we can blur the vision a little. For
this purpose, we use the Fog.
The dynamic world don’t have an end The environment is formed by
premade blocks that follow one another randomly until The main character
reach to the required distance. These blocks are classified in different
difficulties, and an algorithm decides the order of the blocks according to
the difficulty.
 Each block consists of
End point:
This point is found at the end of each block to
know in which position The Next block will be
placed in The game world
Collider at the Start:
This invisible wall is placed at The start of each
block and is triggered to call The function That will
generate the next block to be placed as The next
block when The main character collides with.
Create The sprite image Attached to a txt file to show for each
component in the sprite image its position ( x,y ),width and
height.
Attach this image to a material
During Random Blocks
 Player run as default
 Avoid obstacles.
 Challenge
 Avoid falling in the
sea
During Random Blocks
 Player run as default
 Avoid obstacles.
 Challenge
 Avoid falling in the
sea
 Block components:
 Waypoints
 Static obstacle
 Movable obstacle
 Collider at the start
 End point
 Block components:
 Waypoints
 Static obstacle
 Movable obstacle
 Collider at the start
 End point
 Way Point:
 Every way point has left &
right way points and can
set these way point = null
if the way point not has the
right or left way point .
 Every way point has more
than next way points.
 Way Point:
 Every way point has left &
right way points and can
set these way point = null
if the way point not has the
right or left way point .
 Every way point has more
than next way points.
 During the Island
 Player movement
 Friends’ role
 Enemies’ role
 Challenge
 Escape from enemies
 Time
Hardness :
Number of enemies and friends increase.
 During the Island
 Player movement
 Friends’ role
 Enemies’ role
 Challenge
 Escape from enemies
 Time
Hardness :
Number of enemies and friends increase.
 During loading
 Check the target textures.
 Active the target objects
 During loading
 Check the target textures.
 Active the target objects
 Save his friends
 Hit the crate
 Destroy the crate
 Particles
 Save his friends
 Hit the crate
 Destroy the crate
 Particles
 Power ups
 Increase the power of the
player
 Arrow
 Active the arrow above the
player
 Power ups
 Increase the power of the
player
 Arrow
 Active the arrow above the
player
 Player and Enemy
 The player hit the enemy
 The enemy hit the player
 Player and Enemy
 The player hit the enemy
 The enemy hit the player
 Check The end of the level
 Make collision with the end
 All friends are free.
 Check The end of the level
 Make collision with the end
 All friends are free.
 The Friends :
 After the player free the
friend ,The friend follows the
player.
 Look at the player.
 The Friends :
 After the player free the
friend ,The friend follows the
player.
 Look at the player.
 The Enemy:
 Find path implementation:
 With navmesh
 With waypoint
 The Enemy:
 Find path implementation:
 With navmesh
 With waypoint
 Find Path Implementation:
 navmesh:
 Apply navigation
 way point :
 How Enemy attacks the
player
 Find Path Implementation:
 navmesh:
 Apply navigation
 way point :
 How Enemy attacks the
player
 Camera
 Lighting
 Meshes
 Skybox
 Colliders
 Prefabs
 Audio
 Camera
 Lighting
 Meshes
 Skybox
 Colliders
 Prefabs
 Audio
 Cameras are the devices
that capture and display the
world to the player.
 Layers and Culling mask.
 Cameras are the devices
that capture and display the
world to the player.
 Layers and Culling mask.
 Why we used lighting.
 Directional lights
◦ Directional lights are used mainly in open places
scenes for sun and moonlight.
 Point lights
◦ The most common lights in computer games.
◦ Example :Light bulbs.
 Spot lights
◦ Spot lights only shine in one
direction, in a cone.
◦ perfect for flashlights.
 Why we used lighting.
 Directional lights
◦ Directional lights are used mainly in open places
scenes for sun and moonlight.
 Point lights
◦ The most common lights in computer games.
◦ Example :Light bulbs.
 Spot lights
◦ Spot lights only shine in one
direction, in a cone.
◦ perfect for flashlights.
 Meshes make up a
large part of your 3D
worlds.
 Unity supports
triangular or
Quadrangle polygon
meshes.
 Vertices and Edges.
 Types of meshes
◦ Mesh Filter
◦ Text Mesh
 Mesh Renderer
 Meshes make up a
large part of your 3D
worlds.
 Unity supports
triangular or
Quadrangle polygon
meshes.
 Vertices and Edges.
 Types of meshes
◦ Mesh Filter
◦ Text Mesh
 Mesh Renderer
 Material.
 Texture.
 A Skybox is a 6-sided
cube.
 Blend.
 Material.
 Texture.
 A Skybox is a 6-sided
cube.
 Blend.
 Collision and Rigidbody
 Basic colliders
◦ Sphere Collider
 ping pong balls and rockets
◦ Box Collider
 for doors, walls, platforms, boxes
◦ Capsule Collider
 Character Controller and unusual shapes.
 Collision and Rigidbody
 Basic colliders
◦ Sphere Collider
 ping pong balls and rockets
◦ Box Collider
 for doors, walls, platforms, boxes
◦ Capsule Collider
 Character Controller and unusual shapes.
 A Prefab is a type of asset
used for clone GameObject.
 All Prefab instances are
linked to the original
Prefab.
 Make any changes to the
Prefab you will see the
change applied to all
instances.
 A Prefab is a type of asset
used for clone GameObject.
 All Prefab instances are
linked to the original
Prefab.
 Make any changes to the
Prefab you will see the
change applied to all
instances.
 Audio Listener
◦ acts as a microphone-like
device.
◦ Main Camera
 Audio source
◦ Audio Clip
 contain the audio data
used by Audio Sources
 Properties
 3D Sound
 Decompress on load
 Compressed in memory
◦ Properties
 Play On Awake
 Loop
 Priority
 Audio Listener
◦ acts as a microphone-like
device.
◦ Main Camera
 Audio source
◦ Audio Clip
 contain the audio data
used by Audio Sources
 Properties
 3D Sound
 Decompress on load
 Compressed in memory
◦ Properties
 Play On Awake
 Loop
 Priority
 Creating waypoints
• AI Controller
 Visualization
• Movement
― Ordered
― Random
 Visualization
• Movement
― Ordered
― Random
 Linear-Congruential
Generators (LCG)
Xn = (a * Xn-1) mod m
where
m is prime number
a is constant number
Xn-1 the random
number of last
iteration
 Linear-Congruential
Generators (LCG)
Xn = (a * Xn-1) mod m
where
m is prime number
a is constant number
Xn-1 the random
number of last
iteration
 Away From Waypoint
 How Get Direction
 How Get Direction To Player
 Properties of enemy
◦ Run
◦ Fire
◦ Walk
◦ Jump
◦ Think
 Away From Waypoint
 How Get Direction
 How Get Direction To Player
 Properties of enemy
◦ Run
◦ Fire
◦ Walk
◦ Jump
◦ Think
 Object Stored in Heap.
◦ Allocate and release automatically
 Value and Reference Types
◦ Function call and data types.
 Allocation and Garbage Collection
◦ Areas in heap.
◦ Block requesting
◦ Small heap with fast and frequent garbage collection
◦ Large heap with slow but infrequent garbage collection
 Object Stored in Heap.
◦ Allocate and release automatically
 Value and Reference Types
◦ Function call and data types.
 Allocation and Garbage Collection
◦ Areas in heap.
◦ Block requesting
◦ Small heap with fast and frequent garbage collection
◦ Large heap with slow but infrequent garbage collection
 Avoid in coding
 Lookups
 Object pooling and Animations
 Textures and optimized 3D models
 Profiler
 Avoid in coding
 Lookups
 Object pooling and Animations
 Textures and optimized 3D models
 Profiler
• Check condition
• Triggers
• Check condition
• Triggers
 Example: Script AI
◦ Sleeping
◦ Limit the amount of call
 Example: Script AI
◦ Sleeping
◦ Limit the amount of call
• Functions that give you access to other script or other object
i.e Find method.
• Time cost
• Functions that give you access to other script or other object
i.e Find method.
• Time cost
 Object pooling
◦ Problem of destroy object
◦ Cost time
◦ Advantage
 Animation
◦ Culling Mode to Based on Renderers
 Object pooling
◦ Problem of destroy object
◦ Cost time
◦ Advantage
 Animation
◦ Culling Mode to Based on Renderers
 Avoid large size
 Time of render
 Combine together objects that share same
materials.
 Avoid large size
 Time of render
 Combine together objects that share same
materials.
 What is the profiler.
 Process and time
 Improve performance of code
 Example: Functions and scripts
 Example: Comparison

Más contenido relacionado

La actualidad más candente

Game Project / Working with Unity
Game Project / Working with UnityGame Project / Working with Unity
Game Project / Working with Unity
Petri Lankoski
 
PRESENTATION ON Game Engine
PRESENTATION ON Game EnginePRESENTATION ON Game Engine
PRESENTATION ON Game Engine
Diksha Bhargava
 
Game Engine Overview
Game Engine OverviewGame Engine Overview
Game Engine Overview
Sharad Mitra
 
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
Prashant Warrier
 

La actualidad más candente (20)

Game Development with Unity
Game Development with UnityGame Development with Unity
Game Development with Unity
 
Unity 3D, A game engine
Unity 3D, A game engineUnity 3D, A game engine
Unity 3D, A game engine
 
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 Game Engine - Basics
Unity Game Engine - BasicsUnity Game Engine - Basics
Unity Game Engine - Basics
 
Unity 2D game development
Unity 2D game developmentUnity 2D game development
Unity 2D game development
 
Game Project / Working with Unity
Game Project / Working with UnityGame Project / Working with Unity
Game Project / Working with Unity
 
Mobile Game Development in Unity
Mobile Game Development in UnityMobile Game Development in Unity
Mobile Game Development in Unity
 
Blender Basics
Blender BasicsBlender Basics
Blender Basics
 
Unity Introduction
Unity IntroductionUnity Introduction
Unity Introduction
 
Introduction to Unity
Introduction to UnityIntroduction to Unity
Introduction to Unity
 
PRESENTATION ON Game Engine
PRESENTATION ON Game EnginePRESENTATION ON Game Engine
PRESENTATION ON Game Engine
 
Game Engine Overview
Game Engine OverviewGame Engine Overview
Game Engine Overview
 
Unity3D Programming
Unity3D ProgrammingUnity3D Programming
Unity3D Programming
 
Introduction-to-Unity.ppt
Introduction-to-Unity.pptIntroduction-to-Unity.ppt
Introduction-to-Unity.ppt
 
Unreal Engine.pptx
Unreal Engine.pptxUnreal Engine.pptx
Unreal Engine.pptx
 
Unity introduction for programmers
Unity introduction for programmersUnity introduction for programmers
Unity introduction for programmers
 
Intro to unreal with framework and vr
Intro to unreal with framework and vrIntro to unreal with framework and vr
Intro to unreal with framework and vr
 
Android Application And Unity3D Game Documentation
Android Application And Unity3D Game DocumentationAndroid Application And Unity3D Game Documentation
Android Application And Unity3D Game Documentation
 
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
 
Unreal Engine 4 Introduction
Unreal Engine 4 IntroductionUnreal Engine 4 Introduction
Unreal Engine 4 Introduction
 

Destacado

Moving Frostbite to Physically Based Rendering
Moving Frostbite to Physically Based RenderingMoving Frostbite to Physically Based Rendering
Moving Frostbite to Physically Based Rendering
Electronic Arts / DICE
 

Destacado (8)

Game Art
Game ArtGame Art
Game Art
 
ECGC 2015 - Is Game Art Art?
ECGC 2015 - Is Game Art Art? ECGC 2015 - Is Game Art Art?
ECGC 2015 - Is Game Art Art?
 
Game Aesthetics & Branding by James Pearmain (Jimp)
Game Aesthetics & Branding by James Pearmain (Jimp)Game Aesthetics & Branding by James Pearmain (Jimp)
Game Aesthetics & Branding by James Pearmain (Jimp)
 
Game Engine for Serious Games
Game Engine for Serious GamesGame Engine for Serious Games
Game Engine for Serious Games
 
Concepting
ConceptingConcepting
Concepting
 
Game Art Bible - Secret Sauce to Making Great Game Art
Game Art Bible - Secret Sauce to Making Great Game ArtGame Art Bible - Secret Sauce to Making Great Game Art
Game Art Bible - Secret Sauce to Making Great Game Art
 
Physically Based and Unified Volumetric Rendering in Frostbite
Physically Based and Unified Volumetric Rendering in FrostbitePhysically Based and Unified Volumetric Rendering in Frostbite
Physically Based and Unified Volumetric Rendering in Frostbite
 
Moving Frostbite to Physically Based Rendering
Moving Frostbite to Physically Based RenderingMoving Frostbite to Physically Based Rendering
Moving Frostbite to Physically Based Rendering
 

Similar a Unity

Galactic Wars XNA Game
Galactic Wars XNA GameGalactic Wars XNA Game
Galactic Wars XNA Game
Sohil Gupta
 
2d games design
2d games design 2d games design
2d games design
rafiqfps
 
Android Game Minisyonize
Android Game MinisyonizeAndroid Game Minisyonize
Android Game Minisyonize
savvy
 
ontents · Introduction· Objectives·.docx
ontents  ·      Introduction·      Objectives·.docxontents  ·      Introduction·      Objectives·.docx
ontents · Introduction· Objectives·.docx
cherishwinsland
 

Similar a Unity (20)

Galactic Wars XNA Game
Galactic Wars XNA GameGalactic Wars XNA Game
Galactic Wars XNA Game
 
Md2010 jl-wp7-sl-game-dev
Md2010 jl-wp7-sl-game-devMd2010 jl-wp7-sl-game-dev
Md2010 jl-wp7-sl-game-dev
 
unity gaming programing basics for students ppt
unity gaming programing basics for students pptunity gaming programing basics for students ppt
unity gaming programing basics for students ppt
 
Lecture 1 Introduction to VR Programming
Lecture 1 Introduction to VR ProgrammingLecture 1 Introduction to VR Programming
Lecture 1 Introduction to VR Programming
 
intern.pdf
intern.pdfintern.pdf
intern.pdf
 
Production RPG Maker.
Production RPG Maker. Production RPG Maker.
Production RPG Maker.
 
Presentación Unity
Presentación UnityPresentación Unity
Presentación Unity
 
Evaluation fmp
Evaluation   fmpEvaluation   fmp
Evaluation fmp
 
Sprite js vs craftyjs
Sprite js vs craftyjsSprite js vs craftyjs
Sprite js vs craftyjs
 
2d games design
2d games design 2d games design
2d games design
 
Android Game Minisyonize
Android Game MinisyonizeAndroid Game Minisyonize
Android Game Minisyonize
 
Programmers guide
Programmers guideProgrammers guide
Programmers guide
 
The Ring programming language version 1.7 book - Part 53 of 196
The Ring programming language version 1.7 book - Part 53 of 196The Ring programming language version 1.7 book - Part 53 of 196
The Ring programming language version 1.7 book - Part 53 of 196
 
Work flow
Work flowWork flow
Work flow
 
Work flow the pain is reel
Work flow the pain is reelWork flow the pain is reel
Work flow the pain is reel
 
ontents · Introduction· Objectives·.docx
ontents  ·      Introduction·      Objectives·.docxontents  ·      Introduction·      Objectives·.docx
ontents · Introduction· Objectives·.docx
 
Knock Knock on GameDev Gate
Knock Knock on GameDev GateKnock Knock on GameDev Gate
Knock Knock on GameDev Gate
 
Street runner final
Street runner finalStreet runner final
Street runner final
 
The Ring programming language version 1.2 book - Part 36 of 84
The Ring programming language version 1.2 book - Part 36 of 84The Ring programming language version 1.2 book - Part 36 of 84
The Ring programming language version 1.2 book - Part 36 of 84
 
Knock knock on GameDev gateway! - Introduction to Game development
Knock knock on GameDev gateway! - Introduction to Game developmentKnock knock on GameDev gateway! - Introduction to Game development
Knock knock on GameDev gateway! - Introduction to Game development
 

Último

Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 

Último (20)

Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
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
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
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
 

Unity

  • 1. Alexandria University Faculty of Engineering Computer & Systems Engineering Dep.
  • 2.  Game Development  Unity Interface  Basic Components  Control The Main Character  Game Design  Gameplay  Basic component  Enemy AI  Memory management  optimization  Game Development  Unity Interface  Basic Components  Control The Main Character  Game Design  Gameplay  Basic component  Enemy AI  Memory management  optimization
  • 3.  The anatomy of a video game  game development process  Game Concepts and Game Play Instruction
  • 4. A game usually simulates situations where players are supposed to overcome challenges and achieve the goals of the game. The user interacts with the game while playing it and follows the rules of the game. A game usually consists of:  The Rules  The Goals  The Challenges A game usually simulates situations where players are supposed to overcome challenges and achieve the goals of the game. The user interacts with the game while playing it and follows the rules of the game. A game usually consists of:  The Rules  The Goals  The Challenges
  • 5.
  • 6. 2D Art :  Concept Art  Sprites  Texture Art  UI Artist 3D Art :  Modeling Concept Art  Wrapping & Texturing  Animation 2D Art :  Concept Art  Sprites  Texture Art  UI Artist 3D Art :  Modeling Concept Art  Wrapping & Texturing  Animation
  • 7.  What is Unity ?  Why Unity  The interface  Execution Order of Event Functions
  • 8.  A game engine is a software designed to help developing games. The tool incorporates most of the components required in a game such as rendering, scripting, audio, physics, networking and so on.  Companies often go on developing their own engine for their own games.  Unity is a powerful 3d game engine that will allow you to create professional games.  Unity is written in C and C++ but developing a game will be done using C# , java script and Boo.  Unity uses the professional Nvidia PhysX engine to reproduce all in-game physics.  A game engine is a software designed to help developing games. The tool incorporates most of the components required in a game such as rendering, scripting, audio, physics, networking and so on.  Companies often go on developing their own engine for their own games.  Unity is a powerful 3d game engine that will allow you to create professional games.  Unity is written in C and C++ but developing a game will be done using C# , java script and Boo.  Unity uses the professional Nvidia PhysX engine to reproduce all in-game physics.
  • 9.  Unity plays equally brilliant on 10 global platforms: modern browsers, Android, iOS, Wii, Playstation 3, Xbox 360, Windows, Linux, Flash, and MacOs  Instead of spending your time and budget on independent development for each platform, Unity allows us to actually focus on making games.  Unity allows you to amaze gamers with brilliant full-HD quality and visual effects.  thousands of games powered by Unity  Unity plays equally brilliant on 10 global platforms: modern browsers, Android, iOS, Wii, Playstation 3, Xbox 360, Windows, Linux, Flash, and MacOs  Instead of spending your time and budget on independent development for each platform, Unity allows us to actually focus on making games.  Unity allows you to amaze gamers with brilliant full-HD quality and visual effects.  thousands of games powered by Unity
  • 10.
  • 11. int main() { Initialize(); while (isRunning) { Process(); Update(); Render(); } ShutDown(); } int main() { Initialize(); while (isRunning) { Process(); Update(); Render(); } ShutDown(); }
  • 12. There are a number of event functions that get executed in a predetermined order as a script executes. First Scene Load Awake() Before the first frame update Start() Update Order Update() LateUpdate() FixedUpdate() Rendering Culling There are a number of event functions that get executed in a predetermined order as a script executes. First Scene Load Awake() Before the first frame update Start() Update Order Update() LateUpdate() FixedUpdate() Rendering Culling
  • 13.  Mecanim workflow  Asset preparation and import.  Humanoid character setup.  Bringing characters to life.  Mecanim workflow  Asset preparation and import.  Humanoid character setup.  Bringing characters to life.
  • 14.  Asset Preparation  triangulated mesh.  Rigging  Skinning  Humanoid character setup  Export & Verify  Asset Preparation  triangulated mesh.  Rigging  Skinning  Humanoid character setup  Export & Verify
  • 15.  Bringing characters to life:  Mecanim State Machines  Animation States  Animation Transitions  Animation Parameters  Bringing characters to life:  Mecanim State Machines  Animation States  Animation Transitions  Animation Parameters
  • 16.  Design the game  Terrain edition  Adding Water and Skybox  Import Assets  Lightmapping and Fog  Design the game  Terrain edition  Adding Water and Skybox  Import Assets  Lightmapping and Fog
  • 17.  Isolated islands  The design of The Island.  The blocks between two islands
  • 18.  Sketching The Static Environment The dynamic Environment  Sketching The Static Environment The dynamic Environment
  • 19.
  • 20.  Terrain edition Terrain edition
  • 21. A skybox is a cubemap—a series of six textures placed inside a cube and rendered seamlessly to appear as a surrounding sky and horizon. This cubemap sits around the 3D world at all times, and much like the actual horizon, it is not an object the player can ever get to. The skybox is simply a cube wrapping the whole scene in.
  • 22.  placing the game Elements or Models ( props ,Tress, Bridges , Rocks , Houses , static props , particles, Fences ) And Invisible Borders(Colliders ).
  • 23.  Each Element Consist Of : Meshes ,Textures and Materials. Use a Single Skinned Mesh Renderer Use as Few Materials as Possible Use a small size Of textures
  • 24.
  • 25.  Lightmapping is the method of baking, rendering to a texture file— the lighting that happens to be affecting a rendered 3D object. This can be done in modeling applications, but Unity also allows you to lightmap all of your lights and environment elements in one. • The horizon line might look a little sharp, we could extend the water to a point that it is far enough or we can blur the vision a little. For this purpose, we use the Fog.  Lightmapping is the method of baking, rendering to a texture file— the lighting that happens to be affecting a rendered 3D object. This can be done in modeling applications, but Unity also allows you to lightmap all of your lights and environment elements in one. • The horizon line might look a little sharp, we could extend the water to a point that it is far enough or we can blur the vision a little. For this purpose, we use the Fog.
  • 26. The dynamic world don’t have an end The environment is formed by premade blocks that follow one another randomly until The main character reach to the required distance. These blocks are classified in different difficulties, and an algorithm decides the order of the blocks according to the difficulty.
  • 27.  Each block consists of End point: This point is found at the end of each block to know in which position The Next block will be placed in The game world Collider at the Start: This invisible wall is placed at The start of each block and is triggered to call The function That will generate the next block to be placed as The next block when The main character collides with.
  • 28. Create The sprite image Attached to a txt file to show for each component in the sprite image its position ( x,y ),width and height. Attach this image to a material
  • 29.
  • 30. During Random Blocks  Player run as default  Avoid obstacles.  Challenge  Avoid falling in the sea During Random Blocks  Player run as default  Avoid obstacles.  Challenge  Avoid falling in the sea
  • 31.  Block components:  Waypoints  Static obstacle  Movable obstacle  Collider at the start  End point  Block components:  Waypoints  Static obstacle  Movable obstacle  Collider at the start  End point
  • 32.  Way Point:  Every way point has left & right way points and can set these way point = null if the way point not has the right or left way point .  Every way point has more than next way points.  Way Point:  Every way point has left & right way points and can set these way point = null if the way point not has the right or left way point .  Every way point has more than next way points.
  • 33.  During the Island  Player movement  Friends’ role  Enemies’ role  Challenge  Escape from enemies  Time Hardness : Number of enemies and friends increase.  During the Island  Player movement  Friends’ role  Enemies’ role  Challenge  Escape from enemies  Time Hardness : Number of enemies and friends increase.
  • 34.  During loading  Check the target textures.  Active the target objects  During loading  Check the target textures.  Active the target objects
  • 35.  Save his friends  Hit the crate  Destroy the crate  Particles  Save his friends  Hit the crate  Destroy the crate  Particles
  • 36.  Power ups  Increase the power of the player  Arrow  Active the arrow above the player  Power ups  Increase the power of the player  Arrow  Active the arrow above the player
  • 37.  Player and Enemy  The player hit the enemy  The enemy hit the player  Player and Enemy  The player hit the enemy  The enemy hit the player
  • 38.  Check The end of the level  Make collision with the end  All friends are free.  Check The end of the level  Make collision with the end  All friends are free.
  • 39.  The Friends :  After the player free the friend ,The friend follows the player.  Look at the player.  The Friends :  After the player free the friend ,The friend follows the player.  Look at the player.
  • 40.  The Enemy:  Find path implementation:  With navmesh  With waypoint  The Enemy:  Find path implementation:  With navmesh  With waypoint
  • 41.  Find Path Implementation:  navmesh:  Apply navigation  way point :  How Enemy attacks the player  Find Path Implementation:  navmesh:  Apply navigation  way point :  How Enemy attacks the player
  • 42.  Camera  Lighting  Meshes  Skybox  Colliders  Prefabs  Audio  Camera  Lighting  Meshes  Skybox  Colliders  Prefabs  Audio
  • 43.  Cameras are the devices that capture and display the world to the player.  Layers and Culling mask.  Cameras are the devices that capture and display the world to the player.  Layers and Culling mask.
  • 44.  Why we used lighting.  Directional lights ◦ Directional lights are used mainly in open places scenes for sun and moonlight.  Point lights ◦ The most common lights in computer games. ◦ Example :Light bulbs.  Spot lights ◦ Spot lights only shine in one direction, in a cone. ◦ perfect for flashlights.  Why we used lighting.  Directional lights ◦ Directional lights are used mainly in open places scenes for sun and moonlight.  Point lights ◦ The most common lights in computer games. ◦ Example :Light bulbs.  Spot lights ◦ Spot lights only shine in one direction, in a cone. ◦ perfect for flashlights.
  • 45.  Meshes make up a large part of your 3D worlds.  Unity supports triangular or Quadrangle polygon meshes.  Vertices and Edges.  Types of meshes ◦ Mesh Filter ◦ Text Mesh  Mesh Renderer  Meshes make up a large part of your 3D worlds.  Unity supports triangular or Quadrangle polygon meshes.  Vertices and Edges.  Types of meshes ◦ Mesh Filter ◦ Text Mesh  Mesh Renderer
  • 46.  Material.  Texture.  A Skybox is a 6-sided cube.  Blend.  Material.  Texture.  A Skybox is a 6-sided cube.  Blend.
  • 47.  Collision and Rigidbody  Basic colliders ◦ Sphere Collider  ping pong balls and rockets ◦ Box Collider  for doors, walls, platforms, boxes ◦ Capsule Collider  Character Controller and unusual shapes.  Collision and Rigidbody  Basic colliders ◦ Sphere Collider  ping pong balls and rockets ◦ Box Collider  for doors, walls, platforms, boxes ◦ Capsule Collider  Character Controller and unusual shapes.
  • 48.  A Prefab is a type of asset used for clone GameObject.  All Prefab instances are linked to the original Prefab.  Make any changes to the Prefab you will see the change applied to all instances.  A Prefab is a type of asset used for clone GameObject.  All Prefab instances are linked to the original Prefab.  Make any changes to the Prefab you will see the change applied to all instances.
  • 49.  Audio Listener ◦ acts as a microphone-like device. ◦ Main Camera  Audio source ◦ Audio Clip  contain the audio data used by Audio Sources  Properties  3D Sound  Decompress on load  Compressed in memory ◦ Properties  Play On Awake  Loop  Priority  Audio Listener ◦ acts as a microphone-like device. ◦ Main Camera  Audio source ◦ Audio Clip  contain the audio data used by Audio Sources  Properties  3D Sound  Decompress on load  Compressed in memory ◦ Properties  Play On Awake  Loop  Priority
  • 50.  Creating waypoints • AI Controller
  • 51.  Visualization • Movement ― Ordered ― Random  Visualization • Movement ― Ordered ― Random
  • 52.  Linear-Congruential Generators (LCG) Xn = (a * Xn-1) mod m where m is prime number a is constant number Xn-1 the random number of last iteration  Linear-Congruential Generators (LCG) Xn = (a * Xn-1) mod m where m is prime number a is constant number Xn-1 the random number of last iteration
  • 53.  Away From Waypoint  How Get Direction  How Get Direction To Player  Properties of enemy ◦ Run ◦ Fire ◦ Walk ◦ Jump ◦ Think  Away From Waypoint  How Get Direction  How Get Direction To Player  Properties of enemy ◦ Run ◦ Fire ◦ Walk ◦ Jump ◦ Think
  • 54.
  • 55.  Object Stored in Heap. ◦ Allocate and release automatically  Value and Reference Types ◦ Function call and data types.  Allocation and Garbage Collection ◦ Areas in heap. ◦ Block requesting ◦ Small heap with fast and frequent garbage collection ◦ Large heap with slow but infrequent garbage collection  Object Stored in Heap. ◦ Allocate and release automatically  Value and Reference Types ◦ Function call and data types.  Allocation and Garbage Collection ◦ Areas in heap. ◦ Block requesting ◦ Small heap with fast and frequent garbage collection ◦ Large heap with slow but infrequent garbage collection
  • 56.  Avoid in coding  Lookups  Object pooling and Animations  Textures and optimized 3D models  Profiler  Avoid in coding  Lookups  Object pooling and Animations  Textures and optimized 3D models  Profiler
  • 57. • Check condition • Triggers • Check condition • Triggers
  • 58.  Example: Script AI ◦ Sleeping ◦ Limit the amount of call  Example: Script AI ◦ Sleeping ◦ Limit the amount of call
  • 59. • Functions that give you access to other script or other object i.e Find method. • Time cost • Functions that give you access to other script or other object i.e Find method. • Time cost
  • 60.  Object pooling ◦ Problem of destroy object ◦ Cost time ◦ Advantage  Animation ◦ Culling Mode to Based on Renderers  Object pooling ◦ Problem of destroy object ◦ Cost time ◦ Advantage  Animation ◦ Culling Mode to Based on Renderers
  • 61.  Avoid large size  Time of render  Combine together objects that share same materials.  Avoid large size  Time of render  Combine together objects that share same materials.
  • 62.  What is the profiler.  Process and time  Improve performance of code
  • 63.  Example: Functions and scripts