I started developing apps ten plus years ago for iOS using Objective C and Xcode. At the time iOS and Android had a roughly equivalent share of the market. Today Android has 71% vs iOS’s 28% (https://www.statista.com/statistics/272698/global-market-share-held-by-mobile-operating-systems-since-2009/ and https://gs.statcounter.com/os-market-share/mobile/worldwide).
Even back then I knew I didn’t want to limit myself to a single device or operating system. The question was, and still is, how does a sole proprietor develop apps for multiple platforms and keep the code base and features in sync? While I had used Java for some of my web projects and I learned Objective C and to develop a fairly complex magazine app and a hiking app for the iPhone, there was little chance I was going to maintain two sets of code for these apps. The headache of simply keeping the apps up to date with OS updates and Apple and Google’s ever changing app requirements would have been a nightmare. It just didn’t make sense.
Some of the major development environments:
- Ionic https://ionicframework.com/
- React Native https://reactnative.dev/
- Flutter https://flutter.dev/
- Xamarin https://dotnet.microsoft.com/en-us/apps/xamarin
- NativeScript https://nativescript.org/
- Node.js https://nodejs.org/en/
- Cordova https://cordova.apache.org/
And popular ones I looked at at one point that now seem to be deprecated: PhoneGap, Appcelerator.
After researching options I was intrigued most by Corona (name changed to Solar2d… another victim of the pandemic!). Corona / Solar2d’s claim was that it was quick and easy to build apps using its development environment and the LUA programming language. Apps could be built with a single code base, tested in the built-in simulator and released to the stores without much fuss. I found the claim to be true.
Using Solar2d was and still is a great development environment and I highly recommend it for building business-focused apps (which it doesn’t claim as a major feature of it’s SDK, but which it does very well) and 2d game apps. I have built multiple business-focused apps: ADK46erNow, MotoTripNow. I’ve built a couple of card game apps – one for Bezier Games, “Silver”, one of my own – Travel Light Travelers and a maze exploration game – Illumimaze.
The SDK, the language, the support, the ease-of-use and development all make Solar2d a great development environment. Soooo, why did I dive back into the morass of cross-platform development options and end up with Unity?
In a nutshell, the primary reason for looking for another development environment was Solar2d’s inability to capture and stream the device’s camera view on Android. This may seem like a small detail, but Solar2d made this possible on iOS. So the augmented reality (AR) feature I developed to identify the Adirondack high peaks around the hiker worked beautifully on iOS, but not on Android. This missing feature on the Android version of the app has always bothered me. Myself and other developers always received the same reply when asking Solar2d for this feature: “We will never support this on Android. It’s too difficult.”
The secondary reason was the fact that Corona’s history of company ownership has been rather fluid and in May of 2020 Corona Labs Inc stopped operations and Solar2d became a completely open source project. I’m a big fan of open source projects, but the loss of company support, the departure of a key technical support resource and the low market share compared to some of the other major development environments made me nervous enough to look around for another option.
I’ve had a difficult time finding good statistics on cross-platform app development SDKs. However, my experience with discussion activity on various forums, presence of online articles and news, and career / contract opportunities (or lack thereof) makes me think Solar2d does not have a high market share.
So, why Unity?
Short answer: Market adoption, features and stability.
One of the first questions you have to ask is “can the development tool do what you need it to do?” As I mention above I’ve developed game apps and “business-like” apps (for hiking and organizing information). Given that, some, but not all, the major features I was looking for were:
Screen navigation: The ability to create self-contained screens, like a home (menu) screen, app info screen, a screen with a list of information, etc. and the ability to navigate between them. These are not necessarily primary features of most game development environments. Unity has the concept of “scenes,” which I am able to use to build individual screens.
Tables: the ability to create a list of items which may include text, graphics, UI elements. Unity can do this but it takes more work than I think it should.
Feedback & contact: Send an email, go to a website.
Access a devices photo library: With a native plugin Unity can handle this, but apparently not without a third-party plugin.
Share to social media: Again, a third-party plugin is required. But it works.
Camera view: As mentioned above, this is an important AR feature for my apps. And it works brilliantly on iOS, Android, and in the Unity editor.
GPS location: Ability to get the mobile device’s GPS location. The downside to this is that without building a native (iOS and Android) plugin there is no way to gather location information when the app is in the background or suspended. I haven’t found a good solution for the background issue and I don’t want to learn and develop separate plugins and then integrate them into Unity. So, this works, but I’m not able to add GPS waypoints to my hiking app.
Device magnetometer: “Compass.” The ability to determine the device’s orientation.
Maps: There are lots of map options in Unity including some AR mapping options that look really interesting.
Weather: Again, this is rather specific to my needs, but I needed to be able to access an outside data source, parse an XML file, store the data and then display that data. In this case a weather forecast based on GPS location.
Database: Really convoluted, but it works. There are hoops you need to jump through to get what should be a basic service installed, configured and working. There are also a lot of Unity developers who seem to disparage the use of databases (“why would you need to use one anyway”). Boggles my mind how you handle persistence, state, or tracking and managing information without one – after all that’s why they were developed! And yes, there are other ways, but they are far less elegant!
Obviously, this isn’t a complete review of unity, or its very robust editor, it’s active developer community, online resources, or its developer pricing options. This is a real-world look at Unity and whether it will work for the apps I, as an independent developer, have been creating.
Do I wish Solar2d had an extra missing feature or two and I could tell that its future was more secure? Definitely. Solar2d is great and the more I look at other SDKs the more I’m impressed with what Solar2d is and how much it offers. But for me it has fallen a bit short and I’m nervous about it’s future.
So, is this the end of the long and winding road? Ha! For the moment, yes. But, I’m sure something else will come along, the environment will change, OSs and device requirements will evolve, and have you heard of BuildBox? Okay. Stop me before I get whiplash!
If you think any of the features I’ve listed above might be useful to you, that you might want to use them in your own apps, or if they will help you learn Unity then see this article where you will find the business app template architecture for Unity that I developed along with the source code for these features.
The included documentation will describe all the prefabs, scripts, and scenes and the resources I used when learning how to build these features.