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

Unreal Engine 4 Plugin #647

Merged
merged 5 commits into from
Apr 27, 2019
Merged

Conversation

YannickLange
Copy link
Contributor

@YannickLange YannickLange commented Mar 13, 2019

Initial Unreal Engine 4 Plugin for Agones.

The problem with having the plugin within this repository is that people will have to copy the directory in to the Plugins folder of each Unreal Engine project that uses Agones. They would also have to do this when there is a new version of the plugin. In addition to that it might be less clean regarding branching and binaries for different Unreal Engine versions. I made a seperate repository for just the plugin (https://github.com/YannickLange/UEAgones). So people can just clone that. It might be an idea to do "active" development there and then pull the changes to the agones repo?

Anyway. Try it out, would love to hear feedback!

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

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.

🔥 Awwwwweeeeeesome 🔥

Some thoughts:

  • Should the folder be "Unreal" rather than "UEAgones" ?
  • We'll definitely want some docs for this.

I also need to find someone who knows Unreal to review 😄

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 907b9c80-4fe2-4640-bbe6-c73c80f4b1a0

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/647/head:pr_647 && git checkout pr_647
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.9.0-e0da9e3

@YannickLange
Copy link
Contributor Author

🔥 Awwwwweeeeeesome 🔥

Some thoughts:

  • Should the folder be "Unreal" rather than "UEAgones" ?
  • We'll definitely want some docs for this.

I also need to find someone who knows Unreal to review 😄

  1. I might be better to name the directory Unreal and within that directory Agones, because that directory needs to be copied into the Plugins directory within the Unreal Engine project. Would be weird to have a Plugins > Unreal directory while it is the Agones plugin.
  2. I will write those later and give them to you so you can add and test it for the website.

@fdasoghe
Copy link

I'm very interested in trying out this plugin, but I'm not much used to install new plugins into Unreal. Is there some docs I can read/follow to know how to do it right?

@YannickLange
Copy link
Contributor Author

I'm very interested in trying out this plugin, but I'm not much used to install new plugins into Unreal. Is there some docs I can read/follow to know how to do it right?

I'll write docs later, but it comes down to the general steps. I assume you already have done/been able to do 1, 3, 4 and 6. Only 2 and 4 are related to the plugin. No coding required 😃

  1. Have project with Unreal Engine from source code
  2. Add this directory to your Plugins directory within your Unreal Engine Project
  3. Setup cross compilation so you can compile Unreal Engine + your game (including the plugin) for Linux
  4. Compile your game for Linux with Development Server
  5. Make sure the plugin is enabled within your game (restart the editor if it wasn't)
  6. Package your game

Hope that helps for now!

@dsazonoff
Copy link
Contributor

Code looks ok. I don't think that we need to follow google codestyle for that, because UE has its own. Maybe I can build and test a bit later.
A small remark about copyrights in source code: they all should be 2019 - the date when file was added to repo.

@steven-supersolid
Copy link
Collaborator

I've been wondering how we might approach a Unity SDK so now following this PR with some interest. Has any thought been given to using gRPC instead of using the REST API?
Also, as I don't know Unreal, would it be possible to wrap the current C++ Agones SDK, and would there be value in doing this as that does use generated code?

@fdasoghe
Copy link

Has any thought been given to using gRPC instead of using the REST API?

I've tried it (on Linux) and others here have done it on Windows. Integration of gRpc in Unreal Engine is quite an hell at the moment, basically for incompatibility between gRpc compiler settings/base libraries and Unreal's.

@dsazonoff
Copy link
Contributor

dsazonoff commented Mar 14, 2019

I've tried it (on Linux) and others here have done it on Windows. Integration of gRpc in Unreal Engine is quite an hell at the moment, basically for incompatibility between gRpc compiler settings/base libraries and Unreal's.

What do you think about using agones-cpp-sdk as a shared library as a base for UE plugin instead of direct implementation of SDK? Shared library will include all necessary gRPC stuff, so there should be no compiler/linker issues.

@fdasoghe
Copy link

fdasoghe commented Mar 14, 2019

What do you think about using agones-cpp-sdk as a shared library as a base for UE plugin instead of direct implementation of SDK? Shared library will include all necessary gRPC stuff, so there should be no compiler/linker issues.

As I said, I'm far from being an expert, all I know is that I've wasted several weeks trying to build UE4 with gRpc and I ended giving up and resorting to the REST interface.

Having said that, using the shared library should solve compiler/linker issues, but my fear is that you could end up finding those same issues between agones-cpp-sdk and Unreal. Unfortunately the Unreal build process is very cumbersome and poor documented: it's very picky on compiler version and flags, I digged through a lot of different problems and errors one after another so I cannot really feel confident on what to say about your question.

I would say Agones is becoming quickly such an important and notable project that someone at Epic could decide to put some effort in helping this integration (at least documenting what's needed).

EDIT: I've found an older thread about this: #138 that ended with this work: https://github.com/iniside/ue-grpc

@YannickLange
Copy link
Contributor Author

YannickLange commented Mar 14, 2019

What do you think about using agones-cpp-sdk as a shared library as a base for UE plugin instead of direct implementation of SDK? Shared library will include all necessary gRPC stuff, so there should be no compiler/linker issues.

As I said, I'm far from being an expert, all I know is that I've wasted several weeks trying to build UE4 with gRpc and I ended giving up and resorting to the REST interface.

Having said that, using the shared library should solve compiler/linker issues, but my fear is that you could end up finding those same issues between agones-cpp-sdk and Unreal. Unfortunately the Unreal build process is very cumbersome and poor documented: it's very picky on compiler version and flags, I digged through a lot of different problems and errors one after another so I cannot really feel confident on what to say about your question.

I would say Agones is becoming quickly such an important and notable project that someone at Epic could decide to put some effort in helping this integration (at least documenting what's needed).

EDIT: I've found an older thread about this: #138 that ended with this work: https://github.com/iniside/ue-grpc

I worked at Epic and I don't see them integrating Agones at all. They might add a grpc plugin, which would be nice. In addition to that, a plugin is way better for the Agones community, so the community has more control over it.

@YannickLange
Copy link
Contributor Author

Code looks ok. I don't think that we need to follow google codestyle for that, because UE has its own. Maybe I can build and test a bit later.
A small remark about copyrights in source code: they all should be 2019 - the date when file was added to repo.

  1. The codestyle should be Epics/Unreal's C++ code style. That's also what a large percentage of Unreal Engine users are using.
  2. You are right, will modify it

@Zanderax
Copy link

Awesome work Yannick! Is there a reason that GameServer, WatchGameServer, SetAnnotation and SetLabel aren't implemented?

@YannickLange
Copy link
Contributor Author

Awesome work Yannick! Is there a reason that GameServer, WatchGameServer, SetAnnotation and SetLabel aren't implemented?

Just haven't had time for that.

@markmandel
Copy link
Member

Just a gentle bump - our release candidate is hitting tomorrow, at which point we hit feature freeze for a week. Be great to get the outstanding items in this PR done so we can have this in this upcoming release.

@dsazonoff
Copy link
Contributor

@YannickLange I suggest to use existing cpp sdk instead of making manual http requests. Now it is possible to build cpp sdk as a dynamic library for all platforms (with CMake and AGONES_BUILD_SHARED=ON), so there will be no direct gRPC dependency (so it is not necessary to build gRPC with UE build system). If you have any questions related to building cpp sdk, feel free to contact me.

@markmandel markmandel added area/user-experience Pertaining to developers trying to use Agones, e.g. SDK, installation, etc kind/feature New features for Agones feature-freeze-do-not-merge Only eligible to be merged once we are out of feature freeze (next full release) labels Mar 26, 2019
- Changed copyright to 2019
- Removed unused REAMDE.md
@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: cf9d42b1-956e-40e0-89f4-f36c621abcc3

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

@markmandel markmandel removed feature-freeze-do-not-merge Only eligible to be merged once we are out of feature freeze (next full release) labels Apr 12, 2019
Co-Authored-By: YannickLange <YannickLange@users.noreply.github.com>
@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: a6acdceb-d0a7-4e1f-bd65-b3151c9ec14b

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

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: dc6f059b-0b6b-421f-b4b1-390fd993a45e

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/647/head:pr_647 && git checkout pr_647
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.10.0-0dd3cba

@markmandel
Copy link
Member

Wh00t! We have a working build!

So - final, final things.

  1. Per contributor guidelines please squash the commits down to a single commit
  2. Please sign the CLA. We can't accept the PR until you do so 😞

Really looking forward to having this in the repository finally though!!!

@YannickLange
Copy link
Contributor Author

Wh00t! We have a working build!

So - final, final things.

  1. Per contributor guidelines please squash the commits down to a single commit
  2. Please sign the CLA. We can't accept the PR until you do so 😞

Really looking forward to having this in the repository finally though!!!

Signed it! Let's go !!!!

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@markmandel
Copy link
Member

  1. Per contributor guidelines please squash the commits down to a single commit

^ sorry, still got one more step. Almost there!

@markmandel
Copy link
Member

Gentle bump 😄 just need this squashed, and its good to go.

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 6e81bf37-0ca4-47d2-b5b9-f75be7082172

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/647/head:pr_647 && git checkout pr_647
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.10.0-fd9691f

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.

🤩

@markmandel markmandel merged commit edd582f into googleforgames:master Apr 27, 2019
@markmandel markmandel added this to the 0.10.0 milestone May 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/user-experience Pertaining to developers trying to use Agones, e.g. SDK, installation, etc kind/feature New features for Agones
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants