Award points in your Corona-created game
In this final section, we’ll complete ghostTouched(), which is the code that’ll be called every time the player successfully taps a ghost object. This code will register the touch event and double-check that the player is at the start of Corona’s multi-step touch sequence.
Once the touch event has been checked and registered, the system will increase the player’s score by one point and remove the ghost object. While we’re writing this score code, we’ll add a line that’ll display the player’s score on screen, so they can keep track of how well they’re doing.
But there’s one more scenario to consider and that’s what’ll happen if a ghost object isn’t touched, but falls off screen. Rather than these objects building up off screen, where they could potentially cause problems, we’ll write some code that deletes any ghost objects that the player can no longer see.
The new volume of Android Tips, Tricks, Apps & Hacks is on sale today
The new volume of Android Tips, Tricks, Apps & Hacks is on sale today!
There is so much more to your Android device than you thought. The Android operating system is filled with possibility and with the right knowledge, you can make sure you get the most out of it. With the right apps, you can turn your phone or tablet into the ultimate entertainment device or even work on the go. You can go even deeper by hacking your Android and turning it into exactly the device you want and need. With Android Tips, Tricks, Apps and Hacks, you can open a whole new world on your mobile device.
On sale here
Learn how to use letterbox scaling and ghost graphics in the user interface of your Corona SDK game
When you’re creating images to use in your app, keep in mind that Android screens come in all shapes and sides. Are your graphics going to display correctly across all these different devices?
In order to help you support multiple screens, Corona provides various scaling options. In this tutorial, we’ll use letterbox as it scales your content to fill the screen while preserving the width and height ratio.
For the best results with letterbox scaling, create a background graphic and a game over graphic that are both 380 x 570. You’ll also need a graphic that represents the falling objects the user needs to tap. We’ll be using a ghost graphic, but you can use whatever image you want.
Could Corona SDK help your mobile game become the next Flappy Bird?
If you’ve spent any time browsing the Google Play store, you’ll have noticed just how popular mobile games are. In fact, many of the best known mobile apps fall into the gaming category.
If you’ve ever fancied trying your hand at creating the next mobile gaming sensation, then you may want to check out Corona SDK. This free software development kit (SDK) makes developing mobile games fairly straightforward and is very beginner-friendly.
In this tutorial, we will show you how to set up Corona SDK. The game you can create will challenge the player to tap as many on-screen objects as possible during a set amount of time. Although simple, this game does show you how to recreate many of the staples of mobile gaming, such as time limits, scores and the classic ‘game over’ screens.
Personalise your Chromecast backdrop with stunning shots from Google and NASA or your own personal photos
Rather than staring at the drab Chromecast background every time you switch on, why not liven things up with some random wallpapers from Google and NASA? Alongside Chromecast’s time and weather information, these images look stunning.
Setting a background for Chromecast is an option that many overlook. Start by opening the app on your phone or tablet, ensuring that Chromecast is switched on and online. Tap the Settings gear.
Use the Amplify app to emulate iOS 9’s new power-saving options on your Android phone
Apple has introduced some new battery-saving features in iOS 9 and it reckons you’ll be able to get an extra hour of life out of the iPhone 6 with the new version of the operating system installed. That sounds pretty impressive, but a lot of the new features (such as a low power mode) have been standard on Android for a couple of years, if not more in some cases. If you want to get even more life out of your battery, then Amplify is a good bet. You’ll need a rooted device and you’ll need to have Xposed Framework installed. If you check both of those boxes, then head to the Google Play Store and download the app to get started.
Once you have downloaded the app, head to the Xposed Framework app and check the box next to Amplify, then reboot your device. Once it starts up again, open the Amplify app itself. It’ll run through a few checks to make sure everything is working as it should.