Summary

As every game has its own form of rules, it often results in a unique type of input interface for the player to send input to. In our case, you learned that for a mobile, simple is better, which is why we will only use a system that gets swipes and taps.

In more complex games, such as those made for PC or consoles, the input can become a much bigger project because there are more options given to the player via a keyboard or controller. The one thing that will stay the same regardless of the game you are creating is that the input system has to cater to the game being made. If you try to make an overly complex input system for a simple game or a simple input system for a complex game, the player will often find trouble when trying to play.

Unity also offers another type of input called Gyroscope. It is a method of taking the tilt of the device and translating it into movement. Popular top-down games, such as those who have a ball, often use this type of input to simulate the surface of a tabletop, so as you rotate the device around, the orientation of the table will shift, allowing the ball to roll in the direction of the slope a tilted table would represent.

Another example of Gyroscope is used in racing games. You can tilt the device (such as a steering wheel) and the vehicle will turn in the direction you will turn the device.

In the next chapter, we will create the character class. This will receive the input from the player input class to move on the screen. You will be able to collide and touch Game Objects in the world.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset