agones icon indicating copy to clipboard operation
agones copied to clipboard

[Unreal] Refactor agones component to subsystem

Open GloryOfNight opened this issue 1 year ago • 9 comments

What type of PR is this?

Uncomment only one /kind <> line, press enter to put that in a new line, and remove leading whitespace from that line:

/kind breaking

/kind bug /kind cleanup

/kind documentation

/kind feature

/kind hotfix /kind release

What this PR does / Why we need it:

  • Refactor agones from using ActorComponent to GameInstanceSubsystem:

    • Subsystem seems to be more suitable for agones in general. Documentation on topic
    • Subsystem will persist across all worlds.
    • Subsystem easier to integrate, since it does not require being part of some actor which it should be attached to. You can see updated documentation to understand how much easier it to use.
    • Subsystem would be created only for server builds, saving on resources.
    • Subsystem could be easily obtained using Get() function from any UObject context
  • Removed final keyword, to allow basing of Subsystem and overriding it's behavior.

  • Added bDisableAutoHealthPing variable to disable auto call to HealthPing() during Initialization

  • Added blueprint readwrite flag support for HealthRateSeconds, bDisableAutoHealthPing, bDisableAutoConnect to improve blueprint support slightly.

  • Space&Tabs mix change to just Tabs

Special notes for your reviewer:

That is something we used internally for some time already and I think people can benefit from that change. This change would break code that was previously dependent on AgonesComponent.

build.log

GloryOfNight avatar Nov 11 '24 11:11 GloryOfNight

Build Succeeded :partying_face:

Build Id: 3ab0bc2c-9618-471a-af73-0f58076bc7d9

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):

  • https://0d0c4d4-dot-preview-dot-agones-images.appspot.com/

To install this version:

git fetch https://github.com/googleforgames/agones.git pull/4033/head:pr_4033 && git checkout pr_4033
helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.45.0-dev-0d0c4d4

agones-bot avatar Nov 11 '24 12:11 agones-bot

Build Failed :sob:

Build Id: 25d7e15e-cdf9-4b3c-a2b3-6d160f0177d3

Status: FAILURE

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

agones-bot avatar Nov 11 '24 16:11 agones-bot

/gcbrun

gongmax avatar Nov 13 '24 16:11 gongmax

Build Succeeded :partying_face:

Build Id: f3e2be54-b83b-4fda-ae32-fdb1375a3cc7

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):

  • https://b87eaef-dot-preview-dot-agones-images.appspot.com/

To install this version:

git fetch https://github.com/googleforgames/agones.git pull/4033/head:pr_4033 && git checkout pr_4033
helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.45.0-dev-b87eaef

agones-bot avatar Nov 13 '24 17:11 agones-bot

@KAllan357 as an Unreal contributor, could you please review? This PR in particular is marked as breaking.

igooch avatar Jan 29 '25 05:01 igooch

/gcbrun

igooch avatar Jan 31 '25 19:01 igooch

Build Failed :sob:

Build Id: c1fe56e2-bbf7-4971-a783-6e629d40a987

Status: FAILURE

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

agones-bot avatar Jan 31 '25 20:01 agones-bot

@KiaArmani @DevChagrins @oniku2929 as recent Unreal contributors, could you please take a look at this PR?

igooch avatar Mar 10 '25 18:03 igooch

@KiaArmani @DevChagrins @oniku2929 as recent Unreal contributors, could you please take a look at this PR?

Without pulling the code and building locally, the code looks good to me.

DevChagrins avatar Mar 10 '25 19:03 DevChagrins

/gcbrun

markmandel avatar Nov 10 '25 15:11 markmandel

Swinging about around on this - CoPilot did find some spelling errors that we should fix please:

  • Corrected spelling of 'Retrive' to 'Retrieve'. sdks/unreal/Agones/Source/Agones/Public/AgonesSubsystem.h:140
  • Corrected spelling of 'HealhPing' to 'HealthPing'. sdks/unreal/Agones/Source/Agones/Public/AgonesSubsystem.h:163
  • Corrected spelling of 'initilization' to 'initialization'. sdks/unreal/Agones/Source/Agones/Public/AgonesSubsystem.h:111
  • The documentation still refers to this as 'Unreal Component' but it's now a subsystem. This should be updated to 'Unreal Subsystem' for accuracy.

markmandel avatar Nov 10 '25 15:11 markmandel

Build Succeeded :partying_face:

Build Id: 23824d24-3a84-4ee8-83ab-a093855cc5bd

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):

  • https://5983142-dot-preview-dot-agones-images.appspot.com/

To install this version:

git fetch https://github.com/googleforgames/agones.git pull/4033/head:pr_4033 && git checkout pr_4033
helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.54.0-dev-5983142

agones-bot avatar Nov 10 '25 16:11 agones-bot

/gcbrun

markmandel avatar Nov 10 '25 19:11 markmandel

lgtm and a welcome change!

keith-miller avatar Nov 10 '25 19:11 keith-miller

Part of me wants to merge this on the 24th, because then it's been a full year 🤦🏻‍♂️ (not really, let's get this in soon)

mumbles something about really needing some approvers with Unreal knowledge

markmandel avatar Nov 10 '25 19:11 markmandel

Build Succeeded :partying_face:

Build Id: bdf91344-485b-47ed-9615-1cbb291475d7

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):

  • https://a9d003f-dot-preview-dot-agones-images.appspot.com/

To install this version:

git fetch https://github.com/googleforgames/agones.git pull/4033/head:pr_4033 && git checkout pr_4033
helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.54.0-dev-a9d003f

agones-bot avatar Nov 10 '25 20:11 agones-bot

/gcbrun

markmandel avatar Nov 10 '25 21:11 markmandel

Build Succeeded :partying_face:

Build Id: 67aa95be-fe38-4053-86e1-5303e1698a29

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):

  • https://e981303-dot-preview-dot-agones-images.appspot.com/

To install this version:

git fetch https://github.com/googleforgames/agones.git pull/4033/head:pr_4033 && git checkout pr_4033
helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.54.0-dev-e981303

agones-bot avatar Nov 10 '25 22:11 agones-bot