It's been almost a year since GGPO went open source... How come no information about integration?

I’m very surprised that so long has passed, and there’s still absolutely on information about integrating GGPO in to Unreal Engine.

It seems to be that it would be just 2 primary steps to get it working well.

  1. How to get UE4 to perform deterministic.
  2. Actually integrating GGPO in to UE4 and using it rather than UE4’s built in networking.

GGPO itself is pretty basic. But getting it working in a game engine seems to be a completely different story.

It’d be great if the community comes together and figures out how to solve this problem, as several major developers seem to have already done so. Again, I’m just surprised that the community has been silent about this. Stronger peer to peer networking just seems like it would be an obvious thing for the community to work towards!

I’m a pretty experienced multiplayer programmer for UE4, and personally I can’t think of anything worse than trying to replace UE’s (very good) networking architecture with a third-party API.

It also doesn’t make much sense to me - UE already has everything you need, you just need to build a rollback system. For an experienced gameplay/multiplayer programmer that’s not overly challenging - but it is pretty game-specific, which is probably why there isn’t a widely-available plugin for it.

Determinism is another discussion altogether, but I doubt that would be neccesary.

The GGPO author thinks very highly of his system!
It turns out, in practice, it’s not as general purpose as he would want.
Specifically, it requires not only that simulation is deterministic, but also that it is cheap enough to re-run many steps of simulation every frame.
This is true for 2D fighting games, for sure, and may even be true for 3D fighting games that only have two characters and perhaps some scripted breakable props.

It’s not true for a general purpose rigid body simulation, though.

Trying to use GGPO with Unreal is problematic, not just because the simulation is quite expensive (once you add Chaos and lots of rigid bodies and skeletons and ragdolls,) but also because Unreal fundamentally is NOT deterministic.
The core of the Unreal simulation loop is all about locking simulation to the render rate, and accepting a variable frame rate. The integrator and other simulation code is fundamentally tuned to work in such a world. It also uses libraries that by themselves are not deterministic.

So, not only would it be a lot of very hard work to try to make Unreal deterministic, against the design of the engine, but it would also make simulation take up a lot more CPU and probably significantly reduce your frame rate.
So … why would you want it? If you need the specific kinds of trade-offs made in GGPO, you should probably use a much more light-weight game engine which focuses mostly on rendering, and use your own custom simulation code.

Please correct me if I’m wrong, but doesn’t the game have to be deterministic to properly integrate rollback? Different simulations on each client would cause problems, no?

I’m no expert in UE4’s networking architecture, but by default it seems to be delay-based, which is even the same issue with netcode for racing games/vehicles. And it seems nobody has been able to properly solve that problem yet either.

You can see in most of the fighting games that use UE4, they go delay based as well. Those who attempt rollback implementations don’t work well (SFV).

The only exception I know of in UE is MK11, which IIRC, uses a modified version of GGPO. And I believe that’s UE3 and not 4?

If it’s not overly challenging, I wish there was some examples out there of how to do it. Of course, certain things might be game-specific. But a good example could get developers started on how to get it working with one game example.

Netcode, in general, doesn’t seem to be very documented on UE4 except for first/3rd person action games. At least, in ways that are not using delay-based netcode. But delay based simply doesn’t feel smooth.

Around ~8 years ago, I had worked on netcode on Unity for an authoritative server with corrections that were pretty accurate. But finding documentation for pulling off the same here seems much more difficult, as all the genre’s I’ve looked in to have issues either with simulations, or they’re built to be delay based by default.

I honestly don’t have practice with GGPO so I can’t comment on that.

But yes, I do believe the simulation is a lot of the issue (again, same as we see in the vehicle systems).

Why would I want it? That’s an easy answer: Simply because GGPO (or solid rollback netcode) is the only true option to make fighting games that are playable without being frustrating.

MK11 is the best example of pulling it off in UE, and you can see that they use top-tier AAA graphics, and runs on high graphics even on mid-end systems without ridiculous CPU requirements. So they certainly were able to do it without taking up too much CPU.

At the end of the day, in my opinion, netcode seems to be the biggest area that UE4 is lacking. Of course, the genres of games I’m most interested in (vehicle, fighting, and beat em up) are all lacking with UE4’s built in netcode, and there’s no decent packages which solve the problem yet.

That’s all I truly hope for: Decent netcode for any (or all) of those genres. I’m just surprised nobody has been able to solve these problems by now, and if individual developers aren’t able to solve it, I’m surprised they haven’t come together in the community to solve these problems. Although that might be a bit idealistic.

UE4 is a pleasure to use in most areas. But it seems everything I try to work on in terms of multiplayer games… The time is spent fighting with the engine to get the netcode working well, rather than actually developing the game.

Yes, if you want to make a fighting game, my suggestion for you is to turn off all Unreal physics, and turn off all Unreal networking, and then build both physics and networking on your own. You can use Unreal animations, and you can use Unreal collision detection, but you probably can’t use the rigid body dynamics, nor the Chaos destruction.
This is a highly specialized application, building your own physics to work with your own networking to work with the kind of gameplay you want. Of course nobody will have read your mind and built it for you, ahead of time, for $99!

That was a full studio working on the game. That’s not going to be “a plugin” that you can buy on the marketplace.

Unreal Engine has made certain decisions at the core. It works great for shooters, and also pretty good for action-adventure type titles. It can be made to work for RPGs, and car racing games, and of course almost anything can work with a turn-based system. You can’t really stretch it to “deterministic lockstep” like an RTS, or to “deterministic replay” like a fighter. Those games are too niche and just work differently than what’s at the core of the Unreal physics/networking system. You will also note that the Unreal FAQ itself says that developers with “MMO” type requirements often end up putting in their own networking as well.

Luckily, you can re-use all of the Unreal graphics and scripting and asset and gameplay systems – you just need to re-build physics and networking, and then, each frame, extract the positions/poses of all the actors on the screen from your simulation, and render them.

Good luck!

Well there’s even a package for Unity that offers rollback netcode for a basic fighting game template, although it’s not GGPO persay. I’m just surprised similar hasn’t been worked on here (which is why I’m making this post).

I also recall the networking systems in Unity (photon, and even in the older days on uLink) having examples for various game types that were outside of traditional shooters/action/adventure/etc (basically, beyond what we see in UE4), and those were all the way back in 2010 or prior.

Compared to the rest of the package of UE4, it just seems this area is under developed and under documented relative to everything else. (I hope I’m wrong, but I haven’t found solid documentation anywhere beyond the basics).

But as I say in the OP of the thread, even a GGPO implementation (or any examples of rollback implementation of any kind for fighter games) would be all that was necessary. 99% of fighting games are built off the same foundation. An example is all that would be needed, and this is one area that UE4 is behind the curve. Developers literally tend to choose other engines instead of UE4 for fighting games, including sticking with UE3 instead. Doesn’t that seem like a pretty severe limitation of the engine? Or, on topic, a major problem that developers should be working together to solve?

Myself (and many other serious developers) would gladly pay far more than $99 for this type of implementation. I believe the implementations for other engines ran ~400 (and some now released fighters are built off of these packages).

For shooters/action/adventure/rpg, I agree. Racing has had major problems. You can see this if you browse the popular vehicle systems developed which atempted to solve the issues with physics. Blueman tried to solve these problems but never got it working properly. FGear is currently working on trying to solve it but hasn’t had success yet, and has publicized the issues encountered, and mentioned that in popular knowledge nobody has made netcode with proper prediction/not delay based netcode using UE4’s physics. His post is still up to date in the Marketplace forum here.

It seems PhysX is the biggest obstacle. Those who had success in UE3 ,I believe, switched to Bullet physics.

But again, biggest limitation in the whole package of the engine seems to be the netcode of UE4. Fighter/beat em up’s use a very different form of corrections that doesn’t play nicely with UE4, and anything that uses physics (such as the vehicle system) has been pretty much forced to use delay based or switch to another physics engine.

I just hope to see either of those 2 areas improved upon. I’d expect either of those challenges to be a high priority for developers to tackle,

It might just be bad luck in my case, as the genres I’m most interested in are difficult to do. But I’m sure there’s other developers out there that want to work on these genres as well. (Especially Racing as it’s a quite popular genre compared to fighters). But even for racing, the problems haven’t been solved. That’s why I’m surprised there hasn’t been any big community efforts to get it solved, y’know?

For areas outside of netcode, UE4 is perfect for my needs, especially with some of the updates within the last year. Yet netcode is the 1 problem I’ve yet to find a solution for in any of the genres I’m interested in.

Why don’t you hire a good network programmer to write the needed functionality for you?

Well considering not even any AAA teams have successfully made suitable rollback for fighting games in UE4. Regarding the vehicle system as I mentioned… nor to my knowledge has anyone solved the client prediction problems with UE4’s vehicle system (and in UE3 had to completely remove PhysX and replace with Bullet to do so)…

That would probably be QUITE a hefty bill for a network programmer? Which is why I’m surprised there’s no community efforts to work out these problems.

I don’t think it is possible to create a rollback system which can run on all type of projects. The word “General Purpose Rollback” is just sounds stupid to me. As long as you don’t follow extremely strict rule sets I really don’t believe it is possible to use a ‘General Purpose Rollback’ system. Rollbacks are complex and complicated and needs to be able to adapt into dynamic situations.

If you decide to follow those extremely strict rule-sets defined by the developer of any ‘general purpose rollback’ framework than you are restricting your power and freedom which is definitely going to be felt in your game play.

Unreal Engine has made certain choices. They chose to lock simulation to frame rate, not to a fixed simulation timestep. Because of that, they chose to use extrapolated entities, and not use determinism. And because of that, they also don’t use rollback. That’s core to the simulation and physics part of the Unreal Engine. If you need something else, then Unreal Engine’s physics and simulation is not for you.

You could write your own simulation and networking code. You could still use the Unreal reflection macros, to integrate with the base Unreal rendering bits and Actor. You’d have to either break compatibility with future upgrades (creating a merge problem,) or you turn off physics/collision for all the actors, and replace it with your own components. It’s a lot of work, but you’d have to do that work anyway to build your own engine, and if you do it on Unreal, you get all of the audio and video goodies without any extra effort.

That’s what the market has decided to provide. If you need something else, go forth and build it. If the demand really is there, you’ll make a fortune! But nobody’s going to build it for you.

I hadn’t mentioned general purpose rollback, that was another poster, and I’m honestly not sure what it has to do with the OP. I was specifically talking about GGPO since that is the most celebrated form of rollback for fighting games, it’s tried and tested, and has proven how strong it is (especially in the more recent updates that have been integrated in to released games, which allow the games to be playable from different countries/overseas without issues). Games like Street Fighter V tried to create their own type of rollback in UE4 and it’s well known to be one of the games of this generation with the worst online performance. GGPO would be a huge upgrade.

As mentioned in the subject of the thread as well as the OP, I’m surprised the community hasn’t come together for this at all. In nearly a year, there’s literally 0 information about it, no attempt to come together and solve the problems with determinism. No posts, videos, or discussion about it. Just… nothing.

I’m quite surprised with the responses here. The importance of rollback code is very well known for the genre, and has been discussed heavily, there’s articles about it, podcasts, videos of presentations at conventions. It has a very specific purpose (for fighting games).

It’s honestly confusing that rather than a discussion about it’s integration (as posted in the OP), the thread has led to a discussion about general purpose netcode (when GGPO not even intended to be general purpose), and discussion of rollback having game specific applications (when GPPO is literally intended to specifically be used in peer to peer fighting games). GGPO doesn’t need to be general purpose, and only needs to fit a single game-specific application of fighting games.

Fighting game devs have made AAA games in UE4, but they’re all lacking in the net code department. Developers who want strong net code have went with other engines for this genre. So getting GGPO working would be extremely useful for developers!

I can’t be the only one interested in this, can I? I mean, one of the most expensive tools on the marketplace that recently released was a fighting game package, and despite being expensive it’s already received a number of reviews, so it’s definitely selling well. A GGPO implementation would be incredible. I’m shocked the community isn’t working towards it?

How many people that buy packages end up making something worthwhile and shippable? I get that you’ve got interest in this but I think you are overestimating the UE4 fighting community.

People buy packages mostly because they can’t produce the needed asset themselves be it code, art, sound, or anything else, and to a lesser extent because they can’t be bothered with making something and they go for a already made solution. You don’t need to reinvent the wheel, that’s why we’re using already made engines and not writing our own, it does most of the stuff we need already. But I dare say gameplay is different animal, it is specific to each game even though it can be mostly similar between them. Good programmer will make the gameplay system by himself (or his team) and won’t buy an “Ultimate Your Genre Of Choice Maker” that is made god knows how and will most likely be a hindrance in the long run (if the system isn’t 100% on board with your gameplay needs you gonna do rewriting).

There is not that much people making fighting games, most of the guys/gals buying “fighting game engines” are probably not experienced programmers, small fraction of those will have networking in mind from the start of development, even less will get to the point of having a full game that can be played vs bots or on one system with 2 players. Amount of people that know that they have a need for proper rollback networking is pretty small and they will need good networking programmers for that job (as you said even AAA games have shit time with this). Good network programmers will either work at a game dev studio that can pay them, or they will make good money somewhere else.

To have a community made plugin, you need a critical mass of people that know they need different networking for fighting games and a good networking programmer that will pull it off.
Good luck, have fun.

I totally agree with this. In my previous job the studio I worked at decided to buy some ready made framework in order to release the game earlier than expected. They wanted me to make a research about it before they bought the licences. So I did. I told them; If we are going to stick within the limitations and capabilities of this “ready made” solution than we are all fine BUT if the design team has any interests on adding something extra than this is going to be one hell of a ride and probably going to make us miss our release date just because we have to deal with modifying a huge and totally alien code base which none of the developers have any familiarities with as no one else on the team ever used this framework/solution. They decided to buy it never the less. You know what happened? We had to modify the whole thing more than we developed gameplay mechanics just so that it fits into our needs.


What I am trying explain here is that;
Yeah, ready made solutions are great but as long as you stay within it’s rules and capabilities. That’s why I don’t like using them. If this is the case of a rollback system than hell no, I won’t use a ready made solution for such a dynamic and complex thing.

Agree, buying packs is a mixed bag of good and bad. Good for learning… But as building blocks its often better to search Community-Tools / YouTube for simpler working examples to get started. Then roll your own from there. This is especially true the more complicated a system is… So it applies equally to everything from multiplayer / networking to character-combat-systems to detailed environments. Overall, integrating other devs work at a high level is its own specialist skill, as there’s just so many ways to approach a problem in UE. This thread should be a TIP in a FAQ somewhere. But hey, good luck with that when Epic DGAF… :stuck_out_tongue:

@EmreBugday @Indorile @EntrpriseCustomr

Thanks for the replies!

I’m worried that my post is being misinterpreted, as the earlier responses were based upon “general purpose rollback”, and it seems the later replies are now about “pre-made frameworks”.

GGPO isn’t a framework, it’s just a middleware that (mostly) involves networking/inputs.

Heck, I’d be happy if anyone would be able to get GGPO working in the most basic implementation possible in UE4, just basic 2.5d movements and a single action input. There’s very few requirements/limitations as to what GGPO requires; those things are unfortunately just not the easiest to achieve in UE4 (such as being deterministic). You can view those requirements near the beginning of my link below.

If anyone would offer one that works well on the marketplace, I would grab it simply to see how they managed to get GGPO working in UE4.

On topic, I was expecting more a community effort to get things working. Many minds working together should be as capable of solving the problems as much as a single very experienced developer. Likewise, if one very experienced developer is able to pull it off, they could likely make a lot of money marketing their UE4 solution as AAA studios would likely even be interested!

It’s true that only actual fighting game players would be the ones looking for a rollback solution, but the players are certainly very aware! And the recent trend (using KI, Skullgirls, Power Rangers, and Riots new fighting game as examples) seems to be knowledgeable players becoming the ones to design the fighting games!

But yeah, I understand “pre made frameworks” have their own limits. GGPO is tested and proven, able to support games extremely well and not harshly limit them, and isn’t a framework as much as a middleware. It’s quite basic when you’re not trying to implement it to UE. Documentation for the dev guide visible here as example:…

I still don’t think you understand what you’re actually asking.

To do this, you would have to re-write the entire physics system of Unreal.
This means re-writing much of the code that deals with position, placement, movement, and collision.
This means re-writing much of the code that the editor depends on, as well as all the components for building actor blueprints, as well as all the components for dealing with BSP and static and skeletal geometry and the collision for it.

You’re asking someone to re-build half the game engine that represents thousands of man-years of effort, and then release it on the marketplace.

That’s actually not true. A quick cntl + f and typing “market” on page 1 of this thread and you’ll discover that you were the first person in this thread to mention marketplace, and my mentions of marketplace were in response to those comments.

You were also the first one to mention “general purpose rollback”, as that wasn’t something else I had ever mentioned either. I’m not sure if this is intentional or not, but it’s misrepresenting what I’ve said.

To repeat (again), I’ve been saying I was surprised there hasn’t been a community effort to solve these problems, and that I was surprised there’s been absolutely no mention of GGPO in nearly a year, as it’s something that would be useful for developers from indie to AAA.

The same solution would be useful beyond fighting games/getting GGPO implemented as well. You can see with all the threads regarding issues with physics/substepping, as well as the before mentioned problems with vehicle physics/client prediction in netcode, it would solve many problems beyond getting rollback implemented.

Shouldn’t that deserve some legitimacy in terms of a community effort?

It’s been brought to my attention that Omen of Sorrow actually managed to get GGPO working in UE4.

From what I can gather online, it seems they began with only a team of 4 (obviously not all programmers), building it for online multiplayer from the ground up, and had it working in a reasonable amount of time, without “breaking” UE4’s features.

I’m wondering how they were able to pull it off?

I found today this guy on twitter that says he’s got it working UE4 . Hopefully he talks about his method but as some of these guys said, it seems you would have to modify parts of the engine to fit the deterministic model. I personally don’t have enough confidence to do so successfully.

It looks like they’re using almost none of UE4 and are handling all of the character movement / physics by themselves, simply by looking at how their characters are behaving - similar to what other people have described. I’m also however very skeptical of the claims in that *particular *tweet; it’s impossible to have zero frames of input latency locally (the absolute minimum is of course, one frame, because you need one frame to perceive an actual difference), let alone down a network. The video capture is also simply too perfect to be between two different machines.