Flying Frog

This project was made with the assignment to implement the theme “future dream”. Something I thought that would be more interresting was to not limit myself to human dreams. And what is better than a human, a frog. Frogs are simpleminded creatures so what is something they would want. They are always limited to reach flies within their reach so what if they could reach further so in other words closer to the flies in the air. By being able to fly the frog could be able to reach them.

The game obviously doesn’t start with the frog being able to fly, so he still has to hop around. With that in mind the main gameplay of this game is a platformer for the frog to reach his goal. With his first one being to reach bats that live in a cave in order to use them to fly.

I wanted to make this game have a amazing forest enviroment, which was quite challenging since I never made one before. So I researched basic foliage and plant to fill up the enviroment. I also researched different ways to make trees look good in a stylized manner. To enhance the enviroment I also made some godray particles to make it glow more, and falling leaves to make it more lively.

Because this was an assignment I had limited time to work on this. I am satisfied with how it turned out but if I had more time I would fill up the enviroment more to make it even more lively.

Movement + Character Physics

Something I like to keep doing is making my own character physics for each project I make. That also included this one. By making it yourself you have a lot more freedome of how you want it to funcion.

The way I approuched this was the same as I always do. I first add a velocity Vector3 that is damped back towards 0. The speed this is damped is changed by a boolen if the character is in air or not. After that I add gravity. While also adding a value to increase gravity when the player is falling downwards, that way it will feel less floaty.

After that the real challenge begins, detecting the world to change the velocity. I first added a way to detect the floor. I do this by overlapping a sphere under the player that detects colliders that are in the given layermask. I then also shoot down a raycast to get the height the player would be standing on.

The walls are a bit more tricky since when you walk towards the wall on an angle you want to slide past it instead of just stopping. The way I handled this was by first overlapping a box around the player to get all the walls it will collide with. I then get the closest point on the collider to see where it is around the player. That way I can use a Vector3.Dot to check if the wall is in the same direction I want to move towards. When it is in the same way I can then substract the direction the wall is in multiplied by the players total speed and Dot value.

Then the physics are done and I can start on the movement script that interact with the velocity value of the physics.

 

Art Assets of the project