Prologue
In early 2015, I decided to write my first game. I chose Unity3D as an engine, as I had experience in C # and JavaScript, and acquaintances who could help. I remembered one mini-game that I played as a child, and decided to do something similar. I installed Unity and set myself the goal of making a working prototype in a couple of weeks, at the same time studying the engine.
I started to implement this idea in my free time. After a week there was a working prototype, after a month and a half I already had a workable version of the game with all the logic that was spelled out. I was satisfied with this and put the game on the shelf for a while. In June, I again took it, thinking that it would take me a maximum of a month to complete it. Oh, how wrong I was ...
And so, what problems did I encounter when creating my first game on Unity3D?
- Designers
- Plugins
- Google play
- App Store
Designers
The first serious problem I encountered was the lack of a designer. And if at the initial stages, when I was just creating a prototype of the game, it was not so important, then the closer to completion, the more inconvenience I felt. I began to look for a designer in June, and my searches were rather quickly crowned with success. I found a girl who didn't mind helping with the drawings. We met, stipulated what needs to be done, and she disappeared. Then she appeared again, promised to do everything, and disappeared again. So it was about a month before I realized that I would not receive my drawings. As a result, I had to draw the whole UI of the game myself, and it took me a long time to do it. Soon I agreed with one of my good friends, he agreed to help, he said that in two weeks he would cope. I believed him - and what could I do? By the end of the second week, he happily told me that he had almost finished everything, and gave me a look at his drawings. There was half of what I needed, and the part had to be redone. It took him another two weeks (in total there were a dozen unpretentious sprites). And then, he didn’t finish a couple of sprites and I had to get out myself, armed with photoshop.
')
What can I say to conclude this point: always agree in advance with the designer, if you do not know how to draw. Look for a responsible person who will do everything on time, otherwise you will have a lot of trouble later. It can also create unnecessary delays for the release of the game, when everything is ready from the software side and the design is not yet complete.
Plugins
Already when the game seemed complete to me, I decided to start connecting third-party plug-ins. Now it has three plugins:
- Google Play Game Services (GPGS);
- Soomla;
- Appodeal.
Google Play Game Services
Google's plugin was chosen to add achievements and leaderboards to the game, because of all the options I found, it was free, easy to use, and supported both Android and iOS. At the time of his addition, for me he seemed the perfect solution. After adding a plug-in, a new problem appeared in the project, which will be described in more detail below, namely the Google Play developer account. Without it, you will not have achievement IDs and results tables, and you will not be able to test these features of your game. But, when you have access to them, problems with their setting should not arise. On the Internet you can find a large amount of information on this topic.
Unfortunately, I didn’t manage to configure the GPGS plug-in on iOS, all my attempts resulted in build errors, and in the end I had to completely throw out the GPGS from the iOS build. But, in principle, I have not lost anything, since the Game Center is doing an excellent job with the implementation of achievements and results tables, and for it there is no need to add any third-party plug-ins - just use the
Social class built into Unity.
Soomla
The plugin from Soomla consists of three separate libraries:
- Soomla Core - the main library that contains common functions and utilities necessary for the operation of the plugin;
- Soomla Profile - a library for social integration. networks (Facebook, Twitter, Google+);
- Soomla Store - a library for the implementation of the shopping system.
Initially, it was planned as a plugin for working with social services. networks, as most did not want to create a bike. But, in a consequence, it was decided to add the Soomla Store. Again, the main reasons for choosing this particular plugin were its free of charge, ease of use, good documentation on the website of developers and versatility. And not only that it works with both Android and iOS, but also that it adds two necessary things at once - social networks and in-app purchases.
Soomla profile
I needed to add the ability to share records in the social. networks, with which the plugin, after setting up in the project, successfully copes. But in order to configure it, you have to sweat. To work with Twitter, it is enough to create a connected application, logging in through your account, and enter the
Consumer Key and
Secret in Unity settings in Soomla. Twitter library is built into the plugin. But with Facebook things are a little different. You need to create a related application in the Facebook Developer Console, you need to add information for each platform where the application is going to be used. Add a Facebook plugin to the project and in its settings register the application ID received from Facebook. Also for android you will need the OpenSSL package to get
development and release key hashes . I had problems getting keys to Unity, but on the application settings page, I’m going to learn how to get them through the console.
If you do everything right, then you have to earn everything. Soomla provides a large number of event handlers, which I advise you to use at full capacity.
Soomla store
I needed to add just one purchase to my game - cancellation of advertising, so I couldn’t appreciate all the opportunities this library provides, but it includes everything you might need when creating an in-app store. Here I can only advise you not to forget to check your in-app purchases before you post your game in the store. Android provides the ability to purchase a test product that has a unique ID, while Apple allows you to enter the game using your Sandbox test account and make a test purchase of your product directly. Not without pitfalls. So, my first attempt to post a game in the App Store failed. As it turned out, the Soomla plug-in for android automatically restores the Non-Consumable purchase if you erased the application and then installed it again, while Apple requires that the purchase recovery button be inside the game, and nothing else. Now the game hangs on re-checking, and I can only hope that everything will be successful.
Appodeal
Initially, I was going to use the Chartboost plugin inside my game, embedded it in the project, and it worked as it should. But, soon, I learned about the existence of a plug-in from Appodeal, in which many ad networks were embedded, including Chartboost. And I decided to try it. I was “lucky” - it was then that there was a period of its renewal, so for two weeks I could not check his work, because I could not connect him with my game. But when the plugin was updated, it was not difficult to customize it to fit your needs and use it in the project.
The only inconvenience caused by the update was that I had to create an AdMob account and link it to Appodeal, since these advertising sites work closely together. And to create an AdMob account you need to create AdWords and AdSense accounts, and link them to AdMob. Be prepared to spend some time on this, as you will have to figure out how to register with these services.
troubleshooting
A common problem when using multiple plugins is duplicate libraries. Since some plug-ins require the presence of a specific library, it may become so that the same library is added to your project from two plug-ins. This causes the error
Unable to convert classes to dex format . To correct this error you will have to search through the entire project in search of duplicates. I advise you to initially look at what exactly you add to the project when importing the plug-in. This will help avoid unwanted duplicates.
Another problem is the residual files when updating the plugin. So, when updating the structure of the plugin may change - some classes will replace others, or else they will be located in another place. Residual files will cause conflicts, errors and an extra headache. The solution to this problem is simple - completely delete the files of the old plug-in, and even then install a new one.
For me, the problem of updating plug-ins has also become very troubling. For example, after updating the GPGS plug-in, the game stopped running for me, no matter what I did with it — it crashed at launch, because at that moment the plug-in is initialized. I spent the day struggling unsuccessfully with the problem, and when I decided to return the old version of the plug-in, I began to throw out when closing the windows of the table of records. And, although I found people facing the same problem, none of the proposed solutions helped me. I had to roll back to the old version of the build, thankfully, the bitter mistakes in the past made me learn to backup before every such dangerous change in the project. Attempts to update Soomla also left me sideways - raising problems that weren't there before. Again, I had to roll back and use old versions of the plugin. With the update of Appodeal, too, everything was not going smoothly - they added new libraries and a
Dex 65536 error appeared.
In general, the advice to you: if the plugin works, you are satisfied with its functionality and this is not a mandatory update related to changing the API - do not update it. You will get more problems than good. I now have everything in the game that works great with old GPGS and Soomla plugins.
What really needs to be updated constantly is the Android SDK. Here I can only advise to open the SDK Manager as often as possible and check for new updates. Without this, a lot can stop working, and since working with Unity does not automatically search for updates, as if you were working with Android Studio, you need to do this manually. During the time that I made the game, the game broke for me twice because of the fact that there were outdated versions of libraries, such as Google Play Services. And each time it took time to identify the cause of the error.
In general, Google has always helped me in finding solutions to problems. Since most of the problems that you may encounter, someone has already come across to you. The main thing is to be patient and look for the right answer. Do not give up and everything will work out for you. And who said that everything will be easy?
These are far from all the mistakes that I encountered when adding plug-ins to my game, but these are the errors that most bothered my nerves. I hope my advice will help you avoid them, or simplify the search for the cause.
Google play
In order to be able to post a game in the Google Play store, you will need to create a Google Play developer account for yourself and pay a one-time fee of $ 25. Immediately after this, you get access to all the features of the application developer console. But in order to get money from Google, you need to link your bank account. This is the first problem that I encountered when working with Google Play, because for transfer you need a card with an IBAN number, and not every bank has one. Other ways to withdraw money in Ukraine is not yet provided. Moreover, neither in the bank, nor in the support of Google, we could not clearly answer which card we need to open. I had to figure it out myself, yes.
Creating a bundled application for GPGS shouldn’t be difficult - everything is intuitive and understandable. Create an achievement / table of records, set up, get an ID and use it in your project. After successful implementation, you can test the work of the achievements / record tables, using your test account at the entrance, without having forgotten to add this same account to the list of test accounts in the Google Play Developer Console.
But in spite of the trouble of creating an account, it was much more fun to work with Google Play than with the App Store. The game on Google Play is laid out in an hour or two, you can quickly and effectively make changes to the game. About the App Store, I will tell below.
App Store
I'll start right away with a comparison with Google Play. The price for a developer account is several times higher - $ 100 against $ 25, and this is only access for a year. Then you need to pay $ 100 again. Expect consideration of the game on average you will be a week, and then your game can be rejected. And even if you correct the reason for which the game was rejected, and again send the game for review, it is far from a fact that it will not be rejected for another reason. Apple has very strict rules for publishing applications in their store. In this regard, laying out the game in the Apple store may take weeks. It remains only to hope and wait ...
After the trouble with Google Play, with the creation of an Apple developer account, there were already fewer problems. The problems came later. The first, and most obvious, was the inability to create a binary file without having a macbook. With this I coped, good, there is access to the working Mac.
Second: having a project compiled into Unity, you need to open it on a Mac in XCode and there already configure and create a binary file. I initially worked under Windows, and when it came time to rewrite the game under iOS, I simply compiled the project and threw it into a macbook to create a binary. After a long process of getting rid of minor errors and parsing how everything is arranged in a Mac, I ran into a problem when creating a binary. Having rummaged on the Internet I learned that it is worth collecting the project for iOS in Unity directly on a poppy. I had to re-build the project, set it up in XCode and, lo and behold, the error disappeared.
If you still decide to build a Unity project on Windows, then do not forget to check that you have Python, iTunes installed on your computer, and the necessary paths are specified in the PATH variable.
A separate item would like to highlight the creation of Certificates and Profiles. Without them, you will not be able to put the application in the App Store. Also, in order to test the work of Game Center and in-game purchases, you will have to create a separate profile, and a special test Apple ID for the Sandbox. I did not fully understand the test accounts, which cost me two dollars withdrawn from the account. Trifle, but not nice. As it turned out, it is necessary to log out of your account on the device under test, enter the game and there already enter the test account previously added to Sandbox, then it will be possible to test the work of the above services.
Creating a binary game file for iOS entails much more time consuming and requires more effort than creating an apk for android, but so you can get access to an extensive audience of users of Apple products. If you are ready to spend your time and nerves on it, then you should try. The main thing is to go to the end, do not stop halfway, do not be intimidated by difficulties and mistakes, because they happen to everyone, and often they can be resolved with a little effort.
Epilogue
In conclusion, I want to say that creating games is a unique experience. I always wanted to do something similar. And I was interested in working on the creation of the game throughout the whole process. Of course, the search and correction of errors left their negative imprint, but this is an integral part of creating something new. Do not be afraid to try to make something of your own, be it an application or a game. Even if you do not succeed - you will have invaluable experience gained. And, perhaps, next time you will do something better, more interesting, better. Rome was not built in one day. After all, without trying, you will not know if it is yours or not. I wish you all good luck in your projects, commercial success and the conquest of the tops! Thank you for your time.