This project was developed for the Fundamentos del Desarrollo de Videojuegos subject. The main objective of the game I developed is to guide a boat to an island while defeating UFOs, destroying rocks, and avoiding lightning bolts that try to sink the ship.
The game was developed in Unity and has many features studied in the subject, like:
Scrolling: the camera is mostly stationary, so, in order to give the player a sense of automatic advance, the background is constantly moving to the left. In order to achieve this, I created a constant scrolling by using two equal backgrounds that ensure that the camera never sees a blank space.
Parallax effect: I created a parallax effect using two layers for the sea and the clouds in order to simulate depth in the scene, even if it's a 2D scene.
Sprites: the majority of the sprites and animations used in the project were made by me in Piskel, an online tool. The only exception is the night sky background, which I took from OpenGameArt (credits to Justin Dalessandro(ColdOneK)). The clouds and the sea were painted using a sprite pallette generated in Piskel, too.
Physics: in the game, I use two physics systems from Unity's engine, apart from the classic RigidBodies. The first one is the BuoyancyEffector, which allows the boat to float in the sea, and the second one is the AreaEffector, which is used to simulate a strong wind that is able to send the boat flying backwards.
UI: the game's UI is made of three elements:
A healthbar that is displayed above the ship and shows how much health it has left.
A progress bar that displays how much distance is left to be traversed until the boat reaches the island.
Two messages that say "You Won" and "You Lost" that appear when the player reaches the island, or when the boat is sunk, respectively.
Pooling: there are five elements in the scene that are constantly recycled, which are the lightning bolts, the rocks, the UFOs, the cannon balls, and the UFO lasers. In order to improve the game's performance, the game creates some instances of these objects when the scene is loaded, and adds them to five different pools, one for each type of object. If a GameObject needs one of these elements, it gets it from its pool, and they are returned whenever they must. For example, cannon balls and lasers are returned to the pool when they collide with something, but an UFO will only go back to the pool if it's destroyed, or if it flees.
Cinemachine effects: as I said before, this game's background scroll is what gives the player the sensation of advance. For this reason, the camera only moves a bit when the player goes too much to the right or to the left. In order to do this, the boat is followed by a Cinemachine camera that is confined to an area with very little freedom of movement. However, I have added an Cinemachine effect that shakes the camera if the player collides with something.
Animations: this game has some simple animations, such as the cannon's firing animation, and the lightning bolt's.
Events: each time a UFO is destroyed by a cannon ball, an event is sent to the game's manager class, which increases a counter as a response to that event. After five UFOs have been defeated, said class turns on the game's hard move, which enables the wind and makes the UFOs spawn more frequently.
In the following video, I give a brief explanation of the game, and I show some of these features, too: