Home Page Icon
Home Page
Table of Contents for
Enemy controller
Close
Enemy controller
by Francesco Sapio, Lauren S. Ferro
Unity 2017 2D Game Development Projects
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Download the color images
Conventions used
Get in touch
Reviews
Press Start
Atoms of games
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
Asset Workflow
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
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
Let’s Make Some Prefabs
Basics of audio and sound FX in Unity
Listening to the physics behind sound
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
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
Importing a new font
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
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
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
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
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
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
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
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
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
Leave a review - let other readers know what you think
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Prev
Previous Chapter
Testing the explosion
Next
Next Chapter
Requirements of the enemy controller
Enemy controller
In this section, we will explore how to create the enemy controller.
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset