19 January 2016
Developer Profile: QuizTix
Occasionally we have the pleasure of highlighting Corona Developers who are doing great things with Corona SDK.
This week we would like to introduce you to QuixTix, a small London based studio, founded by Ian Masters and Albert Marshall.
QuizTix uses Corona Enterprise to produce a series of quiz games, including a BBC branded edition called QuizTix: BBC Comedy Genius, which lets you pit your wits against comedy fans via leaderboards to become the brains of British comedy.
Here’s what Alan, QuizTix’s star coder, had to say about using Corona SDK to develop their apps.
In 2013, QuizTix was founded with the aim of creating a series of family-friendly themed quiz games. The team all had previous experience using Corona SDK so it was our first choice for QuizTix, because of how easily we can create new content.
So much of the ‘core’ is taken care of for us that we can concentrate on game play which is where we really wanted to be focusing our attention. However we knew that Corona SDK did not have some functionality that we crucially needed (such as offline builds), and so we looked into Corona Enterprise.
Thanks to Corona Enterprise, we have seven QuizTix games out now:
- QuizTix: Pop Music
- QuizTix: Movies
- QuizTix: World Football
- QuizTix: Video Games
- QuizTix: Musical
- QuizTix: BBC Comedy Genius
- QuizTix: International Rugby
We met the BBC at GDC in 2015 (a long way to go to meet someone from London!) and approached them with the idea about the game. The idea of QuizTix has always been to partner with brands to create new versions of QuizTix. We can offer proven game play and exceptional engagement. While the experience is QuizTix, the brand is the real content.
Why Corona Enterprise?
A deliberate decision was made to have a separate app for each theme in order to make each game appeal to people who particularly enjoy that subject rather than just being marketed as a general quiz app.
One of the biggest challenges that this created was that we needed a project structure with a single code base which could be used to create multiple apps, in order to minimize development and testing time.
Each game would contain its own unique questions, artwork and audio but changes to the core game mechanics would be applied to all games. This would allow us to release new games with fresh content at a much faster rate, whilst always keeping the existing games up-to-date with the latest features
The most important functionality we needed was the ability to build all versions of the game with a single command. While it’s a simple enough process to build a single APK / IPA using Corona SDK, it does not have the ability to build two games at once.
Seeing as we currently have seven versions of QuizTix out already and with more on the way, that would mean: Loading one game in the sim, build for iTunes, build for Google Play, build for Amazon. Rinse and repeat six more times!
Corona Enterprise gave us the option to build from the command line. This allows us to create scripts which can build many builds at once, in different configurations (e.g. Google Play builds for all games, iOS+GooglePlay+Amazon builds for a single game). Since the simulator does not get used at all for offline builds, we can continue working while waiting for the builds to complete.
Using Enterprise also allowed us to develop our own plug-ins. This has allowed us to test out many SDKs that we otherwise would not have had access to, which has been essential for monetization/anayltics/etc. QuizTix is targeted at a super casual audience our focus is on monetizing all players via high quality, responsible and largely unobtrusive ads. We have worked hard on finding the best partners to get great fill and eCPM’s.
Keeping the overall file size as low as possible was very important to us, as it can be a significant factor when trying to achieve downloads in markets with lower internet speeds or data caps. To facilitate this, we integrated a number of other tools into our build system, with very little effort required:
TexturePacker – This has a command line implementation so by putting artwork into separate folders in our source folders, we can pack them into single texture images. This allows us to save on memory usage by packing all game characters into a single PNG. Corona already has built-in functions to then use each image from the texture sheet, so it’s a great way to save space.
Tiled – Similarly we use Tiled to create the background for our game, which packs the background into a map in exactly the same way as TexturePacker but allows us to place the background tiles in a nice GUI.
ImageMagick – One of the more time consuming parts of asset creation for us was exporting multiple sizes to account for devices with differing resolutions. While it’s not a huge problem to create a single image, then an @2x and @4x version, when those images then need tweaking and new images need to be made the time quickly adds up. We implemented ImageMagick so that we can just include the highest resolution images in our source folders, and then have ImageMagick create the lower resolution versions.
PNG Compression – Even using TexturePacker, we knew we could reduce the size of our app down further. We use a PNG compression tool called PNGQuant to convert all images from 24bit to 8bit color. This reduces the file size to around 1/3 of its original size (e.g. one image I’ve just picked at random went from 201KB to 72KB). This helped us to get closer to our goal of bringing the file size of each app down to ~20MB. This works for us because our game has a cartoony look, however if your game contains photos then it may not work quite so well.
Audio Compression – like the artwork, we keep full size audio files in our source folders, but copy and process them into the final project folders in order to reduce the file size.
We also made the decision to convert the files to mono, as many mobile devices have a single speaker and so do not benefit from stereo sound files.
Generally we use WAVs as the source file, and then convert to Oggs for Android, and CAF for iOS. OSX has a built in audio conversion tool called afconvert. For Android we downloaded a tool called oggenc.
There are a few more tools we have used alongside Enterprise, separately from our main build script process. Most of these could be used with Corona SDK projects, but are still worth a mention due to how useful they are.
Spine – This has made character animations significantly easier, and they look better than if we had tried to create them in code using transitions.
Git – I cannot emphasize how important good version control is, especially if multiple people are working on the project.
Many people start out by simply duplicating their project folder when they reach a safe point, which is “ok” for a small project with one developer.
Using Git/Mercurial/something similar is fantastic because it allows you to do things like:
- Have 2 people working on different parts of the same file, Git will then work out what changed and attempt to merge both peoples work.
- Go back in time! If you use a nice GUI tool like SourceTree, you can see a long list of all the changes you have committed. This is great because sometimes you know you changed a file, but don’t remember what it looked like before, or when you changed it. You can search back through the file’s history to find what changed.
- *Create ‘branches’ which allows you to say “leave the current project as it is, but create a separate line of changes from this point”. This is handy if you want to test a new library without risking the stable working version of the project for other people.
Amazon S3 – Sometimes we make changes to the game that we do not feel require an update (e.g. fixing a typo), but would still prefer were in the game as soon as possible. We use Amazon S3 to store images and files which contain strings/values/etc which are used in the game. This allows us to fix small issues in the game by updating the S3 files, which are then pulled into the app on startup. Obviously you would need to include a hard-coded copy of these files for times when no internet connection is available.
In terms of limitations, I would say the biggest hurdles we’ve encountered with Enterprise is that you need to have an understanding of how iOS and Android native development works.
The sample projects should help you out a lot on this front, and dare I say that with a bit of playing around everyone should be able to get the basics working in a short time.
Some things may seem confusing at first. For instance, with Enterprise you do not add plug-ins to your build.settings file, you add their files manually and will often need to add details to other files such as AndroidManifest.
However, you’ll quickly realize that this is a small price to pay for the freedom it gives you. Enterprise really is a way of creating native projects that let you use Corona’s Lua libraries to make game creation easier.
We are at the point where we can release new versions quicker each time! Going forward we can only see Enterprise making it easier for us to continue this way.
So if any developers out there are on the fence about whether Enterprise would be useful, for us it’s a no-brainer, but I would recommend re-reading some of the advantages & disadvantages I’ve pointed out. The Corona staff and forum community are always extremely helpful if you need any more guidance.
The players over the seven titles have answered questions more than 30 million times and that’s very attractive to brands looking to find a place in the mind’s of consumers.