About the project
In this project I worked on a game that I want to release on Android and iOS. I can't share a github link because the project is private and still in development.
I have many ideas to add into the game, such as power-ups and multiplayer.
The goal of the game is to get to the end of the level and avoid obstacles by moving the phone.
In this project I worked on the parts below.
Player Movement
The player always moves forward. The player can steer by tilting the phone using the accelerometer sensor in the phone. I change the x velocity to the acceleration on the x axis times the velocity every fixed frame.
Cosmetics Structure
With the cosmetics items in the game I've made a handy way to easily add new items. Items are easily adjustable in the editor using scriptable objects. In the base items I use an abstract class. Each type of item must know how to apply itself on the player with the abstract function Apply. The cosmetics applier script goes through all selected items at the correct priority and calls all Apply functions.
Database
In this project I planned to manage accounts with Google Firebase. I devised a data structure and security rules for the Google Firebase in advance. The intention is that the player can also play offline, but that progress is still saved in the online database. For example, it checks whether the data on the local device is newer than what the data is on the database. If the local data is not newer, the local data will be overwritten with the data from the database.