top of page

RPG Platformer Technical Demo

I want to create a game that is fast paced with interesting combat mechanics to let players express their expertise with the system and customize their character. My system is my first attempt at recreating systems I love in 2D platforming adventure games where the player has: Dashes, air dashes, wall jumps, attacks that repel enemies, getting another jump midair while attacking downwards, and parrying. Some of these, such as the dash, parry, and normal attack also have an upgrade tree which allow them to have alternate effects.

Character Controller

Designing the controller for this project I knew I wanted a few things:

​

  1. X-axis and Y-axis movement being separated so the player doesn't slow down in the air if they change direction, and the player can either tap to do a short jump or hold to do a long jump.

  2. A short dash using the Unity Rigid Body component to propel the player forwards, and when upgraded can be used in the air.

  3. The ability to wall jump using box casts on either side of the player to check for terrain, and apply force up and in the opposite direction of the wall.

​

Each of these presented unique challenges as I hadn't made many of these mechanics before in previous projects, especially not with a more advanced implementation that I was planning to do.

​

After a lot of learning and lots of tweaking, I was able to make my code run quite quickly while maintaining every part that I wanted for the player's movement.

Player Combat & Enemy Interaction

When it came to the combat system of the project I knew I wanted to have only a basic attack, being able to jump infinitely if the player attacks an enemy below them, and have the enemies and player get knocked back whenever they take damage.

​

Some of the biggest challenges came from:

​

  1. Determining the direction in which the player or enemy should be knocked back.

  2. Creating a melee attack as I've only ever made ranged attacks.

  3. Turning off player collision with enemies but not the terrain whenever the player takes damage to give them a little invincibility window.

​

As I went through the creation of this tech demo, it was interesting to piece together all of the different systems that needed to be in place for combat that make it into an enjoyable experience for the player. 

​

It was also interesting to see all the different ways in which I could program each system, and finding a way in which I could do it to fit the feel of the project I was making.

Enemy Types

I also experimented with creating different enemy types and using raycasting in order to get lines to fire projectiles or the enemy to fire itself towards the player. I created:

​

  1. An enemy that goes from side to side and fires projectiles towards the player when they're within a certain range.

  2. An enemy that starts chasing the player when they're within a certain range but just goes back and forth when the player is not in range.

  3. An enemy that flies around in a figure eight style, then dive bombs the player when they get into a certain range, and then waits a little while before dive bombing again.

​

Each enemy was implemented using a combination of Rigid Body physics, raycasting towards the player, and using inheritance from a base Enemy script to give them all basics such as health, move speed, dealing and receiving damage, and dying.

Upgrade System

This was my first time doing an upgrade system so I kept it small. The player gets a single upgrade coin each time they kill an enemy, and then they can go to a small shop which opens a UI screen to upgrade certain abilities. In the upgrade screen they can:

​

  1. Give the ability a new effect such as making the dash usable in the air or the parry do an attack when successful.

  2. They can't spend coins if an ability is fully upgraded.

Enemy Load System

As a way to conserve processing space for the Unity game engine as I've never done load screens before and didn't want the player to just have to go through a lot of different load screens, I made a system where when a player enters a room all of the enemies turn on, and when they leave the room the enemies turn off. This way the enemies don't move around and don't need to be processed by the game engine. I created an object which also houses their starting positions and types of enemy it is so that when the player comes into the room it "spawns" the correct enemy in the correct location. The box in the gif represents the player leaving the room.

© 2023 by Aidan Molina. Created with Wix.com

bottom of page