forked from godotengine/godot
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add master server node and login node
add master server node fix default values fix some defaults update connected logic Add login node
- Loading branch information
Showing
20 changed files
with
897 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<class name="GameServerInfo" inherits="Resource" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd"> | ||
<brief_description> | ||
Game server info used by the [MasterServerClient]. | ||
</brief_description> | ||
<description> | ||
Game server info used by the [MasterServerClient]. Used to create or update a game server. | ||
</description> | ||
<tutorials> | ||
</tutorials> | ||
<members> | ||
<member name="description" type="String" setter="set_description" getter="get_description" default=""""> | ||
Description of the game server. | ||
</member> | ||
<member name="game_name" type="String" setter="set_game_name" getter="get_game_name" default=""""> | ||
Name of the game server. | ||
</member> | ||
<member name="id" type="String" setter="set_id" getter="get_id" default=""""> | ||
Id of the game server. Generated after call to create game server. | ||
</member> | ||
<member name="ip_address" type="String" setter="set_ip_address" getter="get_ip_address" default=""""> | ||
Ip address of the game server. | ||
</member> | ||
<member name="max_players" type="int" setter="set_max_players" getter="get_max_players" default="0"> | ||
Max players of the game server. | ||
</member> | ||
<member name="players" type="int" setter="set_players" getter="get_players" default="0"> | ||
Players of the game server. | ||
</member> | ||
<member name="port" type="int" setter="set_port" getter="get_port" default="0"> | ||
Port of the game server. | ||
</member> | ||
<member name="version" type="String" setter="set_version" getter="get_version" default=""""> | ||
Version of the game server. | ||
</member> | ||
</members> | ||
</class> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<class name="LoginClient" inherits="BlaziumClient" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd"> | ||
<brief_description> | ||
A node used to connect to a login server. | ||
</brief_description> | ||
<description> | ||
A node used to connect to a login server. | ||
</description> | ||
<tutorials> | ||
</tutorials> | ||
<methods> | ||
<method name="connect_to_server"> | ||
<return type="bool" /> | ||
<description> | ||
Connect to the server. | ||
</description> | ||
</method> | ||
<method name="disconnect_from_server"> | ||
<return type="void" /> | ||
<description> | ||
Disconnect from the server. | ||
Generates [signal disconnected_from_server] when disconnected. | ||
</description> | ||
</method> | ||
</methods> | ||
<members> | ||
<member name="connected" type="bool" setter="" getter="get_connected" default="false"> | ||
True if the client is connected, else false. | ||
</member> | ||
<member name="game_id" type="String" setter="set_game_id" getter="get_game_id" default=""""> | ||
The game id. | ||
</member> | ||
<member name="server_url" type="String" setter="set_server_url" getter="get_server_url" default=""wss://login.blazium.app/connect""> | ||
Set to what url this login should connect to. | ||
</member> | ||
</members> | ||
<signals> | ||
<signal name="disconnected_from_server"> | ||
<param index="0" name="reason" type="String" /> | ||
<description> | ||
Signal emitted when the client disconnects from the server. | ||
</description> | ||
</signal> | ||
<signal name="log_updated"> | ||
<param index="0" name="command" type="String" /> | ||
<param index="1" name="logs" type="String" /> | ||
<description> | ||
Signals a log from a command. | ||
</description> | ||
</signal> | ||
<signal name="received_jwt"> | ||
<param index="0" name="jwt" type="String" /> | ||
<param index="1" name="type" type="String" /> | ||
<description> | ||
Signal emitted when a JWT is received. | ||
</description> | ||
</signal> | ||
</signals> | ||
</class> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<class name="LoginResponse" inherits="RefCounted" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd"> | ||
<brief_description> | ||
Response from a connect request. | ||
</brief_description> | ||
<description> | ||
Response from a connect request. | ||
</description> | ||
<tutorials> | ||
</tutorials> | ||
<signals> | ||
<signal name="finished"> | ||
<param index="0" name="result" type="LobbyResult" /> | ||
<description> | ||
Signal emitted when the request is finished. | ||
</description> | ||
</signal> | ||
</signals> | ||
</class> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<class name="LoginResult" inherits="RefCounted" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd"> | ||
<brief_description> | ||
A result from a [LoginResponse]. | ||
</brief_description> | ||
<description> | ||
A result from a [LoginResponse]. | ||
</description> | ||
<tutorials> | ||
</tutorials> | ||
<methods> | ||
<method name="has_error" qualifiers="const"> | ||
<return type="bool" /> | ||
<description> | ||
Returns true if there is an error. | ||
</description> | ||
</method> | ||
</methods> | ||
<members> | ||
<member name="error" type="String" setter="" getter="get_error" default=""""> | ||
The error message. | ||
</member> | ||
<member name="login_type" type="String" setter="" getter="get_login_type" default=""""> | ||
The login type. | ||
</member> | ||
<member name="login_url" type="String" setter="" getter="get_login_url" default=""""> | ||
The login url. | ||
</member> | ||
</members> | ||
</class> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<class name="MasterServerClient" inherits="BlaziumClient" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd"> | ||
<brief_description> | ||
A node used to connect to a master server. | ||
</brief_description> | ||
<description> | ||
A node used to connect to a master server. | ||
</description> | ||
<tutorials> | ||
</tutorials> | ||
<methods> | ||
<method name="create_game"> | ||
<return type="MasterServerResponse" /> | ||
<param index="0" name="game_server_info" type="GameServerInfo" /> | ||
<description> | ||
Create a game server. | ||
</description> | ||
</method> | ||
<method name="recent_games"> | ||
<return type="MasterServerListResponse" /> | ||
<description> | ||
Get a list of recent games. | ||
</description> | ||
</method> | ||
<method name="update_game"> | ||
<return type="MasterServerResponse" /> | ||
<param index="0" name="game_server_info" type="GameServerInfo" /> | ||
<description> | ||
Update a game server. | ||
</description> | ||
</method> | ||
</methods> | ||
<members> | ||
<member name="game_id" type="String" setter="set_game_id" getter="get_game_id" default=""""> | ||
Game id of the game server. | ||
</member> | ||
<member name="server_url" type="String" setter="set_server_url" getter="get_server_url" default=""https://masterserver.blazium.app/api/v1""> | ||
Set to what url this master server should connect to. | ||
</member> | ||
</members> | ||
</class> |
19 changes: 19 additions & 0 deletions
19
modules/blazium_sdk/doc_classes/MasterServerListResponse.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<class name="MasterServerListResponse" inherits="RefCounted" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd"> | ||
<brief_description> | ||
Response from a list games request. | ||
</brief_description> | ||
<description> | ||
Response from a list games request. | ||
</description> | ||
<tutorials> | ||
</tutorials> | ||
<signals> | ||
<signal name="finished"> | ||
<param index="0" name="result" type="MasterServerResult" /> | ||
<description> | ||
Signal emitted when the request is finished. | ||
</description> | ||
</signal> | ||
</signals> | ||
</class> |
27 changes: 27 additions & 0 deletions
27
modules/blazium_sdk/doc_classes/MasterServerListResult.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<class name="MasterServerListResult" inherits="RefCounted" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd"> | ||
<brief_description> | ||
A result from a [MasterServerListResponse]. | ||
</brief_description> | ||
<description> | ||
A result from a [MasterServerListResponse]. Contains either result or error. | ||
</description> | ||
<tutorials> | ||
</tutorials> | ||
<methods> | ||
<method name="has_error" qualifiers="const"> | ||
<return type="bool" /> | ||
<description> | ||
Returns true if there is an error. | ||
</description> | ||
</method> | ||
</methods> | ||
<members> | ||
<member name="error" type="String" setter="" getter="get_error" default=""""> | ||
The error message. | ||
</member> | ||
<member name="results" type="GameServerInfo[]" setter="" getter="get_results" default="[]"> | ||
The results. | ||
</member> | ||
</members> | ||
</class> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<class name="MasterServerResponse" inherits="RefCounted" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd"> | ||
<brief_description> | ||
Response from a create or update game request. | ||
</brief_description> | ||
<description> | ||
Response from a create or update game request. | ||
</description> | ||
<tutorials> | ||
</tutorials> | ||
<signals> | ||
<signal name="finished"> | ||
<param index="0" name="result" type="MasterServerResult" /> | ||
<description> | ||
Signal emitted when the request is finished. | ||
</description> | ||
</signal> | ||
</signals> | ||
</class> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<class name="MasterServerResult" inherits="RefCounted" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd"> | ||
<brief_description> | ||
A result from a [MasterServerResponse]. | ||
</brief_description> | ||
<description> | ||
A result from a [MasterServerResponse]. Contains either result or error. | ||
</description> | ||
<tutorials> | ||
</tutorials> | ||
<methods> | ||
<method name="has_error" qualifiers="const"> | ||
<return type="bool" /> | ||
<description> | ||
Returns true if there is an error. | ||
</description> | ||
</method> | ||
</methods> | ||
<members> | ||
<member name="error" type="String" setter="" getter="get_error" default=""""> | ||
Gets the error message. | ||
</member> | ||
<member name="result" type="GameServerInfo" setter="" getter="get_result"> | ||
Gets the result. | ||
</member> | ||
</members> | ||
</class> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.