Git Product home page Git Product logo

Comments (30)

markmandel avatar markmandel commented on May 22, 2024 3

Good note from chat - we should have blueprint support as well.

from agones.

iniside avatar iniside commented on May 22, 2024 2

I have started working on basic plugin for Unreal Engine. No plans for any deep integration as of now, as it would require creating some backing services.

In current state plugin will only wrap around provided API. I'm currently wrapping code and will test the server over next few days on GKE. If it works I will upload full plugin to Github.

from agones.

Clubbable avatar Clubbable commented on May 22, 2024 1

Hi, I've reading about the Agones integration with Unreal, and I am a little confused as to the use cases for this. As I understand, Agones should talk exclusively to the custom matchmaker, and not to the game client or the game server. Since Unreal simply provides and game client/server, and does not act as a custom matchmaker (even though Online Subsystem provides matchmaking wrapper, it doesn't actually do the matchmaking), why would Unreal game client/server need to talk to Agones?

As mentioned before, I thought it would be more beneficial if the matchmakers like PlayFab or GameSparks would integrate with Agones to know when to spawn new servers.

As another sidenote, I am aware that PlayFab uses AWS and offers custom game server scaling already, I would imagine that is a similar services to Agones. I believe PlayFab's server scaling services uses AWS EC2 instances and charges a +10% fee on top of normal AWS server fees

from agones.

g-ericso avatar g-ericso commented on May 22, 2024 1

We will be testing the new feature this coming week. The idea is to make a c++ unreal simple .cpp and .h classes which will be shared in this repo. Stay tuned!

from agones.

justinliew avatar justinliew commented on May 22, 2024

What sort of Blueprint support would you envision? In my experience implementing an Online Subsystem specifically for an Agones server should be sufficient (ie. the OSS would talk to the sidecar and then provide all the required functionality/hooks required for the server).

from agones.

markmandel avatar markmandel commented on May 22, 2024

I'll defer to @digitalfiz on this one. My Unreal experience is very minimal - but something I want to change. So would be great to have some direction from all of you.

from agones.

digitalfiz avatar digitalfiz commented on May 22, 2024

You may be correct @justinliew. Technically by integrating with the online subsystem you get quite a bit of built in blueprint support. Maybe all the blueprint support that is needed? At this point I don't know enough about all of Agones functionality to know if anything more is needed.

from agones.

justinliew avatar justinliew commented on May 22, 2024

Blueprints are meant for scripting, and typically used by designers or programmers who are implementing gameplay mechanics, level mechanics and the like. I can't think of any obvious reasons those users would need any Agones support. Possibly I'm missing something, but I'd say the less networking you need to expose to Blueprints, the better.

from agones.

fire avatar fire commented on May 22, 2024

A usecase for blueprint support integrating with Unreal Engine and back-ends is defining the statistic generated when attached to blueprint code. For instance an artist prototypes when you want to count the specific choice made in a conversation tree. See the conversation popularity ranking in the game Dreamfall Chapters.

Another usecase is the typical steps of joining a matchmaking lobby, being matchmade and joining a server. Although this is can be done in C++, the widespread blueprint usage of Unreal Engine allows lesser skilled developer to do it. This gives a wider audience to the framework.

from agones.

justinliew avatar justinliew commented on May 22, 2024

I'd argue that the first case shouldn't touch anything Agones deals with, though. That sounds like something that would be sent via a REST call to a service.

The second point I agree might have some Blueprint hooks, although I would strongly urge the actual matchmaking state machine/stages be done in native (C++) code, as there are a ton of edge cases that Blueprints are error prone at handling.

from agones.

digitalfiz avatar digitalfiz commented on May 22, 2024

On the first note I think that is covered under the online subsystem as maybe user cloud, shared cloud or leaderboards?

On the second point matchmaking is built into the online subsystem so again not much more to do unless you wanted to extend what is possible over the built in matchmaking functionality.

https://docs.unrealengine.com/en-US/Programming/Online/Interfaces/Session

The more I think about it the key is going to be making sure that anything in the online subsystem Agones can handle is added to a plugin for Unreal Engine. I think that maybe even existing systems like AdvanceSessions can be layered on top of it to give extended functionality.

from agones.

justinliew avatar justinliew commented on May 22, 2024

Sounds good. I haven't worked with the sessions stuff as it appears it was done to plug holes in the lack of Steam support, which I never needed.

from agones.

iniside avatar iniside commented on May 22, 2024

I don't think integrating with online Subsystem is good idea. At least for getting something working.

From what I understand Agones is more of server hosting and management in Kubernetes cluster.
And on that front having UE plugin would be awesome (I'd like to start working on it when I get my current projects in better state).

OnlineSubsystem interface is meant to provide abstraction over services like GameSparks, Playfab, Steam, or any other multiplayer backend where you have ie friends lists, sessions (matches) etc.

Agones integration in UE should first focus on communicating between Kubernetes cluster and UE server instance (ie, getting port and ip of server, health check etc).

Match making service (ie, sending needed IP and Port) would be out of scope, and unnecessary complicated at that point.
Ie if I use GameSparks I will use Agones only for launching/monitoring servers. Agones will never be directly exposed to players it will only communicate with GameSparks service, which will in turn send needed information to client to connect.

Creating OnlineSubsystem plugin would mean exposing Kubernetes cluster to world and I don't think it is needed and/or good idea for now.

from agones.

digitalfiz avatar digitalfiz commented on May 22, 2024

@iniside The more I understand about Agones the more I agree with you. When I first heard about it and started looking into it I thought it was going to be more than a Kubernetes wrapper but it looks like that is the goal. Keep things simple. Maybe there should be focus on integration with services like GameSparks, Playfab or Steam? Might even spawn off a project for doing what those services do but self managed like and works with Agones.

from agones.

iniside avatar iniside commented on May 22, 2024

Ok. This proved to be far more difficult than I anticipated. The biggest problem lies in building grpc/protobuf and integrating it into Unreal.

I'm not that good myself with setting up build systems. Some basic issues that I fixed:

    1. Conflicting time.h headers in protobud/grpc -> renamed.
    1. Conflicting macro check -> renamed
    1. MSVC Macros not resolving properly when building for linux target in Unreal -> Add additional macro in headers that caused issues.

That was the easy part.

The part is the fact that grpc brings along loads of other dependencies. Like libssl (which is incompatibilie the version already in Unreal).
Cooked builds miss some dynamic libraries like libgrpc++_unsecure.so.1, which is nowhere to be found nor does it build with agones.

Possible solutions to those issues is to build grpc (modified) along with Unreal from sources, instead of relying on precompiled libraries.

Other solution is to not use gRPC for communication, but I guess it is not an option.

from agones.

markmandel avatar markmandel commented on May 22, 2024

I'm starting to wonder if we prioritise the work to expose the sdk grpc endpoints as rest endpoints just to make engine integration easier - especially for anything C++ based.

@dzlier-gcp what do you think - that would make your life easier as well, no?

@Kuqd wdyt?

from agones.

iniside avatar iniside commented on May 22, 2024

I will keep trying to integrate grpc into Unreal. But that's going to be custom fork, with some unreal specific fixes. I found interesting blog post:

https://adamrehn.com/articles/cross-platform-library-integration-in-unreal-engine-4/

Which might help with it.

Is there any reason that agones might not work with the latest version of GRPC ?

from agones.

markmandel avatar markmandel commented on May 22, 2024

In the past I've found grpc incredibly backward compatible, so it should work with the latest version.

At some point we should also upgrade just to keep up with updates.

from agones.

iniside avatar iniside commented on May 22, 2024

Agones needs to be integrated with Unreal, so Kubernetes cluster know what is going on with server. Ie, if server do not ave players and game ended Kubernetes will automatically deallocate resources need for this server.

At basic level you don't need anything beyond game server, telling kubernetes what is it state.

You can theoretically extend it to provide other functionality (like saving/loading server state, but that's really case specific).

from agones.

g-ericso avatar g-ericso commented on May 22, 2024

@iniside Have you success running unreal server with Agones? Sounds like it works for you.

from agones.

markmandel avatar markmandel commented on May 22, 2024

I changed the title, as people were thinking this ticket wasn't about getting Unreal working. Let me know if you have objections.

from agones.

iniside avatar iniside commented on May 22, 2024

@g-ericso

Not yet. I'm still at the stage of integrating gRPC into unreal.

The upside is, I'm slowly getting it done. I decided the best course will be forking gRPC, protobuf and writing custom build-chain with Python.
Building it with Unreal Toolchain requries some unreal specific fixes. IF possible I will try to push patches upstream, once it is working.

Unreal is very picky about what can be linked to it, and default make files from gRPC were just not creating for that specific scenario.

from agones.

iniside avatar iniside commented on May 22, 2024

Here is basic build of gRPC plugin for unreal
https://github.com/iniside/ue-grpc

Unreal<>Agones integration will be depending on this. I figured out you might want to use gRPC without Agones, and that's why it is in seprate plugin.

from agones.

g-ericso avatar g-ericso commented on May 22, 2024

@iniside Thanks for the update. I will take a look this week and provide you some feedback.

from agones.

markmandel avatar markmandel commented on May 22, 2024

As a heads up, I'm working on the exposure of the SDK Server via HTTP+JSON right now, and should be ready by end of this week (next at the latest) - which should provide a much easier option for building a native SDK for Unreal, since it looks like Unreal already can do HTTP+JSON natively, rather than trying to shoehorn gRPC into the mix.

See #240 for some more details.

from agones.

Clubbable avatar Clubbable commented on May 22, 2024

One more question in regards to this issue, I've just tried to put up an UE4 server and orchestrate it via Agones, it is giving back status of "unhealthy" immediately. Is this because there's no communication between UE4 and kubernetes so that the game server can tell when it is spun up and healthy?

from agones.

markmandel avatar markmandel commented on May 22, 2024

Now that #240 is complete and in the development branch. This should be relatively easy to implement now. @g-ericso I know you are playing with this - let us know how your efforts are going 😄

from agones.

g-ericso avatar g-ericso commented on May 22, 2024

We made a c++ lib and connected successfully with localhost server. However, I don't have bandwidth to make a blueprint or UE library.

from agones.

YannickLange avatar YannickLange commented on May 22, 2024

I just submitted a pull request for a UE4 plugin: #647

The plugin doesn't require any programming. Just drop it in the Plugins directory of your project. I added some settings to the project settings (just search for agones). Currently, the plugin calls ready when the dedicated server world is ready, calls health pings and shutdown when the server shuts down.

Would love to hear your feedback.

from agones.

markmandel avatar markmandel commented on May 22, 2024

Closing, as now we have #647 !

from agones.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.