During the later half of my second year of university, one of my assignments was to complete 5 "hyper casual" mobile games. I had previously started to create an app using Unity and so was excited to further my knowledge.
Coding for mobile is very similar to programming for desktop, but the key difference is with inputs, such as touches and joysticks. I also had to stay mindful of optimising my code so that the games would run smoothly for a mobile device.
Most of my mobile games use touch or a joystick to control the player. For joysticks I found a free asset on the asset store that can be used similarly to any controller joystick by accessing it's axis for x and y. This was especially useful in my "twin-stick shooter" game involving bug-like aliens attacking generators that need to be defended.
I have payed close attention to optimisation during these projects. Through doing this I have learnt how to use scriptable objects in unity, and also learnt about inheritance scripts. Both help to limit the amount of "mono-behaviour" scripts in the scene at any one time and both allow for adaptable objects, mainly in use for different types of enemies.
Comments