For this section, we are going to use the iPhone's accelerometer to move our player back and forth.
0
.90
100
Everything else can remain the same.
270
. Left
and the other Right
, very simple. 240
and Height 320
. Now, let's create a new rule and change it to Actor receives event | touch | is | pressed.The settings are shown in the following screenshot:
This will hide the actor as soon as we hit play.
Counter-Clockwise
200
game.Right
, and change the Rotate direction to Clockwise
, it's that easy!In this section, we looked at making our player move using the device's accelerometer. Then, we set up two Booleans that when triggered (or turned to true) made our player rotate left and right accordingly.
That's it for the iPhone controls! Now, we are done with the main development of the game; all you have to do from here is finish the rest of the levels.
Why not try out your own type of controls, such as two thumb sticks to control and rotate the player. Not sure how to do that? Why not take a look at the Official Cross-Platform Controller Template in the new section of projects, examine the behaviors and give it a try.
The two thumb stick controller looks something similar to the previous screenshot; it makes the gameplay much better. Some people don't like accelerometer controls, so why not give the player a choice at the beginning of the game to select accelerometer or touch controls? This would be done with a simple boolean attribute that will be checked through the whole game; if the Boolean is true, use tilt controls, if it's false, use touch controls. It's simple!
Now that we are done with developing the game (in terms of gameplay), in the next chapter we will be setting up the player leaderboards, testing the game on our devices, preparing the game for the App Store, and then finally deploying it for the App Store! This is where the fun begins! You are getting closer and closer to making money on your own creation. Isn't it exciting? Once you see your creation on the App Store, you are going to be so excited and then you'll see the reviews coming in, and most importantly the paychecks!
a. Add in a rule that constantly sets the player's speed at 0
b. In the Actors attributes under Physics uncheck Moveable
c. Set the player's maximum speed to 0
d. None of the above
a. True
b. False
a. You can't
b. Add a second rule into the current rule
c. Click the + button inside of the rule's condition
d. None of the above
18.221.165.115