[Paid] Fire Match and Fire Match Room Extension - Multiplayer matchmaking using Firebase πŸ”₯

πŸ”₯ FireMatch & FireMatchRoom

πŸ”₯ FireMatch & FireMatchRoom AI2 Extensions πŸ”₯

:rocket: FireMatch and FireMatchRoom extensions for real-time 1v1 matchmaking using Firebase Realtime Database. These extensions provide efficient player matching, data exchange, and room management with seamless Firebase integration.


:fire: FireMatch (Random 1v1 Matchmaking)

  • :arrows_counterclockwise: Auto Matchmaking - Automatically finds and matches two players.
  • :zap: Instant Matching System - Uses a queue-based system to prevent duplicate matches.
  • :satellite: Real-Time Game Data Exchange - Allows instant data transfer between players.
  • :link: Optimized Firebase Structure - Ensures smooth performance and minimal data usage.
  • :dart: Simple to Use - No manual room creation required just join and play.

:house: FireMatchRoom (Room-Based 1v1 Matchmaking)

  • :id: Custom Room System - Host can create a Room ID and invite another player.
  • :satellite: Real-Time Game Data Exchange - Enables smooth communication within the room.

:wrench: Common Features in Both Extensions

  • :video_game: Flexible Room Management - Allows controlled entry and exit of players. Players can leave and reset the room
  • :arrows_counterclockwise: Rejoin Room Support - A player can reconnect using the same Room ID if disconnected.
  • :pushpin: Persistent Data Handling - Ensures no room conflicts or mismatches.
  • :white_check_mark: Firebase-Based Matchmaking – Based on Firebase realtime database.
  • :white_check_mark: Efficient Data Handling - Optimized to reduce Firebase bandwidth usage.
  • :white_check_mark: Events & Functions for Easy Integration - Simplifies implementation in AI2 projects.
  • :white_check_mark: Supports All AI2 Platforms - Compatible with AI2 distros.

πŸ”₯ Why to use FireMatch & FireMatchRoom?

Using Firebase for real-time matchmaking can be complex, especially when handling race conditions, duplicate rooms, and player synchronization. FireMatch and FireMatchRoom eliminate these challenges by leveraging Firebase Transactions, ensuring seamless, conflict-free matchmaking.

:white_check_mark: No Duplicate Rooms or Conflicts

  • The extension uses Firebase Transactions to ensure that two players are matched only once, preventing duplicate room creation.
  • Avoids race conditions, ensuring multiple players don’t get assigned to the same slot.

:zap: Seamless, Auto-Synchronized Matchmaking

  • FireMatch automatically pairs two players without the need for complex logic.
  • FireMatchRoom ensures manual room-based matchmaking while preventing unwanted interruptions.

:hammer_and_wrench: No Complex Matchmaking Logic Required

  • Creating a custom matchmaking system from scratch can be tricky, requiring manual Firebase structuring, status tracking, and error handling.
  • These extensions handle everything for you, so you only need to call simple functions to start matchmaking!

:arrows_counterclockwise: Real-Time Data Exchange

  • Both extensions allow instant real-time data sharing between players, ideal for turn-based or interactive multiplayer games.
  • Supports sending and receiving data events, ensuring smooth gameplay.

:rocket: Optimized for Performance

  • Efficient Firebase database structuring reduces unnecessary reads/writes.
  • Auto-cleanup of inactive rooms ensures no leftover data occupies the database.

:memo: Specifications


:floppy_disk: Size: 30.05 KB
:gear: Version: 1.0
:iphone: Minimum API Level: 7
:date: Updated On: 2025-02-15T18:30:00Z
:link: Help URL: Learn more
:computer: Built & documented using: FAST-CLI and Akshat Extension document generator

:handshake: Multi-Components

  1. FireMatch
  2. FireMatchRoom

:fire: FireMatch

Fire Match extension for 1v1 two player random matchmaking using Firebase real-time database.

Events:

FireMatch has total 3 events.

:yellow_heart: OnMatchFound

OnMatchFoundBlock

Event raised when a match (opponent) is found. Returns room ID and opponent ID.

Parameter Type
roomID text
opponentID text

:yellow_heart: OnRoomDataChanged

Triggered when any data in the room is updated for both players.

Parameter Type
roomID text
myData text
myGameData text
myStatus text
myRole text
opponentData text
opponentGameData text
opponentStatus text
opponentRole text
rawData text

:yellow_heart: OnError

OnErrorBlock

Triggered when an error occurs.

Parameter Type
errorMessage text

Methods:

FireMatch has total 12 methods.

:purple_heart: Initialise

InitialiseBlock

Initializes fire match with firebase URL.

Parameter Type
firebaseURL text

:purple_heart: StartMatching

StartMatchingBlock

Adds a player to the matchmaking queue. Here player data will be any data that will be exchanged with opponent for eg. name and avatar.

Parameter Type
playerData text

:purple_heart: RefreshRoom

RefreshRoomBlock

Refreshes the room data and triggers OnRoomDataChanged event with available data in the room.

:purple_heart: CancelMatching

CancelMatchingBlock

Cancels matchmaking and removes the player from the queue.

:purple_heart: LeaveRoom

LeaveRoomBlock

Leaves the room by updating the player's status as left and stops getting room data changes.

:purple_heart: ClearRoom

ClearRoomBlock

Clears the room data and stops getting room data changes.

:purple_heart: StoreGameData

StoreGameDataBlock

Stores game data for the player or opponent in the room.

Parameter Type
gameData text
forOpponent boolean

:purple_heart: UpdatePlayerStatus

UpdatePlayerStatusBlock

Updates the status for the player or opponent in the room.

Parameter Type
status text
forOpponent boolean

:purple_heart: RejoinRoom

RejoinRoomBlock

Rejoin an existing room using the room ID if the player was previously part of it.

Parameter Type
roomId text

:purple_heart: ResetRoom

ResetRoomBlock

Resets the room for a new fresh match.

:purple_heart: GeneratePlayerID

GeneratePlayerIDBlock

Generates a random player ID either alphanumeric or numeric with specified length (minimum 4).

Parameter Type
alphanumeric boolean
length number

:purple_heart: IsPlayerInRoom

IsPlayerInRoomBlock

Checks if the player is already in a room.

Getters:

FireMatch has total 3 getter properties.

:green_circle: GetPlayerID

GetPlayerIDBlock

Gets the current player ID.

  • Return type: text

:green_circle: GetOpponentID

GetOpponentIDBlock

Gets the opponent player ID.

  • Return type: text

:green_circle: GetRoomID

GetRoomIDBlock

Gets the Room ID.

  • Return type: text

:fire: FireMatchRoom

Fire Match Room extension for room-based 1v1 two player matchmaking using Firebase real-time database.

Events:

FireMatchRoom has total 4 events.

:yellow_heart: OnRoomCreated

OnRoomCreatedBlock

Triggered when a room is successfully created. Returns room ID.

Parameter Type
roomID text

:yellow_heart: OnOpponentJoined

OnOpponentJoinedBlock

Triggered when an opponent joins the room.

Parameter Type
roomID text
opponentID text

:yellow_heart: OnRoomDataChanged

Triggered when any data in the room changes.

Parameter Type
roomID text
myData text
myGameData text
myStatus text
myRole text
opponentData text
opponentGameData text
opponentStatus text
opponentRole text
rawData text

:yellow_heart: OnError

OnErrorBlock

Triggered when an error occurs.

Parameter Type
errorMessage text

Methods:

FireMatchRoom has total 12 methods.

:purple_heart: Initialise

InitialiseBlock

Initializes fire match room with firebase URL.

Parameter Type
firebaseURL text

:purple_heart: CreateRoom

CreateRoomBlock

Create a new room as host and receives a Room ID. Invite opponent to join the room with room ID

Parameter Type
playerData text

:purple_heart: JoinRoom

JoinRoomBlock

Player joins an existing room with given room ID.

Parameter Type
roomID text
playerData text

:purple_heart: RefreshRoom

RefreshRoomBlock

Refreshes the room data and triggers OnRoomDataChanged event with available data in the room.

:purple_heart: StoreGameData

StoreGameDataBlock

Stores game data for the player or opponent in the room.

Parameter Type
gameData text
forOpponent boolean

:purple_heart: UpdatePlayerStatus

UpdatePlayerStatusBlock

Updates the status for the player or opponent in the room.

Parameter Type
status text
forOpponent boolean

:purple_heart: CancelRoom

CancelRoomBlock

Cancels the room only if no opponent has joined yet.

:purple_heart: LeaveRoom

LeaveRoomBlock

Leaves the room by updating the player's status as left and stops getting room data changes.

:purple_heart: ClearRoom

ClearRoomBlock

Clears the room data and stops getting room data changes.

:purple_heart: ResetRoom

ResetRoomBlock

Resets the room for a new fresh match.

:purple_heart: GeneratePlayerID

GeneratePlayerIDBlock

Generates a random player ID either alphanumeric or numeric with specified length (minimum 4).

Parameter Type
alphanumeric boolean
length number

:purple_heart: IsPlayerInRoom

IsPlayerInRoomBlock

Checks if the player is already in a room.

Getters:

FireMatchRoom has total 3 getter properties.

:green_circle: GetPlayerID

GetPlayerIDBlock

Gets the current player ID.

  • Return type: text

:green_circle: GetOpponentID

GetOpponentIDBlock

Gets the opponent player ID.

  • Return type: text

:green_circle: GetRoomID

GetRoomIDBlock

Gets the Room ID.

  • Return type: text

:fire: Test Quiz App based on FireMatch

FireMatchQuiz.apk - Google Drive

Price: 10$
How to buy: PM me

3 Likes

Thank you for your contribution

Please let us know the price of the extension
We would like to avoud, that everyone will be asking for this... thank you

Takfun

3 Likes

Updated.