📜 | Changelog

Version Changes

An overview of what's new in each version of playroomkit:

VersionChanges
v0.0.83- Added: getDiscordAuth() method to get Discord's auth instance.
- Added: Support for generic types in useMultiplayerState and usePlayerState hooks.
- Fixed: Resolved crash when running game via Discord DMs.
v0.0.82- Added: Improved Discord authentication to prevent misuse from unauthenticated users.
v0.0.81- Fixed: Regex crash on iOS 16 before insertCoin.
v0.0.80- Fixed: Update SDK to use /.proxy/* to connect to Playroom backend.
v0.0.79- Added: Parallel uploads in CLI tool to speed up the upload process.
v0.0.78- Added: New CLI tool to upload your game, in private beta for now.
v0.0.77- Fixed: Revert Player ID persistence between sessions to allow running game in two tabs in same browser.
v0.0.76- Fixed: Resolve React warning caused by React 18 and above.
- Fixed: Player ID is now longer and persists between sessions.
v0.0.75- Added: getDiscordSDK API to get the SDK from Playroom instead of importing it.
v0.0.74- Added: getDiscordAccessToken API for Discord mode.
- Added: a new multiplayer.full.umd.js bundle that includes React and Discord dependencies.
v0.0.73- Added: Persistent server data API for Discord mode.
v0.0.72- Fixed: Importing playroomkit in SSR-enabled frameworks like Next.js now doesn't crash with window not defined error.
- Fixed: Player ID in discord mode is not random in each session now.
v0.0.71- Added discord option to insertCoin to allow Playroom games to be embedded in Discord Activities.
v0.0.70- Added: gameId field to insertCoin method to connect your game to developer portal.
v0.0.69- Fixed: RPC.register() before calling insertCoin now works as expected.
v0.0.68- Fixed: resetPlayersStates() method caused bot player's .isBot() to return false.
- Fixed: usePlayersList hook and onPlayerJoin callback now attempt to return players in the order they joined.
- Fixed: startMatchmaking() method now retains player profile and states when jumping into a public room.
- Fixed: When skipLobby: true, the player's .getProfile() is now always populated with a random name and photo.
- Fixed: Page reload will now clear player state of that player on all clients.
- Fixed: An alternative deterministic approach at deciding players random name and photo.
v0.0.67- Added: Persistence mode API
- Added: Support Turn-based and Async Mode.
v0.0.66- Added: startMatchmaking() method to jump into a public room from a regular room along with your party players.
- Fixed: Lobby UI CSS to fit smaller screens better.
v0.0.65- Fixed: Show players online when matchmaking is in progress.
v0.0.64- Fixed: Bug in matchmaking that prevented matching players of same game together.
v0.0.63- Fixed: Bug that causes warnings and crash that happens when using React 18 via CDN.
v0.0.62- Added: A simple Matchmaking mode that joins first open public room.
v0.0.61- Fixed: A bug causing HTTP call to wrong Playroom server host.
- Fixed: TypeScript type for callback in RPC.call.
v0.0.60- Added: RPCs in Playroom that can be triggered on host, other players, or everyone.
- Fixed: Crash on streamMode when stream screen joins later.
v0.0.59- Fixed: Prevent crashing if browser does not support WebRTC APIs.
v0.0.58- Fixed: Default value of hooks were ignored if non-truthy.
v0.0.57- Fixed: TypeScript type fixes for onPlayerJoin.
- Added: callbackOnError optional argument for insertCoin method.
- Added: defaultStates and defaultPlayerStates options for insertCoin method.
v0.0.56- Fixed: Internal cleanups only.
v0.0.55- Fixed: maxPlayersPerRoom now applies to bots and gamepads.
- Improved networking code to have a better state sync between players.
- Fixed: insertCoin with skipLobby: true will wait for connection before resolving.
- Added resetStates and resetPlayersStates methods to reset multiplayer state.
v0.0.54- Fixed link sharing for itch.io.
- Fixed waitForState to not resolve on non-truthy values
- Fixed useMultiplayerState react hook to not go into infinite re-rendering if value is set to null.
v0.0.53- Fixed UI text color issues when body of the page has some color set which broke UI color in lobby UI.
v0.0.52- Added .kick() method to PlayerState and a button to kick player/bot in the lobby UI.
- Added onDisconnect method to handle disconnects due to network problems or due to being kicked by host.
- Added primitive reconnect logic to attempt reconnecting to server a few times before giving up.
v0.0.51- Fixed UI scaling issues when viewport meta tag is not present.
- Added usePlayerState hook to listen to a player's state changes.
v0.0.50- Added an optional maxPlayersPerRoom option to the insertCoin method, which sets a maximum limit on the number of players per room.
v0.0.49- PlayerState is now passed to onQuit callback handler as argument.
v0.0.48- Fixed a bug with TikTok Live mode where longer usernames were not allowed.
v0.0.47- Added optional callbacks to insertCoin, waitForState and waitForPlayerState methods, helpful if your environment does not support promises.
v0.0.46- Fixed typos in TikTok API and TypeScript types.
v0.0.45- Fixed many networking bugs where onPlayerJoin and onQuit were skipped for some players resulting in inconsistency bugs.
v0.0.44- Fixed a bug where lobby is shown for a split-second when skipLobby: true.
- Added experimental liveMode with TikTok support.
v0.0.43- Fixed a bug where Playroom game wouldn't load inside an iframe over cross-origin.
v0.0.42- Fixed a bug where name and photo fields are not URL-decoded before setting to profile.
v0.0.41- Added skipLobby URL param which works just like skipLobby in insertCoin.
- Fixed a bug where name and photo fields are not locked when they are provided from the URL params.
v0.0.40- Fixed a bug where calling onPlayerJoin or any other hooks before insertCoin ignores InitOptions completely.
v0.0.39- Fixed a bug where onPlayerJoin is not called at all for non-hosts.
v0.0.38- Added addBot method to add bot to lobby from JS.
- Added reconnectGracePeriod API to let player rejoin in given ms if they were disconnected.
- Fixed player.onQuit() method to now return method to unsubscribe.
- Fixed a bug where custom avatars were not being applied to bots.
- Fixed a bug where if a player reconnects, they were given a new id instead of the one they had before.
v0.0.37- Added option to auto-set name and photo of current player using URL params.
v0.0.36- Added waitForPlayerState method.
- Fix useIsHost React hook.
v0.0.35- Fix missing types in TypeScript d.ts for Bot API.
- Added skipLobby and roomCode options to insertCoin.
v0.0.34- Added Bot API to allow for defining bots in your games.
v0.0.33- Fix missing types in TypeScript d.ts for React hooks.
- Added destroy() method to Joystick.
v0.0.32- Fix type mismatches in TypeScript d.ts types file in the bundle.
v0.0.31- Added avatars option to insertCoin method to allow overriding player avatar options to a custom list of images. PlayerState.getProfile() now has a .avatarIndex property with the player selected avatar's index; from the list initially provided.
- Changed lobby UI from purple to black so it's more neutral and compatible with any game styling.
v0.0.30- Added TypeScript Types for all APIs.
- Changed Gamepad API to use buttons provided to Joystick API instead of just firing button1, button2, etc.
v0.0.29- Added allowGamepads flag to insertCoin method to allow players to use gamepads to control the game when streamMode is also enabled.
v0.0.28- Fixed a minor bug in Joystick API and added zones to Joystick API to allow customizing the button-like triggers that fire on joystick's direction movement.
v0.0.27- Added Joystick API to allow controlling the game using a virtual joystick.
v0.0.26- Fix a timing bug where newer state change coming from unreliable (WebRTC) is discarded in favor of older state coming from reliable (WebSockets).
v0.0.24- Added baseUrl option to insertCoin method to allow customizing the base url of the game.
v0.0.23- Fixed setState bug where object typed state is not updated properly.
v0.0.20- Fixed issue where game running inside an iframe won't be able to copy link to clipboard, so we show an alternative way to copy link
v0.0.19- Added setState and getState methods to set or get multiplayer state
v0.0.18- Fixed issue where disconnected player won't disappear from all screens.
- Fixed issue where profile is not reflected to all screens.
v0.0.17- Added isStreamScreen() method to check if game is running on stream screen.