Functions | Game Search

Here is a list of all the functions available in the GodotSteam module. The descriptions are pulled from the official Steamworks SDK documentation with modifications made to fit GodotSteam's implementation of the functions. Naturally, any GodotSteam-specific functions will be noted as such.


Note: These functions not listed in the official Steamworks SDK documentation but do exist in the SDK header files.

addGameSearchParams( string key, string value )

  • A keyname and a list of comma separated values: one of which is must be found in order for the match to qualify; fails if a search is currently in progress.
  • Returns an int.

searchForGameWithLobby( int lobby_id, int player_min, int player_max) searchForGameWithLobby( uint64_t lobby_id, int player_min, int player_max)

  • All players in lobby enter the queue and await a SearchForGameNotificationCallback_t callback. Fails if another search is currently in progress. If not the owner of the lobby or search already in progress this call fails. Periodic callbacks will be sent as queue time estimates change.
  • Note: The SearchForGameNotificationCallback_t callback does not seem to exist in the SDK anywhere.
  • Returns an int.

searchForGameSolo( int player_min, int player_max)

  • User enter the queue and await a SearchForGameNotificationCallback_t callback. fails if another search is currently in progress. Periodic callbacks will be sent as queue time estimates change.
  • Note: The SearchForGameNotificationCallback_t callback does not seem to exist in the SDK anywhere.
  • Returns an int.

acceptGame()

  • After receiving SearchForGameResultCallback_t, accept or decline the game. Multiple SearchForGameResultCallback_t will follow as players accept game until the host starts or cancels the game.
  • Note: The SearchForGameNotificationCallback_t callback does not seem to exist in the SDK anywhere.
  • Returns an int.

declineGame()

  • After receiving SearchForGameResultCallback_t, accept or decline the game. Multiple SearchForGameResultCallback_t will follow as players accept game until the host starts or cancels the game.
  • Note: The SearchForGameNotificationCallback_t callback does not seem to exist in the SDK anywhere.
  • Returns an int.

retrieveConnectionDetails( int host_id ) retrieveConnectionDetails( uint64_t host_id )

  • After receiving GameStartedByHostCallback_t get connection details to server.
  • Note: The GameStartedByHostCallback_t callback does not seem to exist in the SDK anywhere.
  • Returns a string.

endGameSearch()

  • Leaves queue if still waiting.
  • Returns an int.

setGameHostParams( string key, string value )

  • A keyname and a list of comma separated values: all the values you allow.
  • Returns an int.

setConnectionDetails( string details, int connection_details )

  • Set connection details for players once game is found so they can connect to this server.
  • Returns an int.

requestPlayersForGame( int player_min, int player_max, int max_team_size )

  • Mark server as available for more players with player_min, player_max desired. Accept no lobbies with player-count greater than max_team_size.
  • Returns an int.

hostConfirmGameStart( int game_id ) hostConfirmGameStart( uint64_t game_id )

  • Accept the player list and release connection details to players.
  • Returns an int.

cancelRequestPlayersForGame()

  • Cancel request and leave the pool of game hosts looking for players.
  • Returns an int.

submitPlayerResult( int game_id, int player_id, int player_result ) submitPlayerResult( uint64_t game_id, uint64_t player_id, int player_result )

  • Submit a result for one player; does not end the game. game_id continues to describe this game.
  • Returns an int.

endGame( int game_id ) endGame( uint64_t game_id )

  • Ends the game. No further submitPlayerResults for game_id will be accepted.
  • Returns an int.