Type :

Udemy Project

Contributors :

1

End date :

21/01/2023

Project Link :

GitHub Link

Fruit Ninja

Starters

While i was enjoying what I was taught at university, I decided to learn skills on my own as well to grow my skills. I bought Udemy courses to help me in this goal as those were the best option for me. One of the courses I bought made us program a Fruit Ninja clone with Unity, which is where this project comes from. First things first, I had to deal with the assets within the game. I was given blender files for each fruit as well as the bomb. I programmed the class for them as well as prefabs : I gave them a RigidBody 2D as well as a 2D Collider in order to slice them later on. I could now re-use the same fruits over and over again. I also made the code for the bombs in order in for them to stop the game if the user interacts with them. Then, I made a blade which was set on the user's mouse which I got to work with a simple RigidBody 2D / Collider setup and a Trail Renderer to display the blade with a great animation. Thanks to some back-end scripts to handle the game, I already had most of it working.

Fruit Ninja

Spawners

For the user to play the game indefinitely, I needed to implement spawners for the game to be infinite. I made that functionality by using simple GameObjects and a lot of back-end code. Every X amount of frame, a spawner is going to spawn an object and throw it at a random speed. This ensures the user that the game will continue on and on, till he hits a bomb.

Fruit Ninja

Final Result

I now have a Fruit Ninja game that works on all platforms thanks to Unity! It possesses all basics features: a score and a high score, a menu, multiple fruits that all give a different number of points... This project was a really fun one to work on. It taught me a lot about Unity and C#, and definitely makes me want to do more projects.