Day 12: Device Controls
Development time: 1 hour
Today the device controls needed to be fixed. I had previously used the gyroscope for control in the GameDev Journey game I made for MeatlyJam, but I wasn't happy with the gyroscope drift. The controls didn't feel right.
I opened a few of the default Corona sample projects until I found Shape Tumbler and saw that accelerometer events should do the trick. I added the accelerometer code and tested it on device, and I discovered that the accelerometer Y axis was the only one I should need for back and forth ship movement. I also found that the ship was moving too quickly on device when compared to the precision of the keyboard, so I added a check that slows ship movement when the game is running on device. I also added a transparent rectangle over the entire screen that will capture touch events and cause the ship to fire.
Now the device controls are fairly easy: tile left and right to move, tap to fire.
Next: Day 13
Get Asteroid Blasteroid
Asteroid Blasteroid
Simple shmup with a space theme
Status | Released |
Author | Prairiewest |
Genre | Shooter |
Tags | android, corona, Game Jam, ios, Shoot 'Em Up, Space |
Languages | English |
More posts
- Post Project ThoughtsSep 28, 2017
- Day 13: Control ChoiceSep 26, 2017
- Day 11: Enemy Behaviours, Shields, CreditsSep 25, 2017
- Day 10: High Score NamesSep 25, 2017
- Day 9: Adding EnemiesSep 25, 2017
- Day 8: Animations and UISep 25, 2017
- Day 7: Energy CrystalsSep 25, 2017
- Day 6: Audio, Energy BarSep 25, 2017
- Day 5: Explosions, Asteroid Size, ControlsSep 25, 2017
Leave a comment
Log in with itch.io to leave a comment.