brainCloud 5.2 is live!
brainCloud 5.2 is a hefty release and includes:
- a new and improved Redemption Code system
- new user metrics and visualizations
- a more refined Design Portal - with improvements for the whole team!
In addition, there are a bunch of significant technology upgrades under the covers (Java 11 → 17, Spring 5->6, etc.) – all to ensure that the platform remains performant and secure!
Compatibility Notes
As always - we have done all of this with an emphasis on preserving stability and backward compatibility for existing apps. Developers should be aware of the following changes:
Redemption Codes
- When calling RedeemCode() without specifying the optional codeType, the API now assumes that scan codes <= 20 characters are Shared Codes, and codes >= 25 are Personal Codes.
- All redemption codes are now stored in UPPERCASE format. All lookups first convert the incoming code to UPPERCASE for case-insensitive lookups. Before 5.2, codes were generated in lowercase and stored “as is”.
- Lookups of older codes will still work as long as the “[x] Support legacy case-sensitive redemption codes ('personal' scan codes)” compatibility flag is on. It defaults to ENABLED for existing apps. Note that this involves an extra look-up if the compatibility flag is enabled (which is way slower of course!). It is strongly recommended that apps have this flag DISABLED if they don't need it!
Email validation
- brainCloud 5.2 can validate the format of emails passed during Authentication, Identity, and other Mail-related calls - rejecting invalidly constructed email addresses. This enforcement will be enabled shortly after the launch of 5.2.
Release Highlights
Redemption Codes
The brainCloud Redemption Code system has been completely re-designed and overhauled.
- Personal codes - these are the sort of individualized codes that you might find in a Happy Meal or as a gift card. Each code is unique - and can only be redeemed by a single user.
- Shared codes [NEW!] - these are sort of a shared coupon code system. The same shared code can be redeemed by multiple people (once each).
While brainCloud has always supported personal codes - support for shared codes is new! The advantage of shared codes is that they are much easier to manage and distribute - and therefore much more convenient for regular promotional campaigns.
Note - a full overview of the new Redemption Code system will be provided in a subsequent update post.
Devs using the older Redemption Code system should keep the following in mind:
- Existing Redemption Code APIs work for both older (Personal) and newer (Shared) redemption codes.
- We have, however, changed how codes are stored. The actual scan codes are now stored in UPPERCASE format (to better support case-insensitive lookups). To ensure previously generated codes still work, a compatibility flag has been added (and it defaults to enabled for existing apps). The new flag is “[x] Support legacy case-sensitive redemption codes ('personal' scan codes)”
- When attempting to Redeem codes without specifying the optional code type (now known as campaign name), the system will assume that codes <= 20 characters are Shared Codes, while codes 25 characters or greater are Personal Codes.
Session Duration (and other metrics)
brainCloud 5 aims to improve the metrics and analytics available to app developers.
brainCloud will never be a full-on analytics platform (that’s a whole product category of its own) - but increasing the scope of what we are providing (from 7-day analytics to 30-day analytics) will greatly help our community in understanding the health of their apps and their users.
To start, brainCloud has added support for Session Duration. This is an important metric for assessing the engagement of the users of an app. But we need your help to collect it!
brainCloud will now record the duration of a session in the loginLog
entry of the player… IF the app calls Logout()
to inform the servers when the session is over. Many apps are already calling this (it is an existing method on the playerState
service) and thus they don’t need to change anything.
To make it more convenient, we have also added a new Logout()
method to the wrapper itself.
You can check to see if session durations are being recorded for your app by examining the Duration column in the new App > Users > Summary > User Activity screen. If it has values - you are good! If not - add that Logout()
call!
Important - to record the duration of a session brainCloud needs to be told when the session ends. This is done by calling Logout()
on the wrapper
or playerState
service.
brainCloud 5.2 is now collecting additional metrics that will be leveraged in upcoming releases.
These metrics include:
- session activity - we have refactored and expanded our
loginLog
. brainCloud now tracks the last 30 days' worth of logins for a player. - session duration - as mentioned above, we now record the duration (in seconds) of a session - IF the
logout()
method is called. - hourly counts - we have increased the number of metrics that we record hourly (as opposed to daily). This will improve our ability to report on user engagement throughout a day - and relative to the previous day at this time
- session balances - we are recording the balances of certain metrics (like XP, currencies, etc) at the start of a session - so that we can compare sessions and report when changes have occurred. This will help brainCloud to better communicate the behavior of a user during the last 30 days in your app
- last purchase date - a new field to help devs assess the current value of a user to their app.
Devs will see the benefits of these metrics in future releases of brainCloud.
Portal Customization
In addition to improving the usability of the base screens themselves - we have added a new App > Design > Portal section that allows devs to customize the configuration of the Design Portal for their app. We plan to build upon this feature heavily in future releases.
To start - we have added the ability to customize elements of the User Browser and User Summary. These sections allow devs to simplify the portal by hiding options that don’t make sense for their app (i.e. there is no need to be able to search by PSN ID if your app does not support Playstation!).
On a somewhat related note - devs can now set colors to be associated with Virtual Currencies. These colors are specified on the App > Design > Marketplace > Virtual Currencies screen.
Additional Improvements
brainCloud 5.2 includes a ton of other improvements as well. These include:
Archived Users - Post-archive scripts
- Devs can now choose to run a script after a user has been archived. This is convenient if deleting a user may leave a bit of secondary data that needs clean-up. Configure via the App > Design > Core App Info > Archive Settings screen.
Builder API / CLI
- Now supports improved exporting and importing of cloud code scripts - so that meta-data can be preserved properly.
Checkpoints
- Every time brainCloud does an import or a deployment into your app - it creates a checkpoint - which is a backup of your app.
- Checkpoints back up your app’s meta-data, scripts, migrate-able custom entities, and migrate-able global entities. They do not include a backup of files - or any user data.
- This release adds the ability for a dev to manually create a new backup checkpoint
- Checkpoints are accessed via the App > Design > Admin Tools > Checkpoints screen.
Email validation
- Up until now, brainCloud has been fairly lax in verifying the format of email addresses used in the system (requiring our customer’s apps to take on that burden themselves).
- brainCloud 5.2 now enforces that emails added to the system are validly formatted. ← note - this feature will be enabled a few days after the deployment of the 5.2 software.
Hosting
- Launching servers - the system has additional retry logic to help deal with errors that occasionally happen (normally associated with just-in-time patch updates) when launching cold Room & Relay Servers.
Relay Servers
- Reconnects - Relay Servers now better handling reconnect scenarios. There is also an option to allow reconnects even if the user’s session has changed ("ALLOW_REJOIN_BY_PROFILE_ID": "true").
Push Notification Tokens
- There have been some odd occurrences where users end up accumulating hundreds of push notification device tokens - which can result in rate limiting from Apple & Google when we attempt to send notifications.
We have made two changes to help address this:
- The maximum expiry for push notification device tokens has changed from NEVER to 365 days.
- User accounts are now limited to a maximum of 10 device tokens. Adding an 11th token will result in the oldest token being deleted. [Note - this limit is customizable on a per-app basis. Contact support if your app needs an exception.]
Virtual Currencies
- By default - our currency system prevents currency balances from going below zero.
- That said - there are certain situations where the developer (or a CSR) may need to revoke a player's currency - and in those cases the balance _should_ go less than zero (otherwise it would open up a window for fraud).
- The Design Portal and the APIs have been extended to incorporate the concept of "revoked" currencies.
Web Services
- We have added a new [x] Preserve during deploy setting for Web Services
- This allows your app to have different web service endpoints configured for different stage versions of your app (i.e. Dev vs. Test vs. Production) – and keep deployments from overriding those settings!
Portal Changes
We continue to rapidly evolve our next-generation design portal, Portal-X. This release brings significant improvements and new features - and we’re still just getting started!
Important - we will be removing support for our Legacy Portal soon! If you have feedback on how Portal-X isn’t meeting your needs - now is the time to tell us! Let us know via the Chat Widget or Forums!
Banners and General UI
We are working to make our Portal more useful and user-friendly - especially for non-development personnel like Product Managers and Customer Support Representatives (CSRs).
Our new Live Lock banner reflects this direction - providing a bit more information on what is going on and how to interact with it.
We have also adjusted the controls for our Context and Screen Info banners - making it easier to understand how to toggle them on and off.
The placement of the Screen Help hyperlink and the Sharing URL links have been updated as well.
Full-screen Script Editor
Laptop users - we have heard your cries!
The new Script Editor layout is designed to be easier on screen real estate. We have even added a new Full-screen Mode to take things to the max!
We have also made the API description sections of the API Explorer and S2S Explorer screens collapsible.
User Screens
One of our big goals for brainCloud 5 is to improve the experience for CSRs (Customer Support Representatives) using brainCloud.
As initial steps toward this goal - we have made several improvements to the Users section of the portal.
To start with, we have improved the experience of searching for users:
Search
- Email Search - the system can now do a partial search for a user’s email identity
- Customization - you can customize the list of search methods via the new App > Design > Portal > User Browser Settings screen.
User Browser
- More info faster! - the user browser has been redesigned to surface more information (like which users are spenders on your platform). The User Browser is also faster and more responsive now.
- Segments - The Browse tab of the User Browser has been enhanced to support filtering the user list by segment!
- User Preview - more useful context regarding the currently selected user.
Note that you can turn off the Revenue section via the App > Design > Portal > User Summary Configuration screen if your app doesn’t use brainCloud for in-app purchases.
Once you have located the user account - we have put more information at your fingertips!
User Summary
- User Activity - a list of the last 30 days of user sessions
- Recent Errors - a subset of Global Monitoring’s Recent Errors screen - but for the selected user
- Unreadable Requests - any invalid client API requests that were received (and not processed) from this user
Marketplace
- Transactions - An improved view of this user’s purchases - complete with a new chart of the past 30 days of activity.
- Redemption Codes - an updated view of any Personal or Shared redemption code activity for this user
Lastly, we have improved the Virtual Currency screens to make it easier to understand and adjust a customer’s currency balances (via the App > Users > Marketplace > Virtual Currency screen).
Custom Entity Monitoring Enhancements
We have significantly enhanced the Custom Entities Monitoring screen (App > Global > Global Data > Custom Entities), to make it more responsive - and to offer more custom query capabilities.
The screen now requests the “document count” in the background - so that the initial page of results can be displayed more quickly. When available, it will present the currently “cached” value of the count (which it updates once the full count result is available).
In addition, there are new [Sort] and [Hint] tabs available - so that requests can be fully tailored before sending them to the server.
Portal Scalability
Sometimes our customers surprise us with how heavily they use portions of our system. >10K leaderboards? Really?!!
We have made significant improvements to the performance of the following screens:
- App > Design > Leaderboards > Leaderboard Configs
- App > Global > Leaderboards > Leaderboards
- App > Global > Global Data > Custom Entities
- App > Global > Global Data > Global Entities ← it’s faster, but more improvements are coming
- App > Users > User Browser
API Changes
The following changes/additions have affected the brainCloud API:
Authenticate
AuthenticateEmailPassword()
will now validate the email format before attempting to create a new account. If the provided email is not in the proper format, it will return an error with areasonCode
of40221
- with the message "Email address fails validation"
Identity
attachEmailIdentity()
will now validate the email format before attempting to create a new account. If the provided email is not in the proper format, it will return an error with areasonCode
of40221
- with the message "Email address fails validation"
Leaderboard
SysGetLeaderboardConfigsPage()
/SysGetLeaderboardConfigsPageOffset()
- new paged Leaderboard retrieval APIs -- useful for apps with a crazy number of leaderboards!
Redemption Code
AddCode()
- the method for adding a new code to a Personal Code campaign will now return a warning if the scanCode provided is < 25 characters. Personal Codes should be 25 characters or greater.RedeemCode()
- if the optionalcodeType
is not provided, the system assumes that codes <= 20 characters are shared ('multi-use') codes - while codes >= 25 characters are personal ('single-use') codes.SysAddMultiUseCodeType()
- new cloud code-only method for creating Shared campaign redemption codes. (Also known as multi-use redemption codes).SysGetCodeTypePage()
/SysGetCodeTypePageOffset()
- a new set of cloud code-only methods for retrieving the list of redemption code campaigns.
VirtualCurrency
RevokeCurrency()
,RevokeParentCurrency()
andRevokePeerCurrency()
methods have been added
Wrapper
AuthenticateEmailPassword()
will now validate the email format before attempting to create a new account. If the provided email is not in the proper format, it will return an error with areasonCode
of40221
- with the message "Email address fails validation"Logout()
- new convenience method used for ending a user's API session. Functionally equivalent to the playerState method of the same name, though the wrapper version includes aforgetUser
option to clear the profileId saved to the device as well. ← useful for apps that force a full login each time
Libraries and Examples
Client Libraries
All Libraries
- A new
Logout()
call has been added to the brainCloud wrapper. Includes a forgetUser parameter to clear the stored user's profileId.
braincloud-csharp (C#/Unity/Godot)
Wrapper
Initialize()
method has improved validation of theserverUrl
parameter:- Prepends "https://" if not included in the URL.
- Automatically appends "/dispatcherv2" if absent (and if there's no other slash with content included in the URL).
- Fixed a bug with the Event service where certain calls used
int
instead oflong
for tick values. - Improvements and bug fixes for Godot Engine.
braincloud-unreal-plugin (Unreal)
- Improvements and bug fixes in WebSockets
- Updated CI to ensure stable builds and compatibility across engines and platforms
- More tools exposed for blueprints
braincloud-cpp (C++)
- Improved error logging for relay disconnect
braincloud-java (Java)
Fixed SmartSwitch bug in BrainCloudWrapper.java
- A callback containing authentication request was not being called
- Added Logout method to BrainCloudWrapper.java
braincloud-js (JavaScript)
- Added Logout function to brainCloudWrapper.js
S2S Libraries
All S2S libraries
- Added RTT / WebSocket support
brainclouds2s-unreal (Unreal)
- S2S Library repository is now usable as an Unreal plugin and can be added as a submodule to a project
- The S2S Unreal plugin depends on the BrainCloud Unreal plugin for utility functions
- Created a new repository for the S2S Unreal Unit Test project that demonstrates the use of the S2S library
brainclouds2s-cpp (C++)
- Added brainCloud namespace
Examples
All Examples
- All examples have been updated to showcase the use of the BrainCloudWrapper
Logout()
call. - RelayTestApp Cursor and Shockwaves normalized to send percentage position that ranges from 0,0(for top left corner) to 1,1 (for bottom right corner) for reliability across devices and screen sizes.
examples-unity (C# Examples)
- The marketplace example now has support for iOS Push Notifications and App Store in-app purchases and subscriptions.
- BCChat example has been updated with a new UI and showcases a more automated process for handling channel connects, disconnects, and other Chat server calls.
Relay Test App has additional features including:
- 2 sets of Disconnect/Reconnect buttons have been added to demonstrate how to handle Relay disconnection (IE: From a network connection loss). But only for lobbies that have the right room configuration. Info on setting this up can be found in the README.md.
- Lobby types are now filled in using Global Properties to display in the drop-down menu from the main menu. Info on setting this up can be found in the README.md.
examples-godot (Godot Examples)
Added Script, Global Statistics, Player Statistics, XP, and Virtual Currency services to the demo
- Run Cloud Code scripts
- Increment statistics and experience points
- Award/spend virtual currency
examples-javascript (JavaScript Examples)
Added Team Mode to Relay Test App
- Users can send shockwaves to everyone (both teams), opposing team members, or the same team members based on click type (left, middle, right)
Added EndMatch and JoinMatch features to the Relay Test App
- Users can “End Match” to return to a lobby with the same players rather than exiting the game completely
- Users can “Join Match” from a lobby if other users have already started a match
examples-unreal (Unreal Examples)
- Updated to Unreal Engine 5.3 (tested in Unreal Engine 5.4)
- Retired 4.27 branch. A demo 4.27 app is available in the main branch.
- New minimal test app to quickly test developer blueprints or source code on devices and consoles.
- Improved Leaderboard project
FPS Example includes features such as:
- Friend System (Includes inviting people as friends, Joining friends that are in a lobby, and remove friend)
- Lobby System + Lobby Invite through Friends List
- Relay Service Rooms with Ping data (Using First Person Shooter Template)
- Chat System, one in Main Menu as the Global Message board and second in Lobby as Lobby Message board.
- Create Custom Game (Includes changing lobby room name, time duration, region, and map selection)
- RTT (Real Time Tech) callbacks to demonstrate how to utilize Presence (in friends list it shows who is online), Event system(handles friend request system), Chat system for global and lobby messages, and Lobby system.
- New BCChat project
Documentation and Tutorials
BootCamp Tutorials
- Additional Godot tutorials are now available!
Documentation
- All the latest API additions and changes have been incorporated into our new doc site at docs.braincloudservers.com !