brainCloud 5.6 Is Coming!
Marvellous Multiplayer! Release 5.6 brings additional polish and performance to the brainCloud platform, with an emphasis on improved multiplayer services and developer quality-of-life!
Compatibility Notes
There are no API changes in this release.
Release Highlights
Matchmaking Monitor - Official Release
brainCloud 5.6 marks the official release of our Matchmaking Monitor.
The Matchmaking Monitor is a unique feature of brainCloud that gives developer and designer-friendly insights into an app’s matchmaking performance - and how it impacts the player experience.
This release re-arranges our panels to be more intuitive and mobile-friendly - and adds two new performance metrics: Matches Per Minute and Lobbies Created Per Minute.
We have also added an Average Steps metric to give developers additional insight when optimizing their matchmaking criteria.
Developers can now click on the Lobby Type panel to trigger a Preview Blade showing its configuration.
The Matchmaking Monitor can be found in the Design Portal under App > Global > Multiplayer > Matchmaking Monitor.
Hosted Server Optimizations
brainCloud has built-in support for hosting Room [i.e., Game] and Relay Servers.
This release brings significant optimizations to hosted server orchestration, including:
- Faster container launches: We have refactored our region and node-locking approaches to speed up the parallel launching of nodes and containers.
- Faster container cleanups: The system will now clean up completed containers faster, making server slots available for new matches sooner. As a bonus, this saves money!
- Optimized image pulls: brainCloud now only retrieves the image for your container once when a new node starts. All subsequent container launches on that node take advantage of the previously retrieved image. This strategy is best for devs who use unique tags [e.g., “1.0.0-1”] for every server build. For devs re-using tags across builds [e.g., “latest”], there is an option to pull a fresh image if the previous image is older than the specified number of hours. This speeds up container launches - and reduces Docker usage - saving money!
- Optimized log retrievals: brainCloud now uses a separate thread to retrieve the logs when cleaning up containers. Also note that by default, brainCloud now only retrieves the logs for containers that complete with a non-zero exit code.
Leaderboard Optimizations
Our Leaderboard system is one of brainCloud’s most popular features. As such, it gets used a lot - by many games in different ways.
A common use case is using our Leaderboards as the basis of Tournaments — both for our built-in Tournament system and for more customized systems that devs have built using Cloud Code.
Although the system overall performs well, one part of it performs “less well” than the rest: counting all the entries in a leaderboard. Due to MongoDB's limitations, this operation is slower than we’d like. And under some circumstances (e.g., at the end of a tournament, when everyone wants their tournament results), those slowdowns can add up!
brainCloud 5.6 introduces several improvements to target this very use case:
Leaderboard counts are now being pre-calculated and stored for two high-usage scenarios:
- Tournament results: When a tournament is completed, and rewards are calculated, we now count and store the total number of players once and use it for batched and real-time processing of tournament rewards.
- Rotated leaderboards: When a leaderboard rotates, we now count the entries and store them in the leaderboard version history - automatically using that value when the app calls
GetGlobalLeaderboardEntryCountByVersion()
.
Both of these improvements are entirely in the background — no changes to Client APIs.
NEVER ROTATION leaderboard cache
The previous two scenarios calculate and store the count for leaderboards that have been completed. Since these leaderboards are no longer live, the number of entries is no longer growing.
The same cannot be said for NEVER rotation leaderboards. These leaderboards are active forever - and can grow to millions of players. As they do, dynamically counting the entries can take some time.
To improve performance for these leaderboards - we have added a new system that periodically (every 2-5 minutes) counts the number of records and caches the result. This cached count is also dynamically incremented/decremented as new scores are added and deleted. As such - this cached count closely tracks the exact number of entries – though it isn’t guaranteed to be 100% accurate.
When a leaderboard is very large - the difference between 1,500,000 or 1,500,001 isn’t significant… though apps with this caching enabled should take care to ensure that they can handle the situation where the system says the player’s rank is 1,500,001 – but also says there are only 1,500,000 entries in the leaderboard. [Hint - in that case - artificially inflate the number of entries to 1,500,001 for display purposes.]
Important notes:
- Most apps do not need the NEVER ROTATION cache. Thus, it is turned OFF by default for all apps.
- Our support team must enable the NEVER ROTATION cache on a case-by-case basis.
- After 5.6 is released, our support team will contact teams with apps where we think this should be enabled.
- Contact support if you have questions about whether we should enable it for your app!
Additional Improvements
brainCloud 5.6 includes a number of smaller improvements as well. These include:
App Alerts
- Dangerous Compatibility Flag — We have added a special alert for the "Include shared objects in Owned Custom Entity GetEntityPage queries" compatibility flag, which can significantly slow app performance for apps using Custom Entities. We highly advise that this flag be disabled for all apps. More info here.
- Unreachable Web Service — We have added a new alert for when Web Services are not reachable from brainCloud’s servers. This alert may indicate that the target servers are down, the endpoint has changed, or their SSL Cert has expired.
Database
- brainCloud now has basic/experimental support for AWS DocumentDB. This is most interesting for our Private Licensees (as an alternative to Atlas) - though we are also considering moving some Public BaaS services to it (e.g., some logs).
Logs
- We have added new Security Log views at the App, User, and Super system levels. These logs mainly capture bad login attempts - at the Client and S2S API levels.
Relay Server
We have added new MD5 and hex dump capabilities to the logging. The two new settings are:
- PACKET_LOG_ENABLED_WITH_MD5: Set to “true” to enable MD5 hash logging of incoming and outgoing relay packet payloads.
- PAYLOAD_LOG_AS_HEX: Set to “true” to log the incoming packet payload as a hex dump rather than an ASCII string.
- The relay server also now exits with a code of 11 if MEMBER_TIMEOUT expires before any players connect.
Portal Changes
We continue to evolve our Portal. In addition to the Matchmaking Monitor enhancements described above, we have added the following improvements:
Billing Plan Dialog
For users on our Public BaaS, the Billing Plan dialog has been updated to facilitate easier plan comparison and selection. This dialog is accessed from the Team > Manage > Apps page.
Global Properties
The Global Properties screen (App > Design > Cloud Data > Global Properties), which is used for managing remote config settings for apps, now allows values to be edited inline for convenience.
Note that JSON-based properties will pop-up a small dialog window for easier editing.
Reference Currency
brainCloud is used by developers across the globe - and thus doesn’t make any assumptions about the base currency that your app uses. The reference price of a Product is simply a number that we sum up when presenting revenues.
Prior releases of brainCloud have displayed a $ next to revenue numbers - which obviously isn’t correct for apps that aren’t using a dollar-based currency.
brainCloud now allows developers to specify the reference currency for apps - so that we can display revenue numbers appropriately.
Navigate to App > Design > Portal > Reference Currency Settings to configure your currency!
Sample Data Mode
Most of our analytics screens now feature Sample Data modes - which are designed to give new devs a feeling for what the screen would display if the related data were available.
Note that when in “Sample Data” mode - the screen contains a prominent brown border with the words “(Sample Data)” after the screen title.
Additional Improvements
In addition, the following additional quality-of-life improvements have been made:
App > Design > Cloud Code > Web Services
- now displays an icon indicating whether the services displayed are reachable by brainCloud
App > Design > Gamification > XP Levels
- Changed the default chart display format to Linear (instead of Logarithmic)
App > Design > Leaderboards > Tournament Templates
- Greatly improved display and editing of Tournament Prizes!
App > Design > Multiplayer > Lobbies
- Re-designed Lobby Preview blade. Now, it shows a summary of the rules.
- You can also quickly navigate to the associated Server for a Lobby Type from its Preview Blade.
App > Design > Servers > My Servers
- Room Servers - Devs can now configure if and how often to refresh Docker images when launching containers.
App > Global > Global Data > Custom Entities
- Added [Apply] button to the editor to allow for easy checkpoint-saving for long editing sessions
App > Global > Global Data > Global Entities
- Added [Apply] button to the editor to allow for easy checkpoint-saving for long editing sessions
App > Global > Leaderboards > Leaderboards
- The leaderboards page has been updated with improved column order — rank is now placed first, and the score is right after the player’s name.
- A [Refresh] button was added for convenience.
- Can now only [Reset] current leaderboards - not prior versions.
App > Global > Multiplayer > Server Monitor
- New details were added to the Server Preview Blade. Now shows custom environment settings and Max Nodes.
User > User Browser
- A new button on the User Preview Blade will allow you to view the selected user in a new tab.
User > Social > Friends
- The screen now displays the platform that a friend originates from
Plus, there have been significant improvements to the usability of the Design Portal on mobile devices.
API Changes
brainCloud 5.6 has no changes to APIs.
Libraries and Examples
Client Libraries
Unity
- The default API endpoint changed to api.braincoudservers.com instead of the legacy sharedprod.braincloudservers.com endpoint.
Unreal
- Compression is now enabled by default.
- The default API endpoint changed to api.braincoudservers.com instead of the legacy sharedprod.braincloudservers.com endpoint.
Java
Implemented gzip compression to allow for requests and/or responses from the server to be compressed (disabled by default)
- use
compressRequests (boolean compressRequests)
to compress requests before they are sent to the server - use
compressResponses (boolean compressResponses)
to tell the server to compress responses - use
enableCompression (boolean enableCompression)
to turn on compressed requests AND responses
- use
JavaScript
Fixed bug in
canReconnect()
– Previously, only empty (““
orlength == 0
) anonymous/profile IDs were being detected- Now properly checks for
null
and empty IDs
- Now properly checks for
Implemented gzip compression to allow for requests and/or responses from the server to be compressed (disabled by default)
- use
enableCompressRequests = function(compressedRequestsEnabled)
to compress requests before they are sent to the server - use
compressResponses = function(compressedResponsesEnabled)
to tell the server to compress responses - use
enableCompression = function(boolean enableCompression)
to turn on compressed requests AND responses
- use
C++
Implemented GZip compression to allow for requests and/or responses from the server to be compressed (disabled by default)
- Currently tested on Windows / Linux / MacOS and Android (Still untested on iOS)
Example/Demo Libraries
Unity Examples
Invaders
- Username is now displayed on the main menu upon successful authentication
Documentation and Tutorials
Documentation
- All the latest API additions and changes have been incorporated into our doc site at docs.braincloudservers.com !
- We have started migrating our Knowledge Base at help.braincloudservers.com to French!