I have spent the last couple of weeks fighting with implementing leaderboards into Star Diver. There will be a leaderboard for each level. When the player achieves a perfect score (ie. removes all formations) then their time is posted. Obviously lowest time wins, and because I capture this in milliseconds I shouldn't get too many collisions.
Technically there are lots of options ranging from building your own database and website using something like Azure, using a dedicated subscription based solution or using one of the more publicly available options such as Google Play Games. After spending a couple of days deliberating on this I decided to go for Google Play Games, since my initial target platform is Android, and by definition everyone with an Android device that can download Star Diver from the Google Play store will have a Google account already. Also Google+ is gaining in popularity rapidly which will soon make the use of "frienly circle" leaderboards there useful also.
I then needed to find a solution to integrate with Unity. There are literally dozens of solutions out there for doing this, and I was not inclined to develop my own from scratch.
The first I tried was the Open Source Google Play Games plugin for Unity, available on GITHub. This worked well and took about one evening to put together, however after I implemented it I realised that the only UI available for displaying the leaderboards was the public Google Play Games UI. This did now fit with the look of my game at all, and I started looking at ways to implement a custom UI.
I then spent a night researching alternatives in the Unity Asset Store and came across and purchased the excellent Android Native Plugin by Stan's Assets. This is amazing value at $30 and includes not just the GPG integration I needed, but also In-app purchases (which I need to to later anyway), Facebook integration and Native Android pop-ups. All the user reviews were generally positive and this swayed me.
Here is the result from a look and feel point of view. I like it better than the standard Google one, but it might need a bit more tweaking later.
I had to contact Stan a few times to get things working, however he responded extremely quickly to all my queries and after some teething trouble (which meant I had to remove the Facebook functionality) it worked.
Setting up the Google Developer Console with all of the levels and understanding how to publish the GPG portion vs. the actual game took another few days to get right. The fiddly scrolling table to actually show the scores and artwork for the window border took me another few nights. But it's done now. Phew! I can't help but think that there are still a few sneaky bugs in there, since my scores appear to miraculously vanish occasionally...
Overall I learned a lot, but a couple of weeks to get one feature working was a bit harder than I originally thought.
Saturday, 28 June 2014
Sunday, 1 June 2014
Menu System
Here is the menu system from title page onwards:
The Stage Selection Page shows the progression through the game including the dependencies. There are three progression paths:
The Level Selection Page shows the level progression within the selected Stage, including the dependencies.
The transition between the different screens is animated and to the player is appears as if they are "flying" from one level of detail into the next (and back again if BACK is tapped).
A lot of my development time so far has gone into the menu system. The complexity in enabling the transitions and rules around statuses etc. was deceptively complex.
| The Title Page |
- Serene: Easiest. Most likely will allow formations to be disposed of in any way to count
- Bold: Medium difficulty. I will introduce some challenging aspects
- Insane: Hard. Levels will have many formations, and only collisions with stars will count
- Playable - Circle will display in white and score is shown. When player taps this the Level Selection Screen is displayed
- Reached but locked - the player has passed all preceding levels, but has not achieved perfect scores. Circle will show in white with a lock symbol shown. When player taps this a warning shows up and allows user to also unlock the level with in-app purchase (IAP)
- Not reached and locked - the player has not yet passed all preceding levels. Circle will show greyed out and lock symbol is shown. When player taps this a warning shows up and allows user to unlock all levels with IAP.
| Main Stage Selection Page |
Each Level shows the number of goals / formations within the level.
- Yellow: Highest score attained so far
- Grey: Minimum score required to pass the level
- Black: Additional formations over and above passing score
| Level Selection Page |
The Level Launch Page shows details about the specific level. The key piece of information is the objective. "To Pass" shows one of three scenarios:
- A star and edge of space: symbol: Either way of disposing of formations will count
- A star only: Only formations that are knocked into stars will count
- Edge of space only: Only formations that are knocked into the edge of space will count
| Level Launch Page |
A lot of my development time so far has gone into the menu system. The complexity in enabling the transitions and rules around statuses etc. was deceptively complex.
Subscribe to:
Comments (Atom)
