Game Development with Unity3D - Serious Games...

28
Game Development with Unity3D David Gouveia Virtual Campus Lda, Porto

Transcript of Game Development with Unity3D - Serious Games...

Page 1: Game Development with Unity3D - Serious Games Netseriousgamesnet.eu/.../10_Game_Development_Using_Unity_David_G… · Game Development with Unity3D ... Unity Pro Advanced graphics,

Game Development with Unity3D

David Gouveia

Virtual Campus Lda, Porto

Page 2: Game Development with Unity3D - Serious Games Netseriousgamesnet.eu/.../10_Game_Development_Using_Unity_David_G… · Game Development with Unity3D ... Unity Pro Advanced graphics,

Table of Contents

1. Introduction to Unity

2. Concepts and workflow

3. Live demo

Page 3: Game Development with Unity3D - Serious Games Netseriousgamesnet.eu/.../10_Game_Development_Using_Unity_David_G… · Game Development with Unity3D ... Unity Pro Advanced graphics,

INTRODUCTION TO UNITY Part 1

Page 4: Game Development with Unity3D - Serious Games Netseriousgamesnet.eu/.../10_Game_Development_Using_Unity_David_G… · Game Development with Unity3D ... Unity Pro Advanced graphics,

What is Unity?

Game engine – system designed to help create video games

o Easier & Faster

Visual editor – see changes in real-time

o Interactive & Rapid prototyping

Component-based – functionality built out of smaller pieces

o Modular & Extensible

Page 5: Game Development with Unity3D - Serious Games Netseriousgamesnet.eu/.../10_Game_Development_Using_Unity_David_G… · Game Development with Unity3D ... Unity Pro Advanced graphics,

What can Unity do for you?

Rendering

Animation

Audio

Physics

Input Resources

Scripting

Artificial Intelligence

Networking

Page 6: Game Development with Unity3D - Serious Games Netseriousgamesnet.eu/.../10_Game_Development_Using_Unity_David_G… · Game Development with Unity3D ... Unity Pro Advanced graphics,

What does Unity look like?

View Organize Tweak

Extend

Page 7: Game Development with Unity3D - Serious Games Netseriousgamesnet.eu/.../10_Game_Development_Using_Unity_David_G… · Game Development with Unity3D ... Unity Pro Advanced graphics,

Unity games run everywhere

Page 8: Game Development with Unity3D - Serious Games Netseriousgamesnet.eu/.../10_Game_Development_Using_Unity_David_G… · Game Development with Unity3D ... Unity Pro Advanced graphics,

Unity understands you

Page 9: Game Development with Unity3D - Serious Games Netseriousgamesnet.eu/.../10_Game_Development_Using_Unity_David_G… · Game Development with Unity3D ... Unity Pro Advanced graphics,

Multiple programming languages

var explosion : Transform; function OnCollisionEnter() { Destroy(gameObject); Instantiate(explosion, transform.position, transform.rotation); }

JavaScript

using UnityEngine; using System.Collections; public class Example : MonoBehaviour { public Transform explosion; void OnCollisionEnter() { Destroy(gameObject); Instantiate(explosion, transform.position, transform.rotation); } }

C#

import UnityEngine import System.Collections class Example(MonoBehaviour): public explosion as Transform def OnCollisionEnter(): Destroy(gameObject) Instantiate(explosion, transform.position, transform.rotation)

Boo

Page 10: Game Development with Unity3D - Serious Games Netseriousgamesnet.eu/.../10_Game_Development_Using_Unity_David_G… · Game Development with Unity3D ... Unity Pro Advanced graphics,

What about 2D games?

http://www.therealmgame.com/

Page 11: Game Development with Unity3D - Serious Games Netseriousgamesnet.eu/.../10_Game_Development_Using_Unity_David_G… · Game Development with Unity3D ... Unity Pro Advanced graphics,

Games created with Unity

Bad Piggies

Thomas was Alone

Scrolls

Beat Sneak Bandit

Temple Run 2

The Room

Rochard

Dead Trigger 2 CSR Racing

Page 12: Game Development with Unity3D - Serious Games Netseriousgamesnet.eu/.../10_Game_Development_Using_Unity_David_G… · Game Development with Unity3D ... Unity Pro Advanced graphics,

How to get Unity?

Unity Basic

Has every essential features such as

graphics, audio, physics, animation,

networking, input, and scripting

Free (with splashscreen)

Unity Pro

Advanced graphics, audio, animation,

and artificial Intelligence

$1.500+

Download from http://unity3d.com

Page 13: Game Development with Unity3D - Serious Games Netseriousgamesnet.eu/.../10_Game_Development_Using_Unity_David_G… · Game Development with Unity3D ... Unity Pro Advanced graphics,

CONCEPTS AND WORKFLOW Part 2

Page 14: Game Development with Unity3D - Serious Games Netseriousgamesnet.eu/.../10_Game_Development_Using_Unity_David_G… · Game Development with Unity3D ... Unity Pro Advanced graphics,

Architecture

Game

Assets Scenes

Game Objects

Components

Page 15: Game Development with Unity3D - Serious Games Netseriousgamesnet.eu/.../10_Game_Development_Using_Unity_David_G… · Game Development with Unity3D ... Unity Pro Advanced graphics,

Editor Interface

Game Assets

Scenes Game Objects

Components

Page 16: Game Development with Unity3D - Serious Games Netseriousgamesnet.eu/.../10_Game_Development_Using_Unity_David_G… · Game Development with Unity3D ... Unity Pro Advanced graphics,

Assets

Assets

Images

3D Models

Video

Animations Fonts

Sounds

Scripts

Page 17: Game Development with Unity3D - Serious Games Netseriousgamesnet.eu/.../10_Game_Development_Using_Unity_David_G… · Game Development with Unity3D ... Unity Pro Advanced graphics,

Scene

• Unity games are divided into scenes • Scenes are empty spaces... • ...that can be filled with game objects

Page 18: Game Development with Unity3D - Serious Games Netseriousgamesnet.eu/.../10_Game_Development_Using_Unity_David_G… · Game Development with Unity3D ... Unity Pro Advanced graphics,

Game Object

• Everything inside a scene is a game object • Game objects also start out empty and do

nothing...

?

Page 19: Game Development with Unity3D - Serious Games Netseriousgamesnet.eu/.../10_Game_Development_Using_Unity_David_G… · Game Development with Unity3D ... Unity Pro Advanced graphics,

Game Object

• ...but by adding components to them they can become anything!

Page 20: Game Development with Unity3D - Serious Games Netseriousgamesnet.eu/.../10_Game_Development_Using_Unity_David_G… · Game Development with Unity3D ... Unity Pro Advanced graphics,

Component

Each component adds a piece of functionality to the game object

The combination of all components defines what the game

object is

Let’s see some examples!

Page 21: Game Development with Unity3D - Serious Games Netseriousgamesnet.eu/.../10_Game_Development_Using_Unity_David_G… · Game Development with Unity3D ... Unity Pro Advanced graphics,

The Transform Component

Where?

Which direction?

How large?

Page 22: Game Development with Unity3D - Serious Games Netseriousgamesnet.eu/.../10_Game_Development_Using_Unity_David_G… · Game Development with Unity3D ... Unity Pro Advanced graphics,

Rendering Components

What to draw? (mesh filter)

How to draw? (mesh renderer)

Page 23: Game Development with Unity3D - Serious Games Netseriousgamesnet.eu/.../10_Game_Development_Using_Unity_David_G… · Game Development with Unity3D ... Unity Pro Advanced graphics,

Physics Components

Is solid? (collider)

Moves? (rigid body)

Page 24: Game Development with Unity3D - Serious Games Netseriousgamesnet.eu/.../10_Game_Development_Using_Unity_David_G… · Game Development with Unity3D ... Unity Pro Advanced graphics,

The Script Component

Adds custom behavior

Page 25: Game Development with Unity3D - Serious Games Netseriousgamesnet.eu/.../10_Game_Development_Using_Unity_David_G… · Game Development with Unity3D ... Unity Pro Advanced graphics,

Other Components

Light

Camera

Text mesh

Audio listener & source

Particle system

Skybox

…and many more.

Page 26: Game Development with Unity3D - Serious Games Netseriousgamesnet.eu/.../10_Game_Development_Using_Unity_David_G… · Game Development with Unity3D ... Unity Pro Advanced graphics,

How to create Game Objects

Create an empty game object and manually add components to it

Choose one of the default game objects

Page 27: Game Development with Unity3D - Serious Games Netseriousgamesnet.eu/.../10_Game_Development_Using_Unity_David_G… · Game Development with Unity3D ... Unity Pro Advanced graphics,

Game

Prepare the scene Hit play See the

result

Page 28: Game Development with Unity3D - Serious Games Netseriousgamesnet.eu/.../10_Game_Development_Using_Unity_David_G… · Game Development with Unity3D ... Unity Pro Advanced graphics,

LIVE DEMO Part 3