Unity Port for A Clockwork Brain – DevLog #11

DevLog Header 11 SmallMulti-week Devlog 12/12/14 – 26/1/15

Hi folks.

Besides a much-needed holiday break, we have been working almost non-stop at A Clockwork Brain.

A Clockwork Brain on the Amazon Appstore

In early December we launched a paid version of A Clockwork Brain, with 12 mini-games, on the Amazon Appstore. This makes A Clockwork Brain available to all Kindle Fire devices of 2nd generation and up, including the Kindle Fire phone. Since then, it has already been featured twice, which is really great!

Continue reading

Unity Port for A Clockwork Brain – DevLog #10

DevLog Header 10 SmallBi-weekly Devlog 24/11 – 5/12

We’ve skipped reporting last week’s progress, as we were much busier than normal. In general, we’ve been working on finalising a number of peripherals and polishing the rest of the game.

We encountered a serious issue with the Facebook Unity SDK integration caused by a critical bug in the Android version of the SDK itself. In summary: if a user wants to login in FB (e.g. to share their score) and then cancels their action, on a retry attempt, the app will crash. You can fix it in two ways:

  1. Getting the newest (6.1 beta) version of the SDK or
  2. Using this easy patch for the current (6.0) version.

In other news, we finalised importing all custom borders for the game, and they actually look very nice on widescreens! Besides that, we’ve been working on an asynchronous texture loading method which should improve loading times.

Moving to new features, we have started working on the Store and Upgrades screen, which should be finalised this coming week.

Stay tuned!

Unity Port for A Clockwork Brain – DevLog #9

DevLog Header 9 Small17/11 – 23/11

Hello!

Last week we kept working on the analytics and social elements of the game. This means we finalised some Flurry events, implemented Facebook sharing, leaderboards, and achievements. We completed our framework abstraction regarding leaderboards and achievements, as well as sharing to media such as Facebook & e-mail. Until now all of our leaderboards and achievements were working with dummy scores, but last week we moved to actual score submission and checks for achievement completion.

Integrating the Facebook SDK took longer than expected. In the beginning, wanting to avoid adding another plugin, we thought we could just link to the Facebook app through the game. We expected that this would launch a user’s already installed Facebook app. However, the link only opened a browser page, which was not what we wanted. So we integrated the official Facebook Plugin for Unity. This unfortunately added 7 more MB to the project and has been under implementation for 2-3 days now, longer than expected.

We also finished the client-side functionality that handles user authentication for our back-end. After that we began work on the synchronisation component, that sends local data to the server when a user goes from offline to online state. Finally, we implemented some low level abstractions and functionality like retrieving the app bundle version and the current session ID.

On another note, we have also been busy working on a dedicated site for A Clockwork Brain. We can’t wait to show you the end result!

Unity Port for A Clockwork Brain – DevLog #8

DevLog Header 8 SmallWeek 10/11-16/11

Well, another week has flown by, and boy, have we been busy! You might have noticed a slight delay in the releases of our dev logs. Work has piled up, to the detriment of the log’s punctuality. But here we are! :)

Last week, we worked a lot on the Leaderboards and Achievements side of the game. We included both Amazon Game Circle and Google Play Services; they both have official plugins for Unity so the integration was not very difficult. We also created abstractions in our custom Framework, so now we can just say:

 public void OpenAchievements() {
    SW.Achievements.PresentAchievementsOnScreen();
 }

We don’t specify any specific provider (Amazon/iOS/Google Play), our Framework handles the rest.

Another task that we finished this week was the setup of the Daily Rewards panel. This panel awards the Player with an increasing number of Tokens for every consecutive day she logs in the game.

We also solved our problems with Flurry – it turns out that the culprit was none other than the android manifest file and our sloppy copy/paste. Prime 31’s plugin overrides Unity’s default native activity, and for the plugin to work, it should be the only native activity authority in the android manifest file. For example:

<activity android:name="com.prime31.UnityPlayerNativeActivity" android:label="@string/app_name" android:screenOrientation="sensorPortrait">
 <intent-filter>
 <action android:name="android.intent.action.MAIN" />
 <category android:name="android.intent.category.LAUNCHER" />
 <category android:name="android.intent.category.LEANBACK_LAUNCHER" />
 </intent-filter>
 <meta-data android:name="unityplayer.UnityActivity" android:value="true" />
 <meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" />
 </activity>

Our mistake was that we had also forgotten to erase the default Unity activity:

 <activity android:label="@string/app_name" android:name="com.unity3d.player.UnityPlayerActivity" android:screenOrientation="sensorPortrait" android:launchMode="singleTask" android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale">
 <intent-filter>
 <action android:name="android.intent.action.MAIN" />
 <category android:name="android.intent.category.LAUNCHER" />
 </intent-filter>
 <meta-data android:name="unityplayer.UnityActivity" android:value="true" />
 <meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="false" />
 </activity>

So remember, only ONE can handle UnityPlayerActivity. Sort of like Highlander, really.

As we’re nearing the end of the porting project, our QA process is becoming more and more rigorous. Each time we do QA, we try to follow each platform’s Core testing guidelines:

We have an Excel file where we tick off the passed tests for each build target. That helps a lot.

So that’s all for last week, thanks for reading!

Maria

Unity Port for A Clockwork Brain – DevLog #7

A Clockwork Brain DevLog 7Week 3/11-9/11

Hello!

Last week we continued our work on the peripheral side of the game. We’ve been implementing Flurry Analytics, by using Prime 31’s Flurry plugin. Even though everything was running smoothly in a test project, on the actual game the events did not seem to reach the Flurry servers. We’re still investigating the issue.

As you might know, at the end of each game, Sprocket awards you with Tokens, depending on how well you did. To the dismay of many of our future Android players, we realised we had a bug in the current version of the game on iOS and have now implemented the correct calculation algorithm for the reward, so the game no longer gives you huge amounts of currency randomly.

We’ve also progressed well with the Daily Rewards panel setup. This panel appears every new day the player launches the game, and gifts them with Tokens. We haven’t yet implemented the actual reward mechanism, but we’ve setup the panel and its accompanying animations.

On the backend side, we focused on implementing the serialization of the user and the game state, along with other important objects that will be used for persistence and communication with the server. In parallel to that,  we implemented a notion of dynamic metrics that change automatically with the player’s use of the game. Both the offline and online component and persistence have been implemented for those metrics. Also, most of the game logic rules were implemented for use in the offline mode of the game, along with many statistics that occur when the player completes a mini-game.

In the previous DevLog I promised that I would write more on AppThwack. It really is a great service! The automated testing script actually worked and we got some in-game screenshots too. I ran the test with the free atom-based devices and I found that the game crashes in 2 of them: Asus Memo 7 and Motorola Razr. Here are their respective errors:

  • Application couldn’t be installed: pkg: /sdcard/temp.apk Failure [INSTALL_FAILED_CONTAINER_ERROR]
  • Application died after launching – Unable to create files directory /data/data/com.totaleclipsegames.clkwrkbrain/files

I think the reason for the first error has to do with the SD Card/External settings on the Android Manifest. For the second one, no clues yet!

That’s all for this week. Thanks for reading!
Maria

Unity Port for A Clockwork Brain – DevLog #6

A Clockwork Brain DevLog 6

Week 27/10-2/11

Last Thursday, A Clockwork Brain got featured by Apple in the Number Puzzlers collection. This did give us a huge boost, both in downloads, and morale! We’re really looking forward to those features on Android. :)

As the weeks go by, we work less on visible changes and more on what goes on behind the scenes. In other words, nο fancy art for you today!

Since all games have been completed, last week, we finished the Options and Settings screens. We then we devoted our time on the integration of the offline server component in the actual game. That is almost complete now and both business rules and transactions can be run in the game. We also worked on the online version of the component, which connects to our backend and handles the online operation of said rules and transactions.

Continuing our work on game peripherals, we have been debugging and merging some platform-related components that will allow us to store information persistently on the device in order to create and use multi-platform leaderboards and achievements.We also purchased the Unibill plugin that we will use as our unified plugin of choice for in-app purchase handling across all platforms. Because we do not want to be dependent on any plugins, we are also implementing our own, plugin-agnostic, IAP interface on top.

Another area that sees lots of activity recently is QA on devices. Since Android has about 5235 devices, according to the latest number I found on the Google Play Store, it would be prudent to try and test our game with as many of the major devices as possible. I have been giving AppThwack‘s service a test, but unfortunately, since our game runs on Unity, it cannot run the automated tests. For this reason, we have created a small script that will automatically launch and play mini-games, in order to stress-test the app. We expect to have the first automated version on Appthwack soon!

Finally, on the marketing side, we have been really busy gathering and curating our media contacts’ information. By the way, this devlog – like most of of our other blog posts – will be uploaded on Reddit; if you’re a Redditor, go and upvote us!

That’s all for this week, thanks for reading!
Maria

Unity Port for A Clockwork Brain – Devlog #5

A Clockwork Brain DevLog 5Week 20/10-26/10

Last week we began by integrating the OBB downloader plugin for Android into our build. As this feature is only usable for Google Play distribution, we further extended it so that it is not included by mistake in i.e. Amazon builds. To do this we used Unity’s Platform Dependent Compilation capabilities, and specifically custom platform defines. So each time we choose to use split binary, we will also include a custom platform define to enable the OBB check inside the particular build. Uploading to Alpha was a bit messy, what with key signing and all that kerfuffle, this post helped a lot.

Quite some time was also spent in fixing a nasty shader bug that plagued the developers as well as our eyes: all the scenes that used a rolling texture, suddenly showed these textures as solid black.  This bug to the clipping multiply shader only appeared on the device, but never in the Editor. It turned out that NGUI required the shader assets to be inside the Resources/ rather than just the Assets/ folder.

On the peripheral side we completed some of the offline specific components that had been started the previous week and started to work on the online component that will be talking to the server. In parallel, we created the infrastructure for storing player metrics. We also continued our cross-platform abstraction efforts by working on a way to store data persistently on the device through a unified interface. And a last, but difficult task, was to polish and standardise the procedure through which we merge our libraries and plugins into the Unity project.

That’s all for last week!
Maria

Unity Port for A Clockwork Brain – DevLog #4

A Clockwork Brain DevLog 4Week 13/10 – 19/10

Hey all!

Another week gone, another mini-game complete!

During last week we finished Word Length, which also happens to be one of my favourite mini-games, although I can never seem to reach the Insane Round. Besides porting the game to Unity, we also made some usability improvements, compared to its current version on iOS, which should now make it a lot more intuitive for the players to understand which button they pressed.

Continue reading