1.03 Update


Finally done with the google play game services integration for the Android version. The instructions here are fairly good: https://developer.android.com/games/pgs/unity/unity-start

Just thought I would note down all the pitfalls I got into for future reference. Had a bit of difficulty in the beginning just setting up the smoke test project in Unity and getting it to work right. Probably lost about a week because of some confusions I had.

Tip: After importing the plugin, remember to run the setup editor script before compiling the project otherwise the compile will freeze and never complete, requiring you to terminate Unity in task manager.

The data in the fields below will have to be gotten from your dev console in google play. Whevenever you update info (achievements, leaderboard etc) in the dev console, remember to run the setup again here with the new data. Resources definition can be gotten by clicking Get resources in your play console, location in the screenshot after this.


Both credential types need to be setup in google cloud for everything to work properly. If you are new to this one pitfall you might have is if you are running multiple google accounts. Make sure the account you use to set up the google cloud services is the same as the one in google play dev console. When you enter the setup link, it might switch to your default account and not your developer account, which can be confusing. 

When setting up the credentials, make sure you are using the correct signing key. Apps downloaded from google play store will be signed with google's key that they assign to you, while those you compile into apk and test locally will be using your own upload key. You can set up a test oAuth server that accepts your own key along with a live server that accepts google's key so that you can test things locally and not have to upload to playstore to do basic testing.

Once you've gotten the authentication sign in popup to appear on your smoketest app from internal testing track and your locally compiled apk, you've gotten most of the work done already. Congratulations! It was probably a pain in the ass but you did it!

There was also doing the achievements tracking system in Unity. It was fairly straightforward, although time consuming because we had to do all the icon art. The only decision of note was the achievement system was decoupled from the rest of the game systems, meaning the game logic system itself would not care about achievements at all. Instead, the achievement system would at regular intervals query game stats and decide if a particular achievement was fulfilled.


Each achievement handler would be a fairly simple class like so:

~~

Other things in 1.03:

The searches the monster behaviour AI was making was becoming too expensive at later levels because of increasing monster count and large search space. All we did here was pruning the search space while maintaining the same behaviour.

Files

megacatrogue.zip 65 MB
Feb 23, 2023

Get Megacatrogue

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.