Unity 3D Slides - Argon Assault
Unity 3D Slides - Argon Assault
Rick Davidson
Unity 2020.1
Camera:
● Is on a rail / path Player:
● Move horizontal + vertical
● Shoot
Argon Assault Game Design
Player Experience:
Chaos
Core Mechanic:
Dodge and shoot
Core game loop:
Get as far as possible without dying in order to get the
highest score possible. Start from beginning when die.
Game Theme
● You must save your planet, Argon, from destruction
by an invading force.
Features - In Priority
● Camera Rail: Path through the level that the camera follows.
● Player Movement: Horizontal and vertical movement.
● Shooting: Player shoot bullets which do damage to opponent.
● Health: Enemies have health that depletes when shot.
● Enemy Paths: Enemies should travel on paths and be hand placed by the
designer.
● Score: Points are given for killing enemies.
● Game Loop: Upon dying, player restarts the level.
Other Features You Can Consider
● Multiple Levels: Finish a level and load the next.
● Player Shield: When damaged, the player’s shield depletes.
● Pickups: Flying over a shield pickup will increase the player’s shields.
● Momentary invulnerability: After taking damage, the player cannot take
damage again for X time.
● Weapon Upgrades: Flying over a pickup could increase weapon damage.
Your Game Name And Theme?
● Think of a central theme for your game.
● Decide on a starting name for your game.
● Share with the community!
Unity 2020.1
Unity listens,
uses the input
Keyboard Gamepad Mobile the player uses
Add The Same For The Vertical Axis
● Following the same flow, print out to the console
when the player is pushing up or down.
Unity 2020.1
transform.localRotation = Quaternion.Euler( x , y , z );
transform.localRotation = Quaternion.Euler(pitch, yaw, roll);
Unity 2020.1
Tune When
Gameplay something
“doesn’t feel
right”
Tweak And Tune Ship Movement
● Spend some time tuning your game:
○ Add more length to your rail
○ Tune camera distance and FOV
○ Player speed, rotations, clamps
○ Obstacles to avoid in world
Unity 2020.1
void OnEnable()
{
fire.Enable
}
void OnDisable()
{
fire.Disable
}
Unity 2020.1
[0] [1]
lasers
Kinematic
Collision Trigger Trigger Trigger
Rigidbody Collider
Static Trigger
Trigger Trigger Trigger Trigger
Collider
Rigidbody Trigger
Trigger Trigger Trigger Trigger Trigger Trigger
Collider
Kinematic
Rigidbody Trigger Trigger Trigger Trigger Trigger Trigger Trigger
Collider
Unity 2020.1
Instantiate At Runtime
Destroy Instantiated Objects
● Create SelfDestruct.cs
● Use Destroy() to ensure that none of our newly
instantiated particle effects stick around
Unity 2020.1
ClassA ClassB
Data & Statements NO Data & Statements
Remember Encapsulating Our Code?
● But now we’d like to let one class (Enemy) influence
another class (ScoreBoard).
ClassA ClassB
Data & Statements
YES Data & Statements
Public Versus Private Access Modifiers
ClassA ClassB
MethodOne();
NO
Private MethodOne()
MethodTwo();
YES
Public MethodTwo()
Public Access Modifier
Access Modifier
Scope of use
Using FindWithTag()
Set Parent Reference
● Create a new tag for our Spawn At Runtime game object
● Set the reference for our parent game object using
FindWithTag()
● Update other areas of our code accordingly to make this
work
● Note: Pay attention to ‘Type’
Unity 2020.1
Unity Post-Processing
Post Processing
● Add effects to your Camera to change the look of your game
Time
Creating Your 3 Minute Experience
● Variety is king:
Each 10 second moment should be unique
● Always be thinking of your player experience
● Give your player choices
Variety
● There are thousands of combinations of variables to create
variety:
○ Enemies: appearance, size, speed, hit points, movement
patterns, FX, score
○ Player rail: speed of movement, where you fly, rotation,
movement patterns
○ Environment: Textures, shapes, trees, obstacles, explosions,
colours, lighting, visibility
○ Player: Laser speed and colour, controls, camera
Create Your 3 Minute Experience
● Take the time now to create a three minute experience.
○ Create a player path you’re happy with
○ Add enemies and enemy waves
○ Add voice overs / characters / story
○ Tune the game so that its the right difficulty
● Create a build of your game, upload to
sharemygame.com and share with your friends and with
our community
Unity 2020.1