Finished Game
https://flicventure.itch.io/a-little-bird-adventure
I based my platformer game on a game I coded in college, about 2 years ago, using construct 3. The game followed a small bird trying to eat as many seeds as possible before he runs out of life by touching obstacles.





For the level design, I went with this. As, I want the gameplay to be the play moving around one location in a nonlinear way, rather than there being a set route to collect seeds.
I thought it presented different challenges and routes, as well as a cave area for a change in environment. if I developed it further I may add more different blocks and make it bigger, but I like the rough idea it has right now.

Now, to focus on the mechanics, first, we have the movement and jumping.


This is the code for the jumping. from the top it contains code running the physics, sound effects, animation, actually responding to the key press, as well as the double jump code, preventing infinite jumping.
This is the code for movement, from the top it includes rigidbody (making it obey physics), sound effects, animation, rendering, making sure the movement is entirely horizontal at the correct speed and making sure the sprite is facing the correct way.

Here is the code for spikes, this is effectively saying if the player comes in contact with the spikes they will lose and the game will restart.
_
_
_
_


Here is the code for the game controller and the music. These are both very simple bits of code but really help the game. The Game controller allows people to leave the game and the game to restart. While the music code adds in the background noise and helps the game’s aesthetic and to make it more enjoyable, as noise can help people focus on it.

Finally, the seed code proved very challenging as it’s not a code with a direct tutorial but I wanted it to be a core mechanic of the game. I started by using the code from the space invader’s tutorial for the bullet but replaced the bullet with the player. After having some issues, due to the prefabs of the seed getting mixed up, it was technically working BUT, we were confronted with 2 issues.
the first issue was the seed would sometimes duplicate meaning they’d be two seeds, this was just a timing issue with sometimes the seed being deleted and the seed respawning not happening in the exact same millisecond so it’d spawn a second seed by accident, to prevent this we added a:
‘ yield return new WaitForSeconds(0.1f) ‘. This meant it waited for a little bit after the seed was destroyed before respawning which stopped the issue.
the second issue was the seed would often spawn inside platforms. To stop this we created several invisible objects and scattered them around the map, so then the seed would spawn at one of these objects randomly instead of anywhere in the map.
Leave a Reply