Tuesday, December 22, 2015

Jumping in 2D with Touch Control

Now I have the game working on the Kindle in a much more controllable fashion for the 3D scenes. I started to play the game a bit more to see what's next on the 'need to fix' list.

First up was the fact that the quest buttons were not only too small, but also the click action was not actually set up (it used to be before I moved the GameObject buttons). This was easy enough as I re-hooked them up in a few minutes. Only when testing it I realized just how hard the buttons were to touch on my Kindle. So I enlarged the buttons by doubling the vertical size and now they are much more touchable. YAY!

Second was the more interesting job in several ways. I discovered when trying to play the 2D screens that the control from the 3D scenes just wasn't really very useful. I am using a Click 2 Move in the 3D scenes, so wherever you clicked the game remembers that and moves your Rabbit to that location.
 To fix this I simply made it a live touching control. So it only moves the Rabbit when the screen is being touched. This was a great move and allowed me to play the Gem Cave game scene with some good control.

Next up was the fact that my 2D scenes need you to be able to jump, and jump with some control.

At first I considered doing a double click to make a jump. Only this wasn't working very well and so I went with my second idea. This is denoted in the picture above. I made it so a relative position will control if the player jumps or not. In this case I have drawn arrows to show what happens in the quadrants that the mouse can be in. So once the vertical distance is above the horizontal distance, then you jump, but also only if you are far enough away from the Rabbit to make it work. It was important to have this dead zone for the jumping, as it was a massive jump fest when trying to control the player.

Now onto the next problem, whatever that is :)

G'night
Da Voodoochief

No comments:

Post a Comment