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

Extend Agones Unreal SDK #1303

Merged
merged 5 commits into from
Jan 30, 2020
Merged

Extend Agones Unreal SDK #1303

merged 5 commits into from
Jan 30, 2020

Conversation

WVerlaek
Copy link
Contributor

@WVerlaek WVerlaek commented Jan 29, 2020

  • Implements additional SDK methods: SetLabel, SetAnnotation, and GetGameServer.
  • Makes the Agones Hook publicly accessible, allowing the SDK methods to be called from game logic.
  • Adds retrying of HTTP requests (except health). Number of retries is configurable in the Agones plugin settings.

Tested by:

  • Running TESTS=ready,health,gameserver,setlabel,setannotation make run-sdk-conformance-local
  • Calling the SDK methods in AgonesHook from game logic inside the UnrealEditor and verifying the results
  • Creating a Debug build of the game server and deploying it in a fleet, verifying Ready, Health and SetLabel/SetAnnotation are called correctly

Example SetLabel requests based off data received by GetGameServer (output from SDK conformance test):
image

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 3a518848-5b9c-468d-aebf-d467055ac907

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:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/1303/head:pr_1303 && git checkout pr_1303
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.4.0-1230555

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 59b1ab67-c0e6-4fba-a9b3-c549dc669858

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:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/1303/head:pr_1303 && git checkout pr_1303
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.4.0-43f458f

@markmandel markmandel added area/user-experience Pertaining to developers trying to use Agones, e.g. SDK, installation, etc kind/feature New features for Agones labels Jan 29, 2020
@markmandel
Copy link
Member

  1. This looks awesome. Thank you so much for doing this work! 🤸‍♂️
  2. Glad to see you got the test harness working. Doesn't have to be this PR, but any thoughts on building a Make target so we can all run it?
  3. You say you built a Debug test server? Any chance you want to contribute that to ./examples? (also can be a subsequent PR)

I can take a look through, but @devjgm you are our usual C++ person (I believe Unreal is different???) do you have time to do a review?

Copy link

@padhansell padhansell left a comment

Choose a reason for hiding this comment

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

🎉

sdks/unreal/Agones/Source/Agones/AgonesHook.cpp Outdated Show resolved Hide resolved
sdks/unreal/Agones/Source/Agones/AgonesHook.h Outdated Show resolved Hide resolved
@markmandel
Copy link
Member

I had a quick look - barely means anything to me 😄

@padhansell - since it looks like you are doing a review (thanks!) please let us know when you think this is good to go, and I'll approve. 👍

Copy link

@padhansell padhansell left a comment

Choose a reason for hiding this comment

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

@WVerlaek probably worth also compiling for the Editor, and testing in Shipping configuration if you haven't already, just to be double sure that nothing is getting #ifdefd out and causing compilation issues. Your changes shouldn't introduce anything, but generally worth checking for sanity 😄

Otherwise looks good to me @markmandel!

, *SidecarAddress
, (Settings->bHealthPingEnabled ? TEXT("True") : TEXT("False"))
, Settings->HealthPingSeconds
, (Settings->bDebugLogEnabled ? TEXT("True") : TEXT("False")));
, (Settings->bDebugLogEnabled ? TEXT("True") : TEXT("False"))

Choose a reason for hiding this comment

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

@WVerlaek we discussed this yesterday but adding here for posterity!

In a subsequent PR we should probably ditch bDebugLogEnabled and instead just make use of the log levels in Unreal's logging system, which would:
a) Allow developers to change the logging behaviour through .ini configuration files, and on-the-fly through console commands. As an example, through the in-game console (or remotely using the "messaging" system), you could run the command log LogAgonesHook error to suppress any logs with a severity less than Error
b) Make the plugin more consistent with the rest of the engine
c) Remove some code

Copy link
Contributor

Choose a reason for hiding this comment

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

Agree, standardize on the engine and how UE4 enginers' work would be fantastic in a follow-up.

Mentioned in the past that blueprint support would be fantastic.

@google-oss-robot
Copy link

@padhansell: changing LGTM is restricted to collaborators

In response to this:

@WVerlaek probably worth also testing in Shipping configuration if you haven't already, just to be double sure that nothing is getting #ifdefd out and causing compilation issues. Your changes shouldn't introduce anything, but generally worth checking for sanity 😄

Otherwise looks good to me @markmandel!

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@WVerlaek
Copy link
Contributor Author

Glad to see you got the test harness working. Doesn't have to be this PR, but any thoughts on building a Make target so we can all run it?

You say you built a Debug test server? Any chance you want to contribute that to ./examples? (also can be a subsequent PR)

Thanks for taking a look! Not sure how easy it would be to create a make target or example for the unreal plugin, might potentially be quite a large undertaking. I've been testing the plugin using an existing unreal engine project, a new sample project would need to be created as well (which could be quite a lot to check in to the repo?)

@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 5bbe9ea9-7ef1-46fc-9e24-5b66baeabb74

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:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/1303/head:pr_1303 && git checkout pr_1303
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.4.0-afa2d60

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 1eed3ca9-5c7f-4162-a6cd-910b8de7b667

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:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/1303/head:pr_1303 && git checkout pr_1303
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.4.0-647e6d8

@WVerlaek
Copy link
Contributor Author

Have checked that compiling for Editor and Shipping builds work

@markmandel markmandel added this to the 1.4.0 milestone Jan 30, 2020
Copy link
Member

@markmandel markmandel left a comment

Choose a reason for hiding this comment

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

🚢

@google-oss-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: markmandel, padhansell, WVerlaek

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@markmandel
Copy link
Member

I've been testing the plugin using an existing unreal engine project, a new sample project would need to be created as well (which could be quite a lot to check in to the repo?)

If there is a way to maybe do a skeleton project? I.e. something like "create a new project, and then copy these files into this place" ?

That being said, the Unity sample is 62M, which is fine - how big are we talking?

@markmandel markmandel merged commit 06a93b7 into googleforgames:master Jan 30, 2020
markmandel added a commit that referenced this pull request May 15, 2020
Co-authored-by: Mark Mandel <markmandel@google.com>
ilkercelikyilmaz pushed a commit to ilkercelikyilmaz/agones that referenced this pull request Oct 23, 2020
* Add SetLabel SetAnnotation GetGameServer and request retries
* Update Unreal sdk settings in docs
* Fix docs list markdown
* Add const and improve error message
ilkercelikyilmaz pushed a commit to ilkercelikyilmaz/agones that referenced this pull request Oct 23, 2020
Co-authored-by: Mark Mandel <markmandel@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved area/user-experience Pertaining to developers trying to use Agones, e.g. SDK, installation, etc kind/feature New features for Agones lgtm size/XL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants