Journal 139 — Unity Project Development Part 1–2.5D Shooter

Objective: To develop a complete 2.5D Shooter

In this new series of articles, I am developing a 2.5D sidescrolling shooter, starting with a basic set of aircraft and environment assets.

The game will include the following:

  • wave system for regular enemies, a mid boss, and final boss fight
  • weapon power ups
  • animations and sound effects

My goals are to first get the basic movement, weapons, and enemies working along with some basic animations. Then I will revisit all the areas of the game and refine the player movement, add sound effects, music, post processing effects, and UI. I plan to release this for Windows PC and Android.

Movement

To start, I am going to work on the basic movement. I’m using the new Unity Input System.

I will start with creating a new Input Actions asset called “PlayerActions”. I will create a 2D Vector Action for the WASD movement and Button Action for the regular attack and special attack.

After creating these actions and selecting “Save Asset”, I selected “Generate C# Class” in the Inspector and select “Apply”.

On the Player game object, I will use the built-in Character Controller component to handle the movement.

In the Player C# script, I will add a reference to the Input Action and Character Controller. Using the new Input system, I can read the Vector2 value of keyboard movement I previously set up. To move with Character Controller, I use Controller.Move().

Here are the results.

Movement Limit

I want to restrict the player so it cannot move off screen. I can simply add some 3D cubes and turn off the renderer, and only use the box colliders.

Animation

Next, I will add a basic animation for the helicopter blades by selecting the rotor objects and changing the y-axis and z-axis rotation values respectively and recording several keyframes.

Here are the results.

I’ll add some additional animations later to tilt the helicopter slightly on movement and show a thruster animation.

Weapons

I will make a basic weapon projectile based on a prefab. I will add a collider and Rigid Body and script to move the projectile to the right. I will also add a collider and check the name of the enemy craft that I hit, and I will destroy the projectile after it leaves the game view.

I will need to instantiate the bullets from near the nose of the player craft, so I will add an empty object there with a script to instantiate the projectiles.

Back in the Player script, I will update the button trigger action to call the fire function.

Now we can check the results.

Thank you for your time!

In the next series of updates, I will add the enemy movement and attack using a wave system.

--

--

--

An Engineering Manager consultant who is seeking additional skills using Unity 3D for game and application development.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Hash Tables Explained: Learnings from “A Common Sense Guide to Data Structures and Algorithms” by…

Web-Scraping : Guide

Ethfinance community driven DAI Pod

How To Fix Asus PadFone S Not Charging [Troubleshooting Guide]

Aldelo and DoorDash Announce Direct Integration

Generics In Kotlin (Part 3)

Cohort Stories: Meet Corina

Journal 56 — Using Timeline to Set Up Unity Scenes

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Chris Nielsen

Chris Nielsen

An Engineering Manager consultant who is seeking additional skills using Unity 3D for game and application development.

More from Medium

Journal 144 — Unity Project Development, 2.5D Shooter

Making a RTS game #48: Various fixes, improvements and clean-ups (Unity/C#)

Spawn Management

A Series On Creating Immersive Audio in Unity with Custom Wwise Scripts