Putting the finishing touch
While our game has all the features that we wanted it to have, there are still little things we can add in order to give our game a better appeal. While not mandatory, these improvements are essential when developing world-class applications. Let's go over them quickly.
The user is touching the V-Pad, but where exactly?
While it is true that we give some visual feedback when the user touches the game controller, there is no way for our user to know where exactly he or she pressed the controller. To achieve this, we will be adding a visual indicator that basically appears at the exact coordinates of the touch events.
For this, we will use a small, transparent image with a small particle effect on it, so that it is still somewhat translucent when displayed. We will create a new sprite using the createSprite
function and by passing our image path as a parameter:
var vpad_nav = quicktigame2d.createSprite({ image:'assets/particle.png' });
Since we want this image to...