In 2018 I released a mobile app named Tappy Easter. In 2019 I released an update. Well, not really an update, more of a complete rewrite. Version 1.0 of Tappy Easter was written in C# using Unity. Version 2.0 is written in Lua using CoronaSDK.
This article will document my experience writing the same app using two different languages in two different game engines, and will cover the great and not-so-great of each.
I have been using CoronaSDK since 2012 and have written several apps currently on the iOS and Android play stores. Some time in 2016 I picked up Unity since I wanted to try my hand at a 3D game. I spent a lot of time learning Unity, developing games for game jams, but I wanted to release something to the app store. Even though it was a 2D game, I decided to create Tappy Easter using Unity as a good test case.
The game’s layout is fairly simple: a title screen, a level select screen, and the game screen, and some additional pop-ups and menus to move between the game scenes.
The game scene consists of a series of Easter baskets that are tapped to move a colored egg. The controls are quite standard and very simple from a development perspective.
The level select screen is a bit more complex… it consists of 20 level buttons on two panels. The user can scroll between two panels and can only select levels that have been unlocked. In this scene, the 20 level buttons are built using either a locked or unlocked graphic and if the level is unlocked and previously played, the number of stars that were awarded are also displayed.
Development took approximately four months, and it went very well. The Unity interface makes it easy to lay out your game screens, and I like using C#. Unity UI development is awesome, and the text features of TextMesh Pro give the game extra polish.
In addition to some assets I previously purchased, I also decided to purchase a couple of assets to make development a bit easier for this game. The code I wrote for swiping and tapping screen items was not really working as well as I wanted, so I purchased an asset to handle the mobile gestures. I also purchased an asset to simplify other features found in mobile games such as game services, advertisements, and rating systems. Since these features are platform dependent, using an asset to mange this was a no-brainer.
Development was a breeze… no issues with coding or screen design. It was now time to test on my devices and upload to the app stores.
Time To Compile v1.0
It felt like I spent more time getting the app to compile than I did to develop it, and this was becoming more and more frustrating.
You would think that adding Google Play and Admob would be easy since they are both Google products, but this was an exercise I never want to go through again. These libraries seem to be incompatible with each other since each library includes older versions of files that the other library needs. This caused so many incompatibility issues. After several weeks of research into the issue, it seems trial and error is the only way to get this resolved. Finally, I could get the app to compile and run under Android, but I am not 100% sure how I did it or whether I can do it again.
Now on to the iOS version. I imported the Xcode project generated by Unity which resulted in several hundred “warning” messages and some errors. Reading through tons of support messages, it appears that 200+ warnings can be ignored, but I don’t feel ignoring that many warnings is a great solution. Admob errors were also fussy, and again, I am not sure how I overcame the errors, but I got to a point where it compiled and ads were being displayed.
After more days than I can remember, I now have a working Android and iOS build, so time to put them on the app store!
Working On The Update
A few weeks later, I wanted to tweak a few things and put out an update which seemed a bit more difficult than expected.
I updated all my plugins, including Admob and Google Play (I had to due to some required Google changes), and again there were errors caused by file incompatibilities. This time, no matter what I did, I could not get these 2 plugins to play nice together.
What I also found interesting with the iOS build is that the file size of the v1.0 build was 120mb! Looking at the Unity logs, a lot of unused files and asset demo folders were included during the build, and I could not understand why. Reading through some forum messagess (since my question on the forum went unanswered), it appears that iOS builds do not really exclude everything that is not needed.
At this point, I decided not to update the app, and let it ride in its current behemoth state. Early in 2019 I decided to revisit the update and had the same issues. The frustration level was off the charts, and I convinced myself it would be easier just to start again using Corona… which is exactly what I did.
My previous experience with Corona, and utilizing the sound and image assets created for the Unity version, allowed me to put an improved version of Tappy Easter on the iOS and Android app stores in under 1 month.
Corona is somewhat of an underrated 2D engine, but it is robust and established, and this made development quite easy. There is a lot of things that Corona does that require a bit of work in Unity:
- I did not have to manage aspect ratios and screen sizes. Just place your images where you want them, and Corona will handle it appropriately, no matter what display.
- Admob and Google Play actually work without hours of tweaking. Include the plug-ins and start coding.
- XCode not required!!! Just choose File -> Build and Corona will compile an app to an IPA file without needing a Doctorate in Xcode, and will create an Android APK file without needing to install all the Android libraries.
In order to have really nice fonts in Corona, I had to create images of text. Since this app is English only (at this time), that’s not an issue, but I would have to create text image files for every language I want to support.
As a result, I am currently working on a Corona plugin that will manage fancy text and I am encouraged by my results so far. My free plugin (GBC Language Cabinet) simplifies the management of language support, so utilizing this library with a text library should provide a great solution to multi-language fancy text.
My Unity vs Corona Experience
|Development Time||4 months||1 month|
|File Size||iOS - 120mb|
Android - 33mb
|iOS - 11mb
Android - 10mb
|Additional Assets||Fingers Touch Gestures|
|"One Button" build|
|Weaknesses||XCode frustration||No visual editor... images must be coded to screen
I love working with both Unity and Corona, and it seems that each tool has its strengths and weaknesses. No one tool can do it all.
For 2D mobile development, Corona (to me) is the better choice… it’s a great way to release a game quickly and easily. Tappy Easter is one of those games where Corona was the perfect choice.
For desktop, 3D, or perhaps more complex mobile games, I would consider using Unity. There are some really complex games written with Corona, as well as some desktop games, so the Corona platform would still be a consideration when evaluating my game requirements.
I do wish Unity could build mobile apps more simply, like Corona does.
Building a desktop app with Unity is so simple, so it should be possible to improve building for mobile. Building the app seems more complicated than actually developing it, but maybe I’m just spoiled.