
This introduction describes the game that we will be creating throughout the course
Download and install Unity Hub and then use Unity Hub to download and install Unity
Create a Unity project and adjust the layout of the panes in the Unity editor
Use the Unity particle system to create a moving star field background for the game
Download Unity asset package files
Import asset package files into Unity
Create and configure the player object
Create the PlayerController script and code moving the player left and right on screen
Add code that prevents the player object from moving off the left side of the screen or the right side of the screen
Create the prefab that represents a player projectile
Add code that creates a player projectile when the space bar is pressed
Add code that moves the player projectile upward from just above the player
Create the Game and Enemy objects in the Unity editor
Create and assign the variables needed to code the creation of the enemies
Add the code that creates four rows of enemies on screen, eight enemies in each row
Add code that makes an enemy disappear when hit by a player projectile
Add code that prevents the player from firing when a player projectile is already on screen
Add code that moves the enemy group horizontally
Add code that moves the enemy group vertically
Create and assign the variables needed to code the generation of enemy fire
Add code that generates enemy fire
Add code to make the enemy projectiles move downward from just below enemy objects
Add code to make the player disappear when hit by an enemy projectile
Configure objects so they will not move when hit by other objects
Add code that destroys a player projectile when it reaches the top of the screen
Add code that destroys an enemy projectile when it reaches the bottom of the screen
Create the objects that represent each of five lives in the game
Create and assign the variables needed to code losing lives and start and end game behavior
Add code that controls when enemies start and stop moving and firing
Continue adding code that controls when enemies start and stop moving and firing
Add code that removes a life each time the player is hit
Add code that displays the console message Game Over when the player is hit after all lives lost
Add code that displays the console message Game Over when the enemy breaches the player row
Add code that displays the console message You Win! when the player knocks out all enemies
Create the objects in the Unity editor that make up the score display
Add the code that updates the score display each time an enemy is hit
Create objects in the Unity editor that make up the level display
Continue creating the objects in the Unity editor that make up the level display
Create and assign the variables needed to code the level display
Add the code that updates the level display whenever the game level changes
Create the panels in the Unity editor for the Start Game dialog
Add the Play Game button to the Start Game dialog and assign the function that executes when the button is clicked
Add the text items to the Start Game dialog that make up the line that displays enemy speeds at each game level
Add the text items to the Start Game dialog that make up the line that displays enemy fire rates at each game level
Add the text items to the Start Game dialog that make up the lines that display hit points at each game level and control keys
Create objects in the Unity editor that make up the border for all dialogs
Create and assign the variables needed to code the Start Game dialog
Add the code that controls the Start Game dialog
Create the objects in the Unity editor that make up the End Game dialog
Add the code that sets the End Game dialog text to Game Over when the game is lost
Add the code that sets the End Game dialog text to You Win! when the game is won
Create the objects in the Unity editor that make up the Exit Game dialog
Add the code that manages the Exit Game dialog
Create all variables needed to code restarting the game, leveling up and resetting the game
Add the code that re-initializes variables for game restart and replaces values with variables for enemy speed and enemy fire rate for multiple levels
Add code that sets hits points, enemy speed and enemy fire rate at each game level
Add calls to the ResetGame function
Add code that destroys any projectiles that are present when the game is reset
Add code that restores all lives when the game resets
Add code that restores all enemies when the game is reset
Add code that resets enemy movement and fire variables and resets player to starting position when game is reset
Create folders for sounds and audio scripts and move sounds from asset package to new sound folder
Implement the sound effect that is heard when an enemy is hit
Implement the sound effect that is heard when the player fires
Implement the sound effect that is heard when the player is hit
Implement the sound effect that is heard when the enemies move
Add code that toggles all sound effects on and off when the S key is pressed
Conduct final testing of the game - losing and winning at different levels of the game
Build a standalone application and see your masterpiece in all of its full screen glory!
In this course conclusion, I share my thoughts on several ways you can add to the game we have created here
All software and resources used in this course are free.
In this course, you will learn how to create a complete Space Invaders game in Unity from an instructor with 40 years programming experience. You do not need to have any unity or programming experience. I will explain everything as we create the game together. Here are some of the things you will learn in this course.
- How to create a Unity project
- How to configure the Unity editor
- How to import assets into Unity
- How to create a moving star field background
- How to create the player, enemies, player projectiles and enemy projectiles
- How to make the player, enemies and projectiles move
- How to prevent objects from moving when hit by other objects
- How to prevent projectiles from moving off the screen
- How to detect when a projectile has hit an enemy or the player
- How to determine when the game is won
- How to determine when the game is lost
- How to add multiple levels to the game
- How to add sound effects to the game
- How to test the game throughout the development process
- How to investigate and correct errors
- How to publish the project to a stand alone application