-
Notifications
You must be signed in to change notification settings - Fork 59
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
Make Multiplayer Template Usable Again #680
Make Multiplayer Template Usable Again #680
Conversation
Signed-off-by: Shauna Gordon <shauna@shaunagordon.com>
Building a project with this template throws "you cannot bind an lvalue to an rvalue reference" error. Copilot suggests removing the template declaration in the call to fix this. Signed-off-by: Shauna Gordon <shauna@shaunagordon.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume there are no blast assets it depended on?
* Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. | ||
* | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 OR MIT | ||
* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be worth taking a look at this on github here and seeing all the whitespace-only changes... its not a big deal but it makes it cleaner if whitespace only changes are reverted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I waffled a bit about that a bit, myself, but ended up erring on the side of leaving them, because it complies with the style guide (as enforced by the .editorconfig
in the main repo). I can pull them out, though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update!
I noticed one more problem with that template while testing which requires a fix:
diff --git a/Templates/Multiplayer/Template/Gem/Code/Source/Components/NetworkAiComponent.cpp b/Templates/Multiplayer/Template/Gem/Code/Source/Components/NetworkAiComponent.cpp
index d8a7cb49..1865666b 100644
--- a/Templates/Multiplayer/Template/Gem/Code/Source/Components/NetworkAiComponent.cpp
+++ b/Templates/Multiplayer/Template/Gem/Code/Source/Components/NetworkAiComponent.cpp
@@ -16,8 +16,6 @@
namespace ${SanitizedCppName}
{
- constexpr static float SecondsToMs = 1000.f;
-
NetworkAiComponentController::NetworkAiComponentController(NetworkAiComponent& parent)
: NetworkAiComponentControllerBase(parent)
{
The variable is not used and clang 14
on my Ubuntu 22.04
can clearly see that:
/devroot/projects/MultiplayerTemplate/Gem/Code/Source/Components/NetworkAiComponent.cpp:19:28: error: unused variable 'SecondsToMs' [-Werror,-Wunused-const-variable]
constexpr static float SecondsToMs = 1000.f;
You may add it to this PR or I will add it in the following PR.
Not that I saw. I tried to make sure I removed all the Blast references, since it's not available anymore. |
@jhanca-robotecai I can incorporate it, yeah, unless you've got a more targeted PR coming. |
Feel free. We will trigger tests and merge this PR on Monday. I also keep it on my list for cherry-picking for the incoming point release. |
@jhanca-robotecai It looks like your compiler resolves the |
Thanks for pointing that out, I did not browse the code to be honest, only the compiler errors. I will create the issue. |
I ran a clean build in AR, which succeeds compilation but fails on one warning as error and few tests: https://jenkins.build.o3de.org/blue/organizations/jenkins/o3de-extras/detail/PR-680/7/pipeline The warning as error looks like (added other warnings for context):
The tests in question fail here:
Digging deeper, I see the following errors:
This fails 100% of the time on clean or incremental builds. Somehow the serializer and assetbundler exes are not getting built from the development branch O3DE code |
We may want to investigate the above, but if we feel that this unrelated (which this might be given OpenXR and AssetBundler are not being changed here) and need to bypass AR to resolve, please thumbs-up this message to vote on override. |
Last changes in OpenXRVk Gem took place in late February:
and multiple PRs were pushed since then. Strangely, the tests passed, e.g. the last merged. I understand there might be some changes in o3de that caused problems with tests in extras, but I do not believe this is the main cause as the tests keep failing randomly in all PRs. The one linked earlier failed in the first run as well, it passed only in the second one. |
Sounds good, I'm in agreement with your assessment as it seems to be reported in other runs, @nick-l-o3de can you also verify the above as you were the second approver and sign off on the error being unrelated? I'll issue the bypass once we're all agreed. |
Discussed with @Ulrick28 and @nick-l-o3de. The changes are not related to this error. I'll start the bypass process now |
Initial AR build failed https://jenkins.build.o3de.org/job/o3de-extras/job/PR-680/8/display/redirect. |
@@ -1,6 +1,6 @@ | |||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally RoundRobinSpawner.h/cpp and Source/Spawners/IPlayerSpawner.h is deleted entirely, and removed from the cmake file list: https://github.com/o3de/o3de-extras/blob/development/Templates/Multiplayer/Template/Gem/Code/%24%7BNameLower%7D_files.cmake
Remove game code references to RoundRobinSpawner and IPlayerSpawner as well (I think there's references inside the Source/${Name}SystemComponent.cpp
RoundRobinSpawner is replaced by the built-in Multiplayer gem component called SimplePlayerSpawner.
https://www.docs.o3de.org/docs/user-guide/components/reference/multiplayer/simple-player-spawner/
You'd slap that component to the root level entity (whichever levels Multiplayer template ships with). The component takes the network prefab to spawn, and the player spawn points.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your input, I created an issue based on that.
What does this PR do?
We noticed that the Multiplayer template was in an unusable state. This fixes the two errors I ran into.
How was this PR tested?
Manual.
To test: