The little squirrel is off on an adventure! Collect diamonds and earn points! But beware of mutant ants!

This project was created to study Unity and C# programming. This game is a prototype whose future is uncertain. All assets were taken from available learning materials and from the Unity Asset Store.

In this prototype, I used Unity components such as Animator (for animations) and Tilemap (to create the level). The main character has Idle, Walk, Jump, Death, and Crouch animations. The game's title, score, lives, "Game Over", "Restart", and "Start" are all displayed on a Canvas. To make the buttons work I used the Event System.

During the development of this game prototype, I applied the following OOP principles:

  1. Encapsulation: For example, in the Collectibles, Enemy, and GameManager classes, variables and methods are grouped by functionality. Some fields are marked as private, and access to them is provided through public methods such as UpdateScore() and UpdateLives().   
  2. Polymorphism: Methods with the same name (Start, Update, OnTriggerEnter2D) are implemented in different classes, enabling behavior customization through Unity’s built-in method overriding system.
  3. Abstraction: Each class is responsible for a specific part of the game logic. 
    1. GameManager controls game state, score, and lives. 
    2. Collectibles handles the collectible objects. 
    3. Enemy manages enemy behavior. 
    4. MovingPlatform controls moving platforms. 
    5. StartGame processes the start button interaction.

 Inheritance: Not directly implemented in this version, but the project structure allows for easy extension of base classes in the future.

One of the core game mechanics is collecting diamonds (Collectibles). There are two types of diamonds: Small diamonds give 1 point and Large diamonds give 5 points. This functionality is implemented via OnTriggerEnter2D, and the collectible object is destroyed upon collection.

I personally added moving platforms. The MovingPlatform object moves between two points — posA and posB. If the player steps onto the platform, they become its child object, so they move along with it.

There are also enemies (mutant ants) in the game. If they touch the player, Player loses a life (handled through GameManager.UpdateLives()). The enemy patrols its platform and changes direction when hitting a wall.

Here are links to my other projects:

  1. https://play.unity.com/en/games/a5547c1d-6eca-4130-b242-7ba4f4e9887e/solar-siste...   (Solar Sistem)
  2. https://play.unity.com/en/games/39337a01-d2c9-4235-9d17-7254744e0bcc/prototype-1...   (Car Game, Prototype 1B One player)
  3. https://play.unity.com/en/games/11e77306-4dfb-4f39-b14d-ca9f6cc90274/prototype-1...   (Car Game, Prototype 1B multiplayer)
  4. https://play.unity.com/en/games/8c42c9da-9fb9-4dad-be79-d6e3e2e44f83/plane-chall...   (Lidmašīnas programēšana, Plane Challenge 1)
  5. https://play.unity.com/en/games/b17d488d-7714-4151-bcca-330079860b4a/feed-the-an...   (Feed the Animals)
  6. https://play.unity.com/en/games/4ec63b7b-9adc-4aea-84cb-56427419a2a9/play-fetch-...   (Play Fetch Challenge 2)
  7. https://play.unity.com/en/games/9dc4c134-914c-4328-9cef-87c6cfa9c0df/cube   (Mod the Cube)
  8. https://play.unity.com/en/games/665abf59-4e35-473d-9dbf-854b9fd8163c/prototype-3   (Run and Jump)
  9. https://play.unity.com/en/games/968b5e07-140b-4e18-9d6a-ac439cc7876b/baloon   (Baloon, Bomb and Bolleans Challenge 3)
  10. https://play.unity.com/en/games/980454da-899b-4f23-a82b-1e9b8b4d146b/sumo-batlle   (Sumo Battle)
  11. https://play.unity.com/en/games/22cf88b1-1e45-41b9-a77e-8109bc8dcf6e/sumo-battle...   (Sumo Battle Play Fetch Challenge 4)
  12. https://play.unity.com/en/games/f895e627-ccae-48f9-b19b-d71752fe3fa1/quick-click (Quick Click)
  13. https://play.unity.com/en/games/7fd37fb7-9c7d-472d-9ed3-1d9cfd2626f3/challenge-5  (Whack a food Challenge 5)
  14. https://play.unity.com/en/games/5a734478-5e17-4f2b-8c37-7cc0573052de/counting-pr... (Counting Prototype)
  15. https://play.unity.com/en/games/bc88ecd8-9be8-4b98-b9b3-43ab1daf101e/challengeer... (Error Project Challenge)
Updated 1 day ago
Published 10 days ago
StatusPrototype
PlatformsHTML5
AuthorJulyVas
GenreAdventure, Platformer
Made withUnity
TagsPixel Art

Leave a comment

Log in with itch.io to leave a comment.