Unity 2017 2D Game Development Projects

Author: Andreas Oehlke   Lauren S. Ferro  

Publisher: Packt Publishing‎

Publication year: 2018

E-ISBN: 9781786465139

P-ISBN(Paperback): 89543100838690

Subject: TP39 computer application

Language: ENG

Access to resources Favorite

Disclaimer: Any content in publications that violate the sovereignty, the constitution or regulations of the PRC is not accepted or approved by CNPIEC.

Unity 2017 2D Game Development Projects

Chapter

Different approaches to games

The game design process

Workflow

Concept development

Design and prototyping

Implementation

Testing

Iteration

Finalizing

A-Team

Developing 2D games

X, Y, and Z-axis

Full 3D

Orthographic (3D)

2D with 3D graphics, also known as 2.5D

Full 2D

2D with a perspective camera

The Unity Engine

Downloading Unity

An overview of built-in features in Unity

Creating a new 2D project in Unity

A brief overview of the Unity User Interface (UI)

The main components of the UI in Unity

Hierarchy Window

Scene View

Game View

Inspector window

Console window

Project Window

Customizing the workspace

Hotkeys to keep in mind

Primitive and placeholder objects

Images

3D model files

Meshes and animations

Audio files

Naming conventions for assets (and in general)

Importing into Unity

Special folders

Assets

Editor

Editor default resources

Plugins

Gizmos

Standard Assets

StreamingAssets folder

Resources

Hidden Assets

Preparing for the projects in this book

Project 1 - Angel Cakes

Project 2 - intergalactic shooter: Quark

Project 3 - RETROformer

Summary

Chapter 2: Working with Assets

An overview of collecting games

Key features of collecting in games and things to keep in mind

What will you learn in the remainder of this chapter?

Textures and Sprites

Sprite Render

Sprite Editor

How to use the Sprite Editor

Sprite Packer

Sprite Creator is your friend when you have no assets

Setting up the Angel Cakes project

Folder setup

Importing assets into the engine

Configuring assets for the game

9-slicing Sprites

Best practices

Textures

Maximizing the space that you have

Scaling

Naming

Summary

Chapter 3: Let’s Make Some Prefabs

Basics of audio and sound FX in Unity

Importing audio

Audio Listener

Audio Source

Choosing sounds for background and FX

Happy

Sad

Retro

Integrating background music in our game

Creating the Angel and the PlayerController

A brief overview of Unity's physics system

Rigidbody

Colliders

Assembling the Angel

Tagging the player

Creating the Script

Enforcing components

Exposing variables in the inspector

From the player input to a new position in the world

Moving the character to the new position

Testing the PlayerController

Collectable system

Setting up the Angel Cakes

Enforcing components, again!

Triggering cake

Testing the cake collectable system so far

Prefabs for our Game Objects

Creating the Prefab for the player and the cake

Building the Map

Summary

Chapter 4: It’s about U and I

Overview of the UI

Designing the user interface

Programming the user interface

Four types of UI

Diegetic

Non-diegetic

Spatial

Meta

Usability and function

UI is not UX

Designing UIs for games

Feedback

Be bold, not ambiguous

Keep it simple, consistent, and focused

Ergonomics: devices, hardware, and gestures

Multi-device design

Meaning and integrity

Goals

Enjoyment

Test

Introduction to the UI system in Unity

Building UIs in Angel Cakes

Scripting a UI and integrating with the collection systems

Setting up the UI

Programming the scoring system

Increasing the score when the player collects a cake

Creating a Game Over Screen

Scripting the Game Over Screen

Last tweaks

Testing

More kinds of cakes

Adding more levels

Adding animations

Devils

Summary

Chapter 5: Freeze! Creating an Intergalactic Shooter

An overview of game #2

Overview of shooting games

First-Person

Third-Person

Top-down

Designing game #2

Setting up the project for game #2

Importing assets for the space shooter

Organizing the project

Introduction to the animation system

Concepts of Sprite animations

Generating the animations from the sprites

Adding a state behavior for destroying the explosion

Saving the explosion as a prefab

Summary

Chapter 6: No One Is Alone Forever

Creating a shooting system

Player controller

Requirements of the player controller

Creating the script

Moving the player

It's time to shoot

That explosion was bad

Testing the explosion

Enemy controller

Requirements of the enemy controller

Creating the enemy controller

New variables for the enemy controller

Modifying the movement

Shooting deadly bullets

Alternative enemy controller

Creating the second enemy controller

Changing the aiming system

Shooting with passion

Creating a bullet prefab

Creating a bullet controller

Enforcing components

Exposing variables in the Inspector

Getting the reference to the rigidbody

Auto-destroying the bullet

Moving the bullet

Hit spaceships

Exercises

Summary

Chapter 7: Getting Serious About Gameplay

Building the UI

Setting up the UI

Creating the lives counter

Creating the star score counter

Building an infinite scrolling map

Repeating the background

Falling stars and planets

Rotating satellites

Creating the prefabs

Including power-ups

Spawning system

Coroutines

Creating spawning points

Scripting the spawning system

Testing the game

Exercises

Other things you could consider adding to the game

Timer

Increase the speed

Combos

Bosses and waves

Summary

Chapter 8: Building a Tilemap and Importing it into Unity

Platforming games

Side-scrolling

Infinite scrolling/endless runner

Overview of the project for game #3 - RETROformer

Creating tiles

Introduction to the program - Tiled and Tiled2Unity

Mini-map

Changing level properties

Adding colliders to our tiles

Importing tilesets into Unity with Tiled2Unity

Post-Tiled2Unity 

Summary

Chapter 9: Look, It Moves

Advanced animations

A short recap of the animation system

Setting up the sprite sheet for the animations

Creating the animations from the sprite sheet

Building the Animation State Machine

Summary

Chapter 10: Let’s Get Physical

Physics Material 2D

Building the panda hero

Moving the panda

The control scheme

The Movement Component

Setting up the Movement Component

Player Controller

Summary

Chapter 11: Don’t Forget to Save!

Save and load systems

Creating a save/load system in Unity

PlayerPrefs

PlayerPrefs functions

Variables to save in RETROformer

Building the save/load system for our game

Refining the save and load system

Jump pads

Creating the Jump Pad

Wrapping up gameplay

Creating the user interface

Water zones

Winning zone

Enhancing the environment

Testing

Summary

Chapter 12: The Nature of Export

Implementing mobile input for the game

MovingController

JumpController

Exporting the game

For Android

Preparing an Android Unity project

Summary

Other Books You May Enjoy

Index

The users who browse this book also browse


No browse record.