Mushroom Platformer
Mushroom Platformer
This game was developed for my independent project at the University of Liverpool.
“Magical Mushrooms” is a speedrun-focused 3D platformer game where the player must collect fairies as fast as possible in order to get a high score. In Magical Mushrooms, you play as a mushroom who has been cursed by a mad wizard, giving you the powers to run, jump and use powerful magical abilities. The end goal of the game is to reach the wizard’s tower, but there is an expansive magical forest separating you.
Being a traditional 3D platformer, the movement is comparable to titles such as “Super Mario 64” and “Super Mario Galaxy”. Completing the level as fast as possible is a large focus, drawing inspiration from the ranking system seen in “Jet Set Radio”. The gameplay has a low skill-barrier and a high skill-ceiling, always encouraging the player to improve on their score.
The game should provide a significant amount of challenge at any given point, whether that be learning the controls at the beginning or pushing your skills to the limit in order to develop new techniques and strategies to get through the levels faster.
To keep the game challenging, during development I consistently playtested the level with every iteration, ensuring that the difficulty curve was fair and engaging. I would get friends and family members to play my game and contribute feedback if they had any, which was crucial in creating the tutorial level, as well as the first open level.
The player should always feel entertained when playing through a level, the character controls should feel responsive and the player will feel satisfied after completing a level quickly.
In order to grant players gratification for completing objectives, I implemented a satisfying sound effect for collecting a swarm of fairies. The controls, animations, art style, level design and sound design were all critical in delivering a satisfying player experience.
The game will have lots of replay value as players should feel encouraged to retry levels to improve their movement precision, achieve faster times and earn higher scores on the leaderboard.
In order to make the players strive to improve their score, I opted to translate the number score into a letter rank, making it easier for players to compare themselves against others. To achieve the S rank, the player must use creative routing, have extremely precise movement and learn to manage and combine their power ups in unique ways not taught by the tutorial.
Overall, the player experience goals are centered around challenging players to master the movement mechanics, while also providing a fun and immersive experience that keeps them engaged and motivated to keep improving their score.
The goals were implemented to a high standard, resulting in unique, competitive and engaging gameplay.
When designing the player character, I wanted them to be memorable by having a distinct silhouette, colour scheme and art style. After creating various designs for the main character, I settled with a creepy mushroom with one eye, long arms and stubby legs. I decided to make the mushroom cap a focal point as it would change colours depending on the power-ups collected by the player. The large eye would help players with aligning the character for precise jumps, similar to how players can use Mario’s nose to find the optimal jumping angle. The long arms allow the animations to clearly indicate the movement state of the character, such as falling, wall sliding or sprinting.
The character was 3D modelled inside of ‘Blender 3D’ using a subdivided cube as the base, insetting and extruding it to create the base shape for the mesh. Then, details were added such as fingers on the hands and the eyeball and eyelid. Extra geometry was added on the elbows and knees to allow the mesh to deform smoothly when animated. After retopologising the model, seams were added wherever necessary and a manual UV map was created in preparation for texture painting.
Using Blender’s texture painting tools, I manually created a texture for the main character so I could add as much detail as I needed. Small details such as muddy hands and feet, shading under the mushroom cap, stretch marks around the limbs and dark patches on the knees and elbows gave the character a lot of personality and depth.
The cap material was created using Blender’s node system, which allowed me to create a procedural material for the mushroom cap. The main benefit of using a procedural system is that I can create multiple variations of the same material for when the player has the blue spore powerup, the pink spore powerup, both powerups and none. Each of these separate states were baked as .png files, allowing for me to change between them during gameplay.
After finalising the details, an armature with IK bones was added to the model roughly in the shape of where the character’s “bones” would be. The weights of each bone were slightly modified using weight painting in order to make sure the movement did not deform any incorrect parts of the mesh.
The character was animated manually using keyframes, making use of inverse kinematics to ensure the movement is natural. A total of 9 looping player animations were created, so each in-game action has a corresponding and fitting animation.
After the character was created and polished in Blender, the file was exported as an .fbx and imported into Unreal Engine 5. In UE5, I created a character blueprint which is where all of the scripting for the player is written. The Blueprints system allowed me to use visual scripting by connecting nodes rather than typing code directly in C++.
The “input” graph consists of 7 node groups, each taking a different player input and executing necessary code. For example, when the player holds “Shift”, the character’s “Max Walk Speed” variable will be multiplied by a “Sprint Speed Offset” variable, resulting in the character moving faster until the key is released.
The animation blueprint controls which animation will be playing at any given moment, which is determined using variables such as “Move Speed”, “Is in air” and “Is in wall slide”.
Some animations use “Blend spaces”, which slowly transition between walking and sprinting
The majority of the player’s logic is stored in the “Event Graph”, including the code executed once the player spawns in, the code executed each frame as well as custom events such as “Wall slide velocity reset”. The event graph was scripted in an ad-hoc manner, meaning logic was added when needed, which resulted in a large portion of uncommented code. To make an attempt at organising the code, some custom functions were created such as “Jump check” and “Reset jump velocity”, which can be called upon at any part of the event graph.
Every piece of code was written from scratch as I opted to not use any of Unreal Engine’s project templates in order to have more control over the player’s movement.
Spores give the player different abilities when picked up, depending on the colour of the spore. The blue spore allows the player to summon a jump pad, and the pink spore lets the player dash. Both spores were modelled in Blender and procedurally textured with Blender’s node system.
Each spore having a visually distinct texture, shape and animation allows the player to quickly identify which spore gives which ability. The blueprint for the spore consists of the skeletal mesh and the collision sphere, which grants the player an ability once they overlap. Both coloured spores use a single blueprint, allowing the colour and function of the spore can be decided at runtime, opening up the possibility of adding more coloured spores.
The primary objective of the game is to collect five fairy swarms in as little time as possible. The fairy texture was created in “Krita”, along with a world position offset map which is applied to the material to make the wings displace. The fairies follow a cascade particle system, which spawns fairies inside a sphere volume with a random velocity, then orbits them around a point. A dynamic parameter controls the rate at which the wings flap.
The blueprint also includes a blue spotlight above the fairies, which makes them visually pop out of the orange and brown environment. A ring of mushrooms and an attenuating sound effect ensures the player will be able to locate and collect the fairies.
To guide the player through the tutorial while simultaneously lighting it up, I created glowing mushrooms in Blender by sculpting a subdivided cube, then texture painting both diffuse and emission maps to create the effect of light pouring out of the mushroom spots. The model was then exported into Unreal engine with 3 different coloured variations.
In order to indicate which objects are breakable using the dash ability, I created decals which quickly indicate to the player that it is a breakable surface. Apart from some ground mushrooms, this is the only red material in the game which makes it visually stand out from the environment, as well as creating an association in the player’s mind with red paint and destructible objects.
I modelled, UV mapped and procedurally textured 16 modular assets, which are used to create the ruins section of the map. These assets include walls, floors, stairs, pillars, debris and statues, which create a versatile and exciting environment to traverse. The 3D models, diffuse maps and normal maps were baked and imported into unreal engine, where the collision was added to allow the player to jump through the archways.
Covering the level is a canopy of leaves, which was created by cutting out individual leaves from a photo of a leaf pile using Krita, then editing them back into a pile with a transparent background. This image was then imported into Blender and placed on a subdivided sculpted plane. In UE5, the material was given transparency and placed above the level, allowing sunlight to seep through. This combined with 2D images of trees placed around the level makes the player feel surrounded by a closed off, dense forest.
Pairing this canopy with a particle system that spawns individual leaves with a slight orbit, randomised rotation and velocity above the player creates a dynamic, natural atmosphere.
Using Blender, I created a flat mushroom which acts as a jump pad, launching the player in the facing direction upon collision. The texture was hand-painted in Blender and imported into UE5 where collision and blueprints were added. The jump pad can be spawned by the player with a blue spore.
Using UE5’s ‘Chaos’ system and existing wooden plank assets from ‘Sketchfab’, I created a blueprint that launches fragments of the mesh forwards when the player breaks a barrier using their dash ability.
Using two custom blueprints, if a player falls off of the tutorial level, they will respawn at the last checkpoint hitbox they collided with. This prevents players from having to repeat sections of the tutorial once they fall off. The same blueprints are used to contain the player in Level 1, with checkpoints around the inner edge of large death boxes so the player will teleport closer to the middle of the map.
The HUD (Heads Up Display) shows a custom timer I created with blueprints, as well as the player’s rank once they complete the level.
Similar to the destructible planks, if the player dashes into the tree, it will activate. Once activated, the mesh will slowly rotate and fall over onto its side, allowing the player to climb the log onto the roof of a nearby structure and collect the fairies.
Using giant rocks, stalactites and planks from ‘Sketchfab’, the tutorial starts players off in a dimly lit cave. The player spawns facing the cave exit and is forced to traverse the broken wooden walkway to escape.
As more mechanics are introduced, the challenge increases slightly. The learning curve is not very steep as the player is given as much time as they require to overcome the tutorial.
The player is then given the ability to spawn a jump pad mushroom, which is required to scale the wall in front of them. Small details such as the arrow facing up helps to show the player the route.
Players are then met with a barrier which blocks them off right before the cave exit. The player must use the given dash ability to break the barrier to progress any further.
In order to progress, the player must prove that they know how to jump. This “show, don’t tell” method is essential as players would not be able to complete level one if they can’t beat the tutorial.
Before the player is given the ability to spawn mushrooms, they must prove they understand how they function and interact with the player. Once the player can jump on a mushroom vertically, they are shown how it can launch them horizontally.
Advancing further in the tutorial teaches the player how to wall jump to gain height. Once the player reaches the upper platform, wall jumps are then used to jump over a gap.
After overcoming the final barrier, the player is introduced to the fairies and given a sneak peak of the first level. Once the player collects the fairies, the timer resets to zero and the player is put into level one.
Level one begins in a cave exit, taking place right after the tutorial. The player is shown two potential directions to go as they know they need to collect 5 fairy swarms. Starting off in complete darkness puts the focus on the open level, which contrasts the previous linear tutorial.
To create the first level, I used Unreal Engine’s landscaping tool to quickly generate geometry to place my premade assets on. I combined 3 materials from ‘Quixel Bridge’ to create a landscape material, which can be painted onto the landscape with a brush, making the process of adding rock, dirt and grass extremely efficient. Similarly, I created a foliage brush tool to add grass into the level by painting it onto my landscape. This came with some performance issues but with some optimisation, the game runs at a smooth 60 frames per second.
The first level greets players with branching paths in all directions and the fairy swarms can be collected in any order. This grants the player a lot of freedom and creativity as it is their objective to figure out the fastest route. At first, the player will be overwhelmed with the amount of choice, but as they venture out of the cave they will put the pieces together and form their route to their first fairy swarm. 4 out of 5 swarms give the player a vantage point, showing them the rough direction of where to go next.
Using the environment light mixer window in Unreal Engine, I added a point light source, a sky light, an atmosphere and exponential height fog. This fog is what allowed me to create beams of blue light above the fairy swarms to help the player locate them. I was able to create the effect of sunlight seeping through the canopy, leaving shadows on the floor, further selling the illusion of the player being in a realistic, closed off forest.
During gameplay, each action emits a suitable sound effect. Every sound effect was downloaded from ‘FreeSound’ and was under a CC0 licence. Using UE5’s ‘Sound Cues’ I created a randomised footstep sound which plays each time the foot comes into contact with the ground. This sound cue was applied with varying movement speeds in mind, meaning the time in between steps will decrease when the player’s speed increases.
Project Management