Skip to content

(TESTING) Add multiplayer support#89

Merged
Armored-Dragon merged 16 commits into
feature-session_hosting-multiplayerfrom
feature-session_hosting-multiplayer-test_1
Apr 24, 2026
Merged

(TESTING) Add multiplayer support#89
Armored-Dragon merged 16 commits into
feature-session_hosting-multiplayerfrom
feature-session_hosting-multiplayer-test_1

Conversation

@Armored-Dragon
Copy link
Copy Markdown
Member

This PR is more of a test PR to play around with multiplayer support in the application. This PR may be closed in favor of another PR that serves the same purpose.

@Armored-Dragon Armored-Dragon self-assigned this Apr 23, 2026
@Armored-Dragon Armored-Dragon added the enhancement New feature or request label Apr 23, 2026
@Armored-Dragon Armored-Dragon marked this pull request as ready for review April 24, 2026 17:48
rpc_lib.com.rpc("on_player_transform", compressed_position)

scene_m.get_master_scene(scene_m.active_session).get_node("NetworkManager").entity_position.rpc(int(name), compressed_position)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will need to be optimized in the future. The method to get the specific node is an expensive operation to be preforming every time.

Copy link
Copy Markdown
Member Author

@Armored-Dragon Armored-Dragon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a few things that need to be looked at in another PR. Most notably the player.gd script preforming expensive operations every frame.

@Armored-Dragon Armored-Dragon merged commit dcfbd5e into feature-session_hosting-multiplayer Apr 24, 2026
@Armored-Dragon Armored-Dragon deleted the feature-session_hosting-multiplayer-test_1 branch April 24, 2026 18:35
Armored-Dragon added a commit that referenced this pull request May 4, 2026
* Session listing function.

* Basic session querying.

* Fixed text capturing.

* Instance HUD.

* Added active session display.
New network_manager to manage multiple sessions at once.

* Added debug bug fix for crashing the game when not logged in when viewing the sessions tab.

* Session advertising.

* New application manager files. (#83)

* Created new manager files.

* Created base server scene.
Created create_master_scene function.

* Start multiplayer server.

* Fixed dashboard error.
Could not find active sessions because there was not a function.

* Load scene root.

* Force spawn the host.

* Start server managers.

* Added function name to logger.

* Removed old files.

* Fixed port finder bug.
The function would never find a port, woopsie!

* Initial session advertising work.

* Removed unneeded Enum.

* Initial heartbeat work.

* Session Updating.
Sessions can now update settings on the fly.

* Session delisting.
Remove sessions from the session server.

* Settings placeholder.
List session servers.

* Remove session server from config.

* Add session servers.

* Don't add empty session servers.

* Hide session server dialog in settings.

* Use session server list to advertise sessions to.

* Error fixes.
Makes the debugger not angry with me.

* Properly destroy master scene when creating a server failed.

* Error handling.
Removed some out of date TODOs.

* Stop scene when replacing root.

* Removed hardcoded localhost values used for debugging and development.

* Moved TODO to it's own issue.
#85

* Fixed heartbeats using incorrect ID.

* Fixed port issues.

* Remove dead code.

* Attempt fix for rare network issue.

* Do not request new key if we have key already.

* Basic connection to multiplayer sessions.

* Bootstrap for managing startup and shutdown.

* Close and leave servers on shutdown.

* Moved functions from app manager to session manager.

* Add multiplayer support (#89)

* Spawn player on connect.

* Basic connected session switching.

* Synchronization testing.

* Maybe fix desync of loaded players?

* Removed interaction ray from player controller.

* Set active session from network.

* Kick players when a session is closing.

* Fixed all loggers to use Enums instead of magic numbers.

* NetworkCompression autoload instead of hard referenced library.

* Removed now unused RPC handlers.

* Made HTTP library a global.

* Fix errors.

* Added session disconnect button.
Fixed leaving world.

* Minor refactor.

* Fix player losing control of other sessions when connecting.

* Clean up peer when they disconnect.

* Changed node IDs.
This was causing errors or something?

* Change module active variable name from "active" to "module_active" to
prevent confusion.

* Fix controlling incorrect player when joining session.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant