platformer gameplay screenshot

Platformer Game

A platformer game developed in Unity, showcasing skills in C# scripting, 2D tilemap level design, and camera control. The game features a player character that can jump, run, and collect items while avoiding enemies powered by state machine AI and A* pathfinding. Multiple levels were created using Unity's tilemap system, with event systems and multiple input sources for smooth gameplay. Extensive playtesting, optimization, and problem solving ensured a polished experience.

Technologies Used

Platformer home screen
Tutorial level
Level 1
Level 1 overview
Level 2
Level 2 overview
Level 3
Level 3 overview
Level 4
Home level of Platformer game
Tutorial/debug level for Platformer
Level 1 for Platformer
Overview of Level 1 for Platformer
demo of Level 1 for Platformer
Level 2 for Platformer
Overview of Level 2 for Platformer
demo of Level 2 for Platformer
Level 3 for Platformer
Overview of Level 3 for Platformer
demo of Level 3 for Platformer
Level 4 for Platformer
demo of Level 4 for Platformer

Having trouble loading the game? Play directly on Itch.io

Challenges Faced

During development, I encountered several technical and design challenges that tested my problem-solving skills and pushed me to learn new concepts.

🧠

A* pathfinding performance

The A* pathfinding algorithm was causing performance issues when there were too many enemies on screen. I had to optimize the algorithm by switching to a heap rather than individual lists for open and closed nodes, which significantly improved performance. This increased my performance reducing stuttering.

🐻

Getting Bear to change heights

Could not get the bear to naturally change height without floating using A* apathfinding. So i switched over to node based patrolling to get a smoother motion. This allowed the bear to move between nodes and change height naturally without as much floating.

πŸ—ΊοΈ

Level design

I struggled with creating engaging and unique levels that focus on diffrent aspects of the game. I had to iterate on the level design multiple times to ensure that each level was fun and challenging. I also had to balance the difficulty of the levels to ensure that they were not too easy or too hard.

🎁

Pickups are Collecting when not in range

I never found out why this hapens, after checking collision boxes and changing detection type my fix for this was changing the pickups to a keinematic object

Reflections

🧩

Breaking down scripts into smaller components

As I progressed through the project, I found my player movement script handled more than it should have like audio and collisions, I should have separated these into smaller scripts to reduce complexity.

⬇️

Directional collision direction

I used collision points and height to determine the direction of the collision, I found I over-engineered this as I could have just checked the player's height in relation to the enemy and if it had a downward movement.

πŸ€–

State machine for enemy AI

I used a state machine to manage the enemy AI, allowing swaping of behaviours on the fly. This made it easier to add new enemy types and behaviours without having to rewrite the entire AI system.

🧭

A* Pathfinding

I implemented this to allow a more dynamic enemy movement system, allowing enemies to navigate around obstacles and chase the player. This made the game more challenging and engaging rather than just having enemies move in a straight line.

πŸ§ͺ

Debug Level

I created a debug/intro level where i would introduicce the player to the game mechanics and controls. This allowed me to test the game mechanics and ensure that they were working as intended in a controlled enviroment before adding them to the main game.

πŸ—ΊοΈ

2D tilesmap to create the levels

I used a 2D tilesmap to create the levels, allowing for more efficient level design and easier iteration on level layouts.

πŸ•ΉοΈ

Importance of playtesting

I had friends and family playtest, during which I took notes of struggles and glitches they encountered. This helped me identify areas of the game that needed improvement that I may have missed. From small things like signs that dont do anything to big oversights like lack of audio.

Future Improvements

If I revisited this project, I would make my own assets to give it a more unique feel. I would also add more levels and powerups to make the game more engaging. Additionally, I would implement a timer to track the speed the player completes levels and displays it on the screen and add a leaderboard to enhance the competitive aspect of the game.