brainCloud 4.9 is live!
brainCloud 4.9 is a massive update with a hat-trick of new Multiplayer / Hosting Features – plus Unity Compression and some highly requested Marketplace and Management APIs. We hope you like it!
Release Highlights
Amazon GameLift Support!
We are pleased to announce that brainCloud now supports Amazon GameLift.
This means that you can enjoy all the benefits of brainCloud multiplayer – with our online matchmaking and lobby services – but with the flexibility of running and hosting your own server fleets in GameLift.
This is especially helpful in scenarios where:
- You already have game servers running in GameLift
- Your game needs the performance boost provided by GameLift’s non-containerized architecture
- You want to lower costs with GameLift’s ability to utilize AWS Spot Instances
The best part is that once you configure it – there are almost no changes to your client code. The only difference is that the connectData
information returned to the client will specify a protocol type of gamelift
.
"connectData":{"address":"99.79.192.13","ports":{"gamelift":9613}}
Important update - on Feb 1, 2024, the number of API Calls per player [added to GameLift servers] is changing from 5 -> 10. For more information, see this update.
Join in progress!
Speaking of brainCloud lobbies and matchmaking – brainCloud 4.9 adds support for backfilling of matches – which means that new/replacement players can finally be added to matches in progress!
Note that the room server should use the SysGetLobbyMember()
call to validate the legitimacy of any players attempting to join the Room Server after the match starts.
Retrieve List of Lobbies
To complete our multiplayer hat-trick, developers can now query the list of active lobbies in a game. This is useful for games providing a more classic multiplayer experience.
Simply pair the new GetLobbyInstances()
and GetLobbyInstancesWithPingData()
calls with the existing GetLobbyData()
and JoinLobby()
calls to implement your own old-school lobby system!
AppStore Item Purchases
At long last, Marketplace Products can now include Inventory Items. This means users will be able to acquire your game’s “Magic Wand of Silly Walks” directly through an in-app purchase!
Unity Client Compression
The Unity Client now officially supports compressing of client ↔︎ server messages.
Sending large API requests/responses takes time – especially under mobile conditions. With a pair of flags, you can enable compression for faster processing of brainCloud requests. This can also reduce the occurrence of network timeouts that can happen when sending/receiving larger requests.
brainCloud’s compression support is intelligent – and only kicks in if the message bundle to be transmitted is greater than a size threshold – which defaults to 50Kb. Any messages sent/received above that threshold will be compressed (and uncompressed) automatically and transparently to your app.
Note that compression is disabled in the 4.9 Unity Client by default.
To enable compression of both requests and responses, call:
// Compress larger requests and responses
_bc.EnableCompressedRequests(true);
_bc.EnableCompressedResponses(true);
Updated Script Path Handling
We have updated brainCloud’s handling of paths for the bridge.callScript()
method to make it more consistent with industry standards (and our own bridge.include()
method).
Before this change, if brainCloud were running script /subFolder/myScript.ccjs
– the following two calls would look for their files in different directories:
bridge.include("myImportFile.ccjs")
← would look formyImportFile.ccsj
in the current directory of the calling script – i.e. “/subFolder” ✅bridge.callScript("myUtilityScript.ccjs", {})
<- would look formyUtilityScript.ccjs
in the root! ❌
With this change, the two calls use the same algorithm to determine the referenced script.
As you would expect, we have introduced a new compatibility flag that controls this improved behavior. The new [x] Use legacy script path handling flag, if enabled, preserves the old functionality. This flag is enabled by default for all existing apps, and disabled by default for newly created apps.
Tournament Management APIs
We have expanded our Sys APIs to support Tournament Management.
This includes new cloud-code only APIs for:
- Managing Tournament Templates
- Enabling Tournaments for a Leaderboard Config
- Editing Tournament details for current and future periods
In addition, we have added new methods for more efficiently retrieving the list of leaderboards, and retrieving leaderboard details. See the API Changes section for more details.
Additional Improvements
This release also includes the following:
- $textquery support
- the query syntax for Custom Entities has been extended to support MongoDB $text queries.
- Improved RTT connection idhandling
- The Relay Server Protocol protocol (and the Relay Server and Client Libraries that implement it) have been enhanced for more consistent usage of RTT connection IDs – basically, the protocol now uses
profileIdCx
ids instead of justprofileId
- There is a new compatibility flag, [x] Include legacy lobby owner field in API output, that when enabled ensures that this new behavior still works with old clients. This flag is enabled by default for all existing apps, and disabled for newly created apps.
- The Relay Server Protocol protocol (and the Relay Server and Client Libraries that implement it) have been enhanced for more consistent usage of RTT connection IDs – basically, the protocol now uses
- Additions / Improvements to the Builder API
- Support for API Hook management
- Support for basic Team Member management
- Improvements to Async MatchAPIs
- We are now returning handy
summaryFriendData
for players in more of the AsyncMatch calls – includingFindMatches()
,FindCompleteMatches()
andReadMatch()
- We are now returning handy
- Additional HTTP Clientmethods
- Support for HTTP PATCH, DELETE, and HEAD commands
- External Authenticationenhancements
- Ability to return additional information with authentication results
- For more info – see the new
authPayload
andextraErrorJson
fields documents in the API Docs.
Portal Changes
Design
- Core App Info | Advanced Settings
- Added new compatibility flag: [x] Include legacy lobby owner field in API output. Enabled for existing apps by default. See Improved RTT Connection ID handling for more information.
- Added new compatibility flag: [x] Use legacy script path handling. Enabled for existing apps by default. See Updated Script Path Handling for more information.
- Cloud Code | My Servers
- The new GameLift Room Server option has been added.
- Cloud Code | Scripts
- When dealing with live apps, the Script Editor will no longer allow portal users to start editing a script before unlocking the app — instead of just refusing to save the changes! A small but useful improvement!
- Custom Config | Legacy Files
- The old Files page has been fittingly renamed to Legacy Files.
- Integrations | Manage Integrations
- A new AWS GameLift Integration section has been added.
- Leaderboards | Leaderboard Configs
- We have added a search box for filtering the list of leaderboards. Super useful for those apps with tons of leaderboards!
- Marketplace | Products
- Added the ability to add Items as reward items for in-app purchase products.
- Multiplayer | Lobbies
- Added new options to the Rules page for lobbies:
- Disband on start (default) – lobbies will be terminated when the game starts. This flag is enabled by default for existing apps.
- Allow join in progress – allows players to join games that are already in progress (i.e. backfilling)
- Added new options to the Rules page for lobbies:
Team
- Manage | Apps
- We’ve added an app’s
appId
(in parenthesis) to the list for easy reference - We’ve also added a new Last Updated field – so it is easier to see which apps have been edited recently. Note that we have also updated how some of our nightly processes work with the
updatedAt
field of the game record – so that going forward, apps are not considered to be “updated” when our back-end billing processes run.
- We’ve added an app’s
API Changes
The following changes/additions have affected the brainCloud API:
- AsyncMatch Service
- We have added user summary data to the results returned by
CreateMatch()
,SubmitTurn()
,FindMatches()
,FindCompleteMatches()
,ReadMatch()
andUpdateMatchSummaryData()
.
- We have added user summary data to the results returned by
- Client Service (Unity Only)
- Call the new
EnableCompressedRequests()
andEnableCompressedResponses()
methods to enable compression.
- Call the new
- Global App Service
- New
ReadSelectedProperties()
andReadPropertiesInCategories()
methods allow the app to retrieve a subset of the app’s global properties instead of all of them. - We have also added new S2S and cloud-code only methods for creating properties:
SysCreatePropertyString()
andSysCreatePropertyJson()
- New
- Group Service
- New cloud-code only
SysIsGroupMember()
call for testing group membership.
- New cloud-code only
- HTTPClient
- Added support for HTTP PATCH:
PatchJsonResponseJson()
andPatchTextResponseText()
- Added support for HTTP DELETE:
DeleteJsonResponseJson()
andDelete()
- Added support for HTTP HEAD:
HeadRequest()
- Added support for HTTP PATCH:
- Leaderboard Service
- New
PostScoreToDynamicGroupLeaderboardDaysUTC()
call allows for the dynamic creation of group leaderboards with aDAYS
rotation. - New
SysCreateLeaderboardConfig()
andSysEditLeaderboardConfig()
methods are updated versions of the olderSysCreateLeaderboard()
andSysEditLeaderboard()
methods – with the ability to edit tournament settings. The old methods continue to be available (they are not deprecated). - New
SysListLeaderboardConfigs()
andSysGetLeaderboardConfig()
methods for more efficient retrieval of summary information vs. leaderboard details, respectively. - New APIs for editing tournament period settings on leaderboards:
SysEditTournamentSettingsForFuturePeriodsOnly()
andSysEditTournamentSettingsIncludingCurrentPeriod()
. Note that you would usually only edit future periods – because you don’t want to change the rules of a tournament that is already underway – that seems unfair - New APIs for editing adhoc tournament periods –
SysCreateAdhocTournamentPeriod()
,SysEditAdhocTournamentPeriod()
, andSysDeleteAdhocTournamentPeriod()
- New
- Lobby Service
- Added new
GetLobbyInstances()
andGetLobbyInstancesWithPingData()
calls to return the list of available lobbies. Pair with the existingGetLobbyData()
andJoinLobby()
calls to implement your own old-school lobby system!
- Added new
- Tournament Service
- New management calls –
SysListTournamentTemplates()
,SysCreateTournamentTemplate()
,SysEditTournamentTemplate()
,SysReadTournamentTemplate()
andSysDeleteTournamentTemplate()
.
- New management calls –
- User Service
- A number of Sys methods that were missing from the S2S proxy have been added
Miscellaneous Changes / Fixes
- Updated libraries
- All libraries have been updated with the latest API changes. Go get ’em!
- Documentation updates
- All of the new API calls have been added to the API Reference
- Important Fixes
- BCLOUD-792 – JS S2S Heartbeat doesn’t work – fixed.
- BCLOUD-799 – User Batch Script processing issue with PlayerSession API version causing Leaderboard API errors
- BCLOUD-945 – REDIS lag causes issues when scripts are moved between folders
- BCLOUD-980 – Scripts in the root folder are not being cleared when restored to checkpoint
- BCLOUD-981 – Add protection for PlayerStatistics experience points from going negative
- BCLOUD-982 – Add more input validation for Tournament rewards input for GlobalGameStatistics and/or PlayerStatistics stat names
- BCLOUD-998 – Add support for $text operator text query document fields
- BCLOUD-1057 – Locks with no player session context not unlocking properly
- Plus miscellaneous fixes and performance enhancements…