-
Notifications
You must be signed in to change notification settings - Fork 819
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
move Netspeak Unreal SDK into Agones Unreal SDK #1739
Conversation
Build Failed 😱 Build Id: 1e4ca539-e5b7-46ff-9963-80de5a4be5b9 To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
Seems like failing conformance tests. |
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 sending this through, excited to see this moving forward.
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
using UnrealBuildTool; |
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.
All files will need to have the Google LLC Apache licence at the top please, before we can accept them.
@@ -0,0 +1,361 @@ | |||
#pragma once |
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.
Apache licence please
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// Copyright Epic Games, Inc. All Rights Reserved. |
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.
Unfortunately I don't think we can't accept this with the current copyright 😞 not sure if that is going to be an issue?
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.
This was due to taking the short cut of generating via UE4 can rewrite exactly the same by hand.
sdks/unreal/Agones/README.md
Outdated
|
||
## Developer Information | ||
## Getting Started |
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.
These user docs should really live in: https://agones.dev/site/docs/guides/client-sdks/unreal/
There is a guide on how to document upcoming features so that they can be hidden until the next release here:
https://agones.dev/site/docs/contribute/#documentation-for-upcoming-features
If someone from @drichardson @dotcom @WVerlaek @robbieheywood (or other Unreal users) can give this a review, that would also be awesome, just to make sure there are no concerns or issues 👍 |
Build Succeeded 👏 Build Id: 97fe111c-aea0-4a4d-8af4-7addb50ebe3b The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
I tried this SDK (with UE version=4.24.3-0+++Release-4.24 source build) and it was very easy to use. niceee. By the way, about WatchGameserver, Fortunately, IHttpRequest has a Delegate called FHttpRequestProgressDelegate, which allows us to monitor whether or not the Stream has made progress. Of course, what the above is doing is simply calling CheckProgressDelegate(); every time with Tick() to see if there is a change in the Bytes received. A good reason to use FSocket is to be able to discard the past data. (Of course, assuming we use libcurl, It would be nice if we could add a method to FCurlHttpRequest to clean the buffer. But I can't think of how to do it well.) That's just my opinion. Please point out to me if I'm wrong. |
@dotcom thanks for taking it for a spin!! |
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.
Nice work @domgreen, got a few comments but overall looking good
{ | ||
GENERATED_BODY() | ||
|
||
UPROPERTY() |
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.
Should this also be UPROPERTY(BlueprintReadOnly)
?
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.
Yep, just did a check and I only set it in C++ it is passed in as a argument in the func call, will check the rest of the file as well.
} | ||
|
||
// TODO(dom) - look at JSON encoding in UE4. | ||
Json = Json.Replace(TEXT("playerId"), TEXT("playerID")); |
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.
Any way this can be done differently?
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.
This frustrated me for days ... I would love to know if there is a way to fix this, seems that JSON encoding isnt great in UE4. Do you have any suggestions?
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.
Feel your pain.. Not sure either, does renaming the PlayerId
field of FAgonesPlayer
to PlayerID
do anything?
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.
nope, I did try that ... could have just been holding it wrong but have had a few ppl look at it internally and nothing obvious came up. If you could see if the i8e team knows a work around that would be fantastic.
} | ||
|
||
// TODO(dom) - look at JSON encoding in UE4. | ||
Json = Json.Replace(TEXT("playerId"), TEXT("playerID")); |
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.
Same here
* See - https://agones.dev/ for more information. | ||
*/ | ||
UCLASS(ClassGroup = (Custom), meta = (BlueprintSpawnableComponent)) | ||
class AGONES_API UAgonesComponent final : public UActorComponent |
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.
Previously Agones plugin settings could be configured in a config file (by having UCLASS(config = Game, defaultconfig)
as class properties), is that still possible or do these settings need to be set at runtime now?
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.
It is possible to do as mentioned we could add the UCLASS config section ... would require some more thinking of where we would want the config for the plugin to live. Can add it onto my back log to investigate.
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 think that would be good, also to ease the migration from the old plugin to this one. It also makes sense for things like auto connect and health checks to live in a config file as they are picked up immediately once the Agones plugin is created, you'd have to be careful changing these values at runtime at the right time
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.
have added port, rate of health check and disableConnect to the config ... this is also added to the docs
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.
Nice, can you add defaultconfig
as well (from #1352)?
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.
mind blown, didnt even know this existed 😂
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.
mind blown, didnt even know this existed
✨✨✨ THE POWER OF OPEN SOURCE AT WORK ✨✨✨
TSharedRef<IHttpRequest> UAgonesComponent::BuildAgonesRequest(const FString Path, const FHttpVerb Verb, const FString Content) | ||
{ | ||
FHttpModule* Http = &FHttpModule::Get(); | ||
TSharedRef<IHttpRequest> Request = Http->CreateRequest(); |
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.
Any particular reason automatic request retries have been removed? That's probably fine if you have autoConnect turned on but in the case you have it disabled and the game itself calls Ready
at some point it would be helpful if that request will retry until e.g. the agones sidecar is ready
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.
We do have helper functions that do this on startup that can be used to poll the endpoint till the sidecar is healthy, it will then call ready and return the game-server as part of a delegate that you can do with what you need.
Main reasons for not using the auto request retries was I've not seen it heavily used in other plugins and now that we have the fail call back its much easier to allow the game play programmers to deal with the inability to make the call themselves via delegates, there may be edge cases where they would prefer a failed call to do something else rather than keep retrying.
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.
Ah right instead of calling Ready
you'd then use Connect
to poll until ready, I think that works. Might be worth adding a small section to the docs calling this out as part of migrating from the old plugin to this one
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.
This is more inline with what I have seen in the other Agones plugins from what I remember. Will add a section to the docs.
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.
Ahhh, it's already in the docs :D saying that there are additional utility methods that have been added to the plugin that can be used for both health and connect 🥇
Build Succeeded 👏 Build Id: 9ae8b0ef-b7bf-47ed-a671-7fbb1a4d1168 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
@WVerlaek its not letting me |
Build Succeeded 👏 Build Id: 3cc09f34-7138-4840-98e6-04fee69d5944 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
Small nit to add |
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.
One small thing on the docs, but otherwise, also looks good to me.
Looks like we'll be able to squeeze this in before RC next Tuesday, which is awesome!
@@ -18,7 +18,7 @@ Check the [Client SDK Documentation]({{< relref "_index.md" >}}) for more detail | |||
|
|||
Download the source from the [Releases Page](https://github.com/googleforgames/agones/releases) | |||
or {{< ghlink href="sdks/unreal" >}}directly from GitHub{{< /ghlink >}}. | |||
|
|||
{{% feature expiryVersion="1.8.0" %}} |
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.
Nice!
Build Succeeded 👏 Build Id: 07240103-f8ad-46ca-a04f-7094200568be The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
@WVerlaek if you could please confirm you got the |
Yup thanks for adding, LGTM |
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.
🤸🤸🤸🤸🤸
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: domgreen, markmandel The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
* moving Netspeak Agones SDK into main repo SDK Co-authored-by: Mark Mandel <markmandel@google.com>
What type of PR is this?
/kind breaking
What this PR does / Why we need it:
This PR updates the Unreal SDK to the one at https://github.com/netspeakgames/UnrealAgonesSDK
Which issue(s) this PR fixes:
Closes #1683
Special notes for your reviewer:
👋 hi, thanks for the great project.