Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update blazium nodes docs. #14

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions classes/class_blaziumclient.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,31 @@ BlaziumClient

**Inherited By:** :ref:`LobbyClient<class_LobbyClient>`, :ref:`LoginClient<class_LoginClient>`, :ref:`MasterServerClient<class_MasterServerClient>`, :ref:`POGRClient<class_POGRClient>`

An abstract base node used to connect to Blazium services.
Base node for connecting to the Blazium services.

.. rst-class:: classref-introduction-group

Description
-----------

An abstract base node used to connect to Blazium services.
The **BlaziumClient** node provides an interface for connecting to the Blazium services. These services are designed to simplify game development with aspects such as multiplayer, authentication, etc.

Developers have the flexibility to either:

- Connect to the free Blazium services hosted on the `blazium.app <https://blazium.app>`__ domain.

- Self-deploy the Blazium services on their own infrastructure for full control and customization.

.. code:: text


+---------------------+ +---------------------+
| Blazium Engine | HTTP and | Blazium Service |
|---------------------| WebSocket |---------------------|
| - Send requests | <---------> | - Handle requests |
| - Receive responses | | - Send responses |
+---------------------+ +---------------------+


.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
Expand Down
4 changes: 2 additions & 2 deletions classes/class_gameserverinfo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Game server info used by the :ref:`MasterServerClient<class_MasterServerClient>`
Description
-----------

Game server info used by the :ref:`MasterServerClient<class_MasterServerClient>`. Used to create or update a game server.
Game server info used by the :ref:`MasterServerClient<class_MasterServerClient>`. Used to :ref:`MasterServerClient.create_game<class_MasterServerClient_method_create_game>` or :ref:`MasterServerClient.update_game<class_MasterServerClient_method_update_game>`.

.. rst-class:: classref-reftable-group

Expand Down Expand Up @@ -101,7 +101,7 @@ Name of the game server.
- |void| **set_id**\ (\ value\: :ref:`String<class_String>`\ )
- :ref:`String<class_String>` **get_id**\ (\ )

Id of the game server. Generated after call to create game server.
Id of the game server. Generated after call to :ref:`MasterServerClient.create_game<class_MasterServerClient_method_create_game>`.

.. rst-class:: classref-item-separator

Expand Down
4 changes: 2 additions & 2 deletions classes/class_listlobbyresponse.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ ListLobbyResponse

**Inherits:** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`

Response from a list lobby request.
Response from a :ref:`LobbyClient.list_lobbies<class_LobbyClient_method_list_lobbies>` call.

.. rst-class:: classref-introduction-group

Description
-----------

Response from a list lobby request. Await on finished to get the :ref:`ListLobbyResult<class_ListLobbyResult>`.
Response from a :ref:`LobbyClient.list_lobbies<class_LobbyClient_method_list_lobbies>` call. Await on :ref:`finished<class_ListLobbyResponse_signal_finished>` signal to get the :ref:`ListLobbyResult<class_ListLobbyResult>`.

.. rst-class:: classref-section-separator

Expand Down
4 changes: 2 additions & 2 deletions classes/class_lobbycallresponse.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ LobbyCallResponse

**Inherits:** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`

Response from a lobby call function.
Response from a :ref:`AuthoritativeClient.lobby_call<class_AuthoritativeClient_method_lobby_call>` call.

.. rst-class:: classref-introduction-group

Description
-----------

Response from a lobby call function. Await on finished to get the :ref:`LobbyCallResult<class_LobbyCallResult>`.
Response from a :ref:`AuthoritativeClient.lobby_call<class_AuthoritativeClient_method_lobby_call>` call. Await on :ref:`finished<class_LobbyCallResponse_signal_finished>` signal to get the :ref:`LobbyCallResult<class_LobbyCallResult>`.

.. rst-class:: classref-section-separator

Expand Down
2 changes: 1 addition & 1 deletion classes/class_lobbycallresult.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ A result from a :ref:`LobbyCallResponse<class_LobbyCallResponse>`.
Description
-----------

A result from a :ref:`LobbyCallResponse<class_LobbyCallResponse>`.
A result from a :ref:`LobbyCallResponse<class_LobbyCallResponse>`. Contains either result or error.

.. rst-class:: classref-reftable-group

Expand Down
74 changes: 70 additions & 4 deletions classes/class_lobbyclient.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,38 @@ LobbyClient

**Inherited By:** :ref:`AuthoritativeClient<class_AuthoritativeClient>`

A node used to connect to a lobby server.
Node for connecting to the Blazium Lobby service. Offers non-authoritative lobby making features.

.. rst-class:: classref-introduction-group

Description
-----------

A node used to connect to a lobby server. It can be used to do matchmaking. You can do operations such as create lobby, join lobby, etc. The server is configurable and can either be self deployed or you can use the blazium free matchmaking server.
The **LobbyClient** node provides an interface for connecting to the Blazium Lobby service. There is a free instance hosted on the `blazium.app <https://blazium.app>`__ domain that is used by default.

The normal flow is as follows:

1. Listen to all the signals you are interested in.

2. Connect to the server using :ref:`connect_to_lobby<class_LobbyClient_method_connect_to_lobby>` method.

3. Call any other methods to create, view or join lobbies, as well as add data to them.

4. Close the session using :ref:`disconnect_from_lobby<class_LobbyClient_method_disconnect_from_lobby>` method at the end of the game.

\ **Note:** Some methods are non blocking and can be awaited in order to get the result.

There are also members on this class that are automatically updated as the lobby gets updated, such as:

- :ref:`peer<class_LobbyClient_property_peer>`: The current peer. Reflects changes to the self peer.

- :ref:`peers<class_LobbyClient_property_peers>`: The lobby peers. Reflects changes to all peers.

- :ref:`lobby<class_LobbyClient_property_lobby>`: The lobby. Reflects changes to the lobby.

- :ref:`host_data<class_LobbyClient_property_host_data>`: The current lobby private data. Only works if you are host.

- :ref:`peer_data<class_LobbyClient_property_peer_data>`: The current peer private data.

.. rst-class:: classref-reftable-group

Expand Down Expand Up @@ -497,6 +521,8 @@ Method Descriptions

Add data to the lobby. Only works if you are host.

Returns a :ref:`LobbyResponse<class_LobbyResponse>` object that has a :ref:`LobbyResponse.finished<class_LobbyResponse_signal_finished>` signal that is emitted when finished.

Generates :ref:`received_lobby_data<class_LobbyClient_signal_received_lobby_data>`.

.. rst-class:: classref-item-separator
Expand All @@ -511,6 +537,8 @@ Generates :ref:`received_lobby_data<class_LobbyClient_signal_received_lobby_data

Add tags to the lobby. Only works if you are host.

Returns a :ref:`LobbyResponse<class_LobbyResponse>` object that has a :ref:`LobbyResponse.finished<class_LobbyResponse_signal_finished>` signal that is emitted when finished.

Generates :ref:`lobby_tagged<class_LobbyClient_signal_lobby_tagged>`.

.. rst-class:: classref-item-separator
Expand All @@ -525,6 +553,8 @@ Generates :ref:`lobby_tagged<class_LobbyClient_signal_lobby_tagged>`.

Add data to a peer. Only works if you are host.

Returns a :ref:`LobbyResponse<class_LobbyResponse>` object that has a :ref:`LobbyResponse.finished<class_LobbyResponse_signal_finished>` signal that is emitted when finished.

Generates :ref:`received_peer_data<class_LobbyClient_signal_received_peer_data>`.

.. rst-class:: classref-item-separator
Expand All @@ -539,6 +569,8 @@ Generates :ref:`received_peer_data<class_LobbyClient_signal_received_peer_data>`

Add data to all peers. Only works if you are host.

Returns a :ref:`LobbyResponse<class_LobbyResponse>` object that has a :ref:`LobbyResponse.finished<class_LobbyResponse_signal_finished>` signal that is emitted when finished.

Generates :ref:`received_peer_data<class_LobbyClient_signal_received_peer_data>`.

.. rst-class:: classref-item-separator
Expand All @@ -553,6 +585,8 @@ Generates :ref:`received_peer_data<class_LobbyClient_signal_received_peer_data>`

Connect to a Blazium Lobby Server using the :ref:`game_id<class_LobbyClient_property_game_id>` and :ref:`server_url<class_LobbyClient_property_server_url>`.

Generates :ref:`connected_to_lobby<class_LobbyClient_signal_connected_to_lobby>` signal if successful.

.. rst-class:: classref-item-separator

----
Expand All @@ -567,6 +601,8 @@ Create a lobby and become host. If you are already in a lobby, you cannot create

The new lobby can have a title, tags, max players and password. 0 max players means unlimited.

Returns a :ref:`ViewLobbyResponse<class_ViewLobbyResponse>` object that has a :ref:`ViewLobbyResponse.finished<class_ViewLobbyResponse_signal_finished>` signal that is emitted when finished.

Generates :ref:`lobby_created<class_LobbyClient_signal_lobby_created>` signal.

.. rst-class:: classref-item-separator
Expand All @@ -581,6 +617,8 @@ Generates :ref:`lobby_created<class_LobbyClient_signal_lobby_created>` signal.

Delete one or more keys from the lobby data. Only works if you are host.

Returns a :ref:`LobbyResponse<class_LobbyResponse>` object that has a :ref:`LobbyResponse.finished<class_LobbyResponse_signal_finished>` signal that is emitted when finished.

Generates :ref:`received_lobby_data<class_LobbyClient_signal_received_lobby_data>`.

.. rst-class:: classref-item-separator
Expand All @@ -595,6 +633,8 @@ Generates :ref:`received_lobby_data<class_LobbyClient_signal_received_lobby_data

Delete one or more keys from the lobby tags. Only works if you are host.

Returns a :ref:`LobbyResponse<class_LobbyResponse>` object that has a :ref:`LobbyResponse.finished<class_LobbyResponse_signal_finished>` signal that is emitted when finished.

Generates :ref:`lobby_tagged<class_LobbyClient_signal_lobby_tagged>`.

.. rst-class:: classref-item-separator
Expand All @@ -607,7 +647,9 @@ Generates :ref:`lobby_tagged<class_LobbyClient_signal_lobby_tagged>`.

:ref:`LobbyResponse<class_LobbyResponse>` **del_peer_data**\ (\ keys\: :ref:`Array<class_Array>`\[:ref:`String<class_String>`\], target_peer\: :ref:`String<class_String>`, is_private\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_LobbyClient_method_del_peer_data>`

one or more keys from the peer data. Only works if you are host.
Delete one or more keys from the peer data. Only works if you are host.

Returns a :ref:`LobbyResponse<class_LobbyResponse>` object that has a :ref:`LobbyResponse.finished<class_LobbyResponse_signal_finished>` signal that is emitted when finished.

Generates :ref:`received_peer_data<class_LobbyClient_signal_received_peer_data>`.

Expand All @@ -621,7 +663,9 @@ Generates :ref:`received_peer_data<class_LobbyClient_signal_received_peer_data>`

:ref:`LobbyResponse<class_LobbyResponse>` **del_peers_data**\ (\ keys\: :ref:`Array<class_Array>`\[:ref:`String<class_String>`\], is_private\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_LobbyClient_method_del_peers_data>`

one or more keys from the peers data. Only works if you are host.
Delete one or more keys from the peers data. Only works if you are host.

Returns a :ref:`LobbyResponse<class_LobbyResponse>` object that has a :ref:`LobbyResponse.finished<class_LobbyResponse_signal_finished>` signal that is emitted when finished.

Generates :ref:`received_peer_data<class_LobbyClient_signal_received_peer_data>`.

Expand All @@ -637,6 +681,8 @@ Generates :ref:`received_peer_data<class_LobbyClient_signal_received_peer_data>`

Disconnect from the lobby server.

Generates :ref:`disconnected_from_lobby<class_LobbyClient_signal_disconnected_from_lobby>` signal.

.. rst-class:: classref-item-separator

----
Expand All @@ -663,6 +709,8 @@ Join a lobby. If you are already in a lobby, you cannot join another one. You ne

If the lobby you want to join is password protected, you need to provide the password.

Returns a :ref:`ViewLobbyResponse<class_ViewLobbyResponse>` object that has a :ref:`ViewLobbyResponse.finished<class_ViewLobbyResponse_signal_finished>` signal that is emitted when finished.

Generates :ref:`lobby_joined<class_LobbyClient_signal_lobby_joined>`.

.. rst-class:: classref-item-separator
Expand All @@ -677,6 +725,8 @@ Generates :ref:`lobby_joined<class_LobbyClient_signal_lobby_joined>`.

Kick a peer. You need to be host to do so.

Returns a :ref:`LobbyResponse<class_LobbyResponse>` object that has a :ref:`LobbyResponse.finished<class_LobbyResponse_signal_finished>` signal that is emitted when finished.

Generates :ref:`peer_left<class_LobbyClient_signal_peer_left>` signal with kicked set to true.

.. rst-class:: classref-item-separator
Expand All @@ -691,6 +741,8 @@ Generates :ref:`peer_left<class_LobbyClient_signal_peer_left>` signal with kicke

Leave a lobby. You need to be in a lobby to leave one.

Returns a :ref:`LobbyResponse<class_LobbyResponse>` object that has a :ref:`LobbyResponse.finished<class_LobbyResponse_signal_finished>` signal that is emitted when finished.

Generates :ref:`lobby_left<class_LobbyClient_signal_lobby_left>`.

.. rst-class:: classref-item-separator
Expand All @@ -717,6 +769,8 @@ Lists all lobbies. Lobbies that are sealed won't show in the list, except if you

Send a notification either to the host, or if you are host send data to all peers.

Returns a :ref:`LobbyResponse<class_LobbyResponse>` object that has a :ref:`LobbyResponse.finished<class_LobbyResponse_signal_finished>` signal that is emitted when finished.

Generates :ref:`lobby_notified<class_LobbyClient_signal_lobby_notified>` signal.

.. rst-class:: classref-item-separator
Expand All @@ -731,6 +785,8 @@ Generates :ref:`lobby_notified<class_LobbyClient_signal_lobby_notified>` signal.

Send a notification to a peer, works only if you are host.

Returns a :ref:`LobbyResponse<class_LobbyResponse>` object that has a :ref:`LobbyResponse.finished<class_LobbyResponse_signal_finished>` signal that is emitted when finished.

Generates :ref:`lobby_notified<class_LobbyClient_signal_lobby_notified>` signal.

.. rst-class:: classref-item-separator
Expand All @@ -745,6 +801,8 @@ Generates :ref:`lobby_notified<class_LobbyClient_signal_lobby_notified>` signal.

Send a chat message. Only works if you are in a lobby.

Returns a :ref:`LobbyResponse<class_LobbyResponse>` object that has a :ref:`LobbyResponse.finished<class_LobbyResponse_signal_finished>` signal that is emitted when finished.

Generates :ref:`peer_messaged<class_LobbyClient_signal_peer_messaged>`.

.. rst-class:: classref-item-separator
Expand All @@ -759,6 +817,8 @@ Generates :ref:`peer_messaged<class_LobbyClient_signal_peer_messaged>`.

Ready up in the lobby. You need to be in a lobby and unready to run this.

Returns a :ref:`LobbyResponse<class_LobbyResponse>` object that has a :ref:`LobbyResponse.finished<class_LobbyResponse_signal_finished>` signal that is emitted when finished.

Generates :ref:`peer_ready<class_LobbyClient_signal_peer_ready>`.

.. rst-class:: classref-item-separator
Expand All @@ -773,6 +833,8 @@ Generates :ref:`peer_ready<class_LobbyClient_signal_peer_ready>`.

Seals the lobby. You need to be the host to do this and the lobby needs to be unsealed.

Returns a :ref:`LobbyResponse<class_LobbyResponse>` object that has a :ref:`LobbyResponse.finished<class_LobbyResponse_signal_finished>` signal that is emitted when finished.

Generates :ref:`lobby_sealed<class_LobbyClient_signal_lobby_sealed>`.

.. rst-class:: classref-item-separator
Expand All @@ -787,6 +849,8 @@ Generates :ref:`lobby_sealed<class_LobbyClient_signal_lobby_sealed>`.

Set your peer name.

Returns a :ref:`LobbyResponse<class_LobbyResponse>` object that has a :ref:`LobbyResponse.finished<class_LobbyResponse_signal_finished>` signal that is emitted when finished.

Generates :ref:`peer_named<class_LobbyClient_signal_peer_named>` signal if you are in lobby.

.. rst-class:: classref-item-separator
Expand All @@ -801,6 +865,8 @@ Generates :ref:`peer_named<class_LobbyClient_signal_peer_named>` signal if you a

View data from a lobby. Returns lobby settings and peers.

Returns a :ref:`ViewLobbyResponse<class_ViewLobbyResponse>` object that has a :ref:`ViewLobbyResponse.finished<class_ViewLobbyResponse_signal_finished>` signal that is emitted when finished.

.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
Expand Down
8 changes: 3 additions & 5 deletions classes/class_lobbyinfo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ LobbyInfo

**Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`

Lobby information returned after a view lobby request.
Lobby information returned after a :ref:`LobbyClient<class_LobbyClient>` request that returns a lobby.

.. rst-class:: classref-introduction-group

Description
-----------

Lobby information returned after a view lobby request.
Lobby information returned after a :ref:`LobbyClient<class_LobbyClient>` request that returns a lobby.

.. rst-class:: classref-reftable-group

Expand Down Expand Up @@ -166,9 +166,7 @@ The maximum number of players allowed in the lobby. 0 = unlimited

- :ref:`bool<class_bool>` **is_password_protected**\ (\ )

.. container:: contribute

There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
Whether the lobby is password protected.

.. rst-class:: classref-item-separator

Expand Down
8 changes: 3 additions & 5 deletions classes/class_lobbypeer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ LobbyPeer

**Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`

Lobby peers information returned after a view lobby request.
Lobby information returned after a :ref:`LobbyClient<class_LobbyClient>` request that returns peers.

.. rst-class:: classref-introduction-group

Description
-----------

Lobby peers information returned after a view lobby request.
Lobby information returned after a :ref:`LobbyClient<class_LobbyClient>` request that returns peers.

.. rst-class:: classref-reftable-group

Expand Down Expand Up @@ -58,9 +58,7 @@ Property Descriptions

- :ref:`Dictionary<class_Dictionary>` **get_data**\ (\ )

.. container:: contribute

There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
Public data of the peer.

.. rst-class:: classref-item-separator

Expand Down
Loading