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

Basic Multiplayer UI #774

Draft
wants to merge 112 commits into
base: main
Choose a base branch
from
Draft

Basic Multiplayer UI #774

wants to merge 112 commits into from

Conversation

andybak
Copy link
Contributor

@andybak andybak commented Oct 7, 2024

No description provided.

mikeskydev and others added 25 commits December 7, 2023 12:13
# Conflicts:
#	Assets/Prefabs/Panels/AdminPanel.prefab
#	Assets/Settings/Localization/Strings/Strings Shared Data.asset
#	Assets/Settings/Localization/Strings/Strings_en.asset
will probably conflict

# Conflicts:
#	Assets/Scenes/Main.unity
# Conflicts:
#	Assets/Scripts/Multiplayer/MultiplayerInterfaces.cs
#	Assets/Scripts/Multiplayer/MultiplayerManager.cs
# Conflicts:
#	Assets/Scripts/PassthroughManager.cs
# Conflicts:
#	Assets/Settings/Localization/Strings/Strings Shared Data.asset
#	Assets/Settings/Localization/Strings/Strings_en.asset
# Conflicts:
#	Assets/Settings/Localization/Strings/Strings_en.asset
-Implemented global command: MultiplayerJoinRoom.
-Updated the multiplayer panel prefab and manager.
-Changed the admin panel layout from hexagon to octagon.
TODO:
-Add room name editing capabilities.
@andybak andybak added the enhancement Feature added label Oct 7, 2024
- Added initialization of the keyboard with the current room name in `MultiplayerPanelButton.cs`.
- Changed `SetRoomName` to a property (`RoomName`) in `MultiplayerPanel.cs` for better readability and encapsulation.
- Updated `SketchControlScript.cs` to use the new `RoomName` property.
-MultiplayerManager: Added DoesRoomNameExist() and updated m_RoomData for room validation.

-MultiplayerPanel: Added UpdateRoomExistenceMessage() to indicate if a room exists or will be created (added a text to the prefab)
remove  'GraphView'
Clear scene for non-room owner players on join: If a player joins and is not the room owner, their scene is reset to ensure consistency with the room owner's state upon receiving the synchronized history.
Remote players were not correctly registered when already present in the room because `INetworkRunnerCallbacks.OnPlayerJoined` in Fusion 1 is not called for users who are already in the room.

To address this, we added and registered existing users using the `CheckExistingUsers()` method.

Additionally, in `MultiplayerManager.cs`, the local player ID was not registered correctly, which has now been fixed.

A display for both the local and remote user IDs was added to `MultiplayerManagerEditor.cs` to facilitate debugging.
Fixed issue where remote user list was not cleared on disconnect or room exit.
 Enhanced MultiplayerManager Editor to streamline debugging with clearer information display and controls.
This update refactors `SendCommandHistory` to use a coroutine, sending commands in batches with a delay between each batch. This approach reduces the likelihood of Photon RPC message delivery failures that occur when too many messages are sent within the same frame. The coroutine yields between batches and includes a configurable delay to ensure smooth, reliable transmission over the network.
Add support for initializing commands with existing GUIDs

Check memory script stack for guid commands before performing the command
To correctly define who is the room owner beyond the two users case we need to share this property, we do this by extending the PhotonPlayerRig NetworkBehaviour component
sbanca and others added 7 commits November 11, 2024 18:04
Taking care of few edge cases and cleaning logs
Removing the Connect and Disconnect buttons and extending the MultiplayerPanel.cs to connect when enabled. If the user is not in the room, it will disconnect when disabled.
Added a RoomOwnershipUpdated action to MultiplayerManager.cs to send updates about room ownership to the multiplayer UI panel. Updated the MultiplayerPanel script and prefab to include a Room Ownership field.
Fix null reference issues in PhotonPlayerRig by adding checks for destroyed objects in RecieveData and other methods.
Clamped SceneScale to prevent division by zero or extremely small values.
Updating the languages translations for the Multiplayer UI
 Updated the PhotonPlayerRig prefab to properly manage dummy transforms and model transforms for left/right controllers.
removing redundant commented code
- Introduced m_IsSpawned flag in PhotonPlayerRig to track spawn state.
- Updated ReceiveData() to check m_IsSpawned before accessing IsRoomOwner, avoiding InvalidOperationException.
- Set m_IsSpawned to false in OnDestroy() to handle object despawning.
- Added warning logs for attempts to access networked properties post-despawn, aiding in debugging.
Extended CanRedo() and CanUndo() methods in SketchControlScript to include a condition checking if the connection state is IN_ROOM, preventing undo/redo functionality when in multiplayer mode.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature added
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants