Platformer Project
Unnamed Platformer (Personal Project)
A personal project I was working on in my free time.
The game is a 2D platformer and the main mechanic is jumping on various kinds of crates. It is inspired by traditional Mario platformers and Matt Thorson's An Untitled Story (2007).
I am learned a lot of useful coding techniques for creating a fun platforming experience.
All videos regarding this project can be viewed on my YouTube channel under the following playlist: Platformer Project.
Table of Contents
I added crates that produce a variable number of gems when jumped on. The number of gems, value of the gems, and other variables can be altered through the Inspector. The gems home in on the player using the seek steering behaviour.
I made a mistake when coding the steering behaviour that caused it to behave differently depending on the FPS. It was an interesting problem to fix.
Implementing rotating / moving platforms was a challenge due to how the player code handled collisions. However I was able to get it working smoothly with a bit of reworking. Other objects can also be rotated as long as they are a child of the core; i.e. crates, gems, etc.
The red dust is inspired by An Untitled Story (2007), which provides the player with an additional jump if the user presses jump whilst touching it.
I created spinning arrows that launch the player in the direction that the arrow is pointing. This, again, is heavily inspired by An Untitled Story (2007). The speed, launch velocity, and other variables are all configurable in the Inspector.
I have implemented a few forgiving features to increase the user's enjoyment of the game. The arrows will slow down when pointing in the "correct" direction; thus giving the player more leeway to land on the arrow at the right time.
I added boxes that act as portals across the level. They can be used to break up different areas or to reset areas. For example, if the user messes up a section they can try again by using the portal to re-enter the area.
The boxes can only be entered from the top and the player must fall into it. There is still a bit of work that needs to be done to make the portals more smooth.
One of the features that I am most proud of; wall-jumping & wall-sliding allows the player to precisely make jumps between walls. It feels good because I used input buffering and wall-sticking to make it easier for the player to navigate.
My code is inspired by @AleHitti's article on coding imprecise controls for platformers. I also used Super Mario Maker 2 to help me understand how different inputs affect the wall-jumping and sliding - thank you Nintendo!
Simple test player animations implemented to make sure the animator controller state machine functions correctly. I used the Animation editor to create the animations in engine. The player sprite is made up of multiple segments that can be moved independently.
Also a lot of behind the scenes improvements in this version: checkpoints, slippery ice, fixed oneway platform physics, saving gems...
I implemented new systems that allow moving objects and triggering events. I used this to create a small lava-rising section which also includes some falling debris to jump up on.
The triggers can range from being in a particular area, collecting a number of gems, destroying a number of crates, etc. This is a very handy tool to have when designing levels.
I added the new player sprite and created various new animations. The sprite was drawn by my friend who is helping me with the game. The character is cartoony so I created comical animations to go along with it.
I also changed a lot of code behind the scenes to make things run smoother.
I created my own particle system component that allows me to create simple particle effects quickly and easily. I added effects for when the player walks, lands, and slides down a wall. There is also a breaking crate particle and red dust particle.
This component can be improved upon and optimised in the future.