Unity I still don't think is ideal for Multiplayer FPS games...

I think this is a big issue and I hope someone at Unity is thinking about or focusing on it. That being nothing ever made in Unity demonstrates that it is as capable of making a multiplayer FPS game as good as the Source Engine.

The best demonstration of Unity’s multiplayer FPS capability thus far I think is Offensive Combat, which is really good. But still, just load up Counter-Strike Source and run around for 5 minutes, shooting some players and it is plainly obvious that the Source Engine is still a huge leap and bound ahead of everything else in this department.

What I am talking about here is NOT graphics, and not even graphical performance. For all intensive purposes, we could be comparing games made with nothing but untextured blocks, capped at 30 fps. This has nothing to do with graphics.

Rather what I am referring to is the ‘feel’ of the weapons being shot, the ‘feel’ of the netcode, the ‘feel’ of walking and looking around. I put ‘feel’ in quotes because this is a somewhat elusive subject, and I don’t think everyone will be as sensitive to this to really notice. Only people who grew up playing Quake, and Half-Life based multiplayer games on the PC with mouse and keyboard are probably sensitive enough to this to really get what I am refferring to.

But what I am referring to is just, how tight does the aim feel? How tight do the controls feel? How in control and simultaneously smooth does everything feel? How smooth running and responsive is the netcode? When you shoot at a player, and you think it should of hit, and it looks like it should of hit, did it actually hit and register? To me only the Source engine seems to of perfected this. The experience of playing multiplayer and the feeling of the controls and net code is so transparent, even in fairly high-lag servers. Everything feels spot on in a multiplayer game. All players run smoothly, all shots that look like they should have registered did register. Your aim feels tightly bound to your mouse.

Unity games still don’t demonstrate as a refined feel in multiplayer FPS mechanics. And admittedly I don’t think any other engine does it as well as Source. Unreal engine still feels a bit off to me. Planetside 2 still feels off. So it isn’t just Unity, it’s something special about the source engine.

Valve stuck a handful of really smart guys on figuring out this problem full time. They put years of time and probably alot of money into R&D on how to get the exact perfect ‘feel’ in a multiplayer FPS game and it really shows, even to this day, I think it’s unmatched. Which is why I think Unity isn’t comparable in this regard, it is a hard thing to figure out. This is also why I feel no indie developer is ever going to have the time or resources to figure this out on there own. I really doubt any of us are going to spend a year or more deciphering how to get the perfect FPS game netcode.

Which is why I am saying, I hope someone at Unity has considered investigating this and putting R&D and resources into it. Unity really needs to come up with some stock netcode solutions to produce FPS games, and racing games, and generic ‘puzzling’ games with as good of a feel to them in multiplayer as the source engine. This aspect of game development is far too diffucult for any average indie developer to decipher perfectly. This really needs some top level engineers behind it I think.

What makes you think that this is an engine-level issue, rather than a failing on the part of game developers using Unity?

1 Like

It’s not an engine failing issue, it’s a the engine doesn’t come with it issue.

You could say any unity developer should just make their own netcode. But thats an extremely diffucult to create and perfect piece of highly resuable code. It is no small undertaking. In the least things should be set up for automated, or higher level ways of dealing with lag compensation and prediction on player objects and physics objects. Source engine has the lag compensation and prediction code wrapped in higher level functions to make proper implementation work easier, and it does alot of stuff behind the scenes you don’t have to deal with. In Unity at best we get is links to Valve’s white papers on how to do it ourselves from scratch… http://docs.unity3d.com/Documentation/Components/net-HighLevelOverview.html

Which is cool for alot of things, I mean we are game developers, we should develop. But my issue with this is, it’s a standard functionality of proper netcode, and it is extremely diffucult to do right. No one but a small handful of the most skilled are going to get anywhere close to doing it right. Which I don’t think anyone has even gotten to Source Engine’s level of quality on this single aspect, so really no one has got it perfectly right. This means very very few people, if no one (thus far), are going to be able to produce a multiplayer game with as good a feel as a Source Engine game. This is a very difficult thing to do, some people have devoted years of their careers to doing just proper netcode for games. I’m thinking Unity needs to get one of the netcode masters in there to put together some higher level functionalities for dealing with this stuff.

I mean the same thing could be said about writing shaders, or even implementing your own physics engine, it’s a failing of the developers. Yes, developers can make those things. But when something is as diffucult, is as resuable, is applicable to every game and is absolutely necessary for a proper experience, then it should be a function of the engine.

I admit I don’t understand half of what you are saying but I don’t think UT should put their focus on such a tapped market regardless. If developers should venture into it I hope for their sake they have enough skills and money to be able to solve the “feel” without the aid of UT.

Hundreds of people worked for multiple years in a row to make Source engine “perfect” for the type of games it was designed for - FPS. I don’t believe there is a comparable team of developers that used a comparable amount of time and resources to develop a Unity game.

What you’re talking about the feel and controls of the Source engine is also very subjective. I, for instance, don’t like Source engine, and I don’t want Unity to feel like one. There are engines that perform better in my opinion.

Also, Unity is not a FPS game creation tool. It can be used to develop hundreds of other genres and gameplays, and the Source controls and networking model just won’t work as a default solution for them all.

The feel of the game is not the engines responsibility, do you think unity should create more scripts for you to use? what part of game development do you think is your responsibility?

I’m not being sarcastic or anything, I am quite interested in hearing peoples opinion on this.

1 Like

I would like to first state, as I should have probably stated in the beginning of this thread, I am not familiar with writing intricate netcode at all, I’ve only done simple multiplayer setups. So whatever I say about netcode, I am talking far outside my area of expertise and may have the wrong idea completely.

With that said, if I had to break down what I am asking for into something more specific. It would be higher level functions to deal with network prediction, lag compensation and network interpolation. These things are generic, they are not specific to FPS, every kind of game can use them. Ideally there should be different models made to deal with different things, one model should be tuned to high accuracy, low speed movement, with lots of raycasting (FPS, fighting games, puzzle games, adventure games). Then there should be a model more suited to dealing with high speed objects (racing games, or whatever), I personally think such functions should be integrated into the ‘Network View’ object in some way, as just a flag to turn on or off.

But my understanding of everything that goes into multiplayer netcode is limited, as if it wasn’t, I would be programming, not complaining. So I do not know everything that is really necessary to make a multiplayer game feel smooth, highly accurate, and not quirky. But whatever those things are, there should be steps taken to make us not have to do it completely from scratch. State synchronization of Transforms or other things through the Network View seems completely useless because it doesn’t have any network prediction, lag compensation or interpolation built into it. Any proper network implementation could not rely on direct state synchronization because of that. Instead you have to create your own functions to send and receive data, and do all the prediction, compensation and interpolation yourself. It makes me wonder why does the state synchronization function even exist in the network view? Was it never intended to be used in realtime games?

Then the proper netcode for dealing with physics objects just seems way too much. I mean has anyone even done physics simulations synced over the network in Unity?

This entire thought came to my mind when I was discussing making an FPS game with another developer I know, he was keen on source engine, I suggested Unity. But when going over what it would take to get a Unity multiplayer experience as smooth and slick as what Source has, it became obvious that we could never actually achieve Source engine quality of netcode in Unity given the timeframes and resources we have. In Source engine it’s deeply integrated, and partially automated. A freshly created source mod with no additional code will automatically provide a proper lag compensated, network predicted, smoothly interpolated, non-jittery, accurate multiplayer experience. Replicating that in Unity is a large undertaking. I wouldn’t be surprised if it could take a quarter, to half, of all development time.

Devil_Inside, what engine do you think has better netcode than source engine?

Yep, because I use the same netcode for Poker, FPS and RTS…

Your logic appears to be faulty, you appear to be saying that since Source has a nice FPS Networking implementation that it’s somehow impossible for a comparable implementation to be done in Unity? I don’t follow.

If you’re trying to make it an issue of resources, then you must measure all costs. Just because Source may have an easier/better networking implementation doesn’t make it suitable for, say, iOS dev over Unity.

OK, well, sure, that’s true. But I’m not sure what value there is in talking about what is or is not ‘ideal’ then. Naturally any engine that includes all the technology you need is likely to be a better fit for your project than one that doesn’t - provided (and this is where tech like Source tends to fall down) that it’s flexible enough that you can just use that technology without having to work around a load of other assumptions. And there are many things that the engine doesn’t come with, not just netcode; is there any point in observing that Unity’s not ‘an ideal RTS engine’ because it doesn’t come with an automatic fog-of-war implementation, or that it’s not ‘an ideal tennis simulator engine’ because it doesn’t come with a spectator crowd manager component?

The term ‘netcode’ is a more all encompassing term, which in the context you reference, I was specifically referring to just network prediction, lag compensation and interpolation. While those three things are not useful for turn based games like poker. There are useful for both FPS and RTS games, sidescrolling games, racing games, real time puzzle games, many things. Any game where positions of objects need to be syncrhonized in real time. This is a generic need… You could use the same functions for prediction, compensation and interpolation in any of those games. In fact there are actually a couple scripts floating around that Unity put out to interpolate multiplayer RigidBodies and Transforms which I think many people have reused over and over for alot of stuff. But those scripts are pretty rudimentary.

And I’m not saying Source is more suitable for iOS dev over Unity. I’m saying these are generic needs, that every multiplayer game that has synchronized moving objects will use. Most engines have these things integrated into them, but Unity doesn’t. They literally point to the white papers of other engines on how to replicate what the other engines do. Look here at the bottom of this page: http://docs.unity3d.com/Documentation/Components/net-HighLevelOverview.html

I really see this as a core function of an engine, it makes or breaks someone ability to create good multiplayer game with it. I see it being comparable to occlusion culling, or lightmap baking, or physics engines. Among the major game engines, when it comes to prediction and lag compensation, it’s only Unity that references white papers and says, do it all yourself.

Those examples are way to specific. I think a more comparable example would be, Is Unity not an ideal tennis simulator if it doesn’t come with a physics engine integrated into it? I would say yes. Or actually even more applicable, Is Unity not an ideal engine for real-time multiplayer games that rely on physics because theres no built in function for getting the state of a high speed physically simulated object to be accurately represented on all devices? I would say yes as well, I would be very hesitant to agree to make a high-speed multiplayer ping pong game in Unity. Getting that ball accurately synchronized on all devices under high speed gameplay is going to be quite a task.

What I refer to when I say network prediction, lag compensation and interpolation are very generic functions, that can be used in any multiplayer game, of any kind. These are not game specific functions. There may be certain aspects of these functions that can be more accurately tuned to better suiting men walking around a field, or a car going 200 mph. But it would still be the same core algorithm behind it.

What you need, and how you achieve it can vary greatly between game types. For example, contrary to what you posted I wouldn’t consider network prediction an important part of most RTS games.

Not really. You can have generic functions that work in a large range of scenario’s, but that’s just clever writing for common use-cases. For example, I doubt most generic interpolation functions would work well in a game with heavy use of teleportation.

As above, nope. Different games can work in different ways.

Okay, I’ve got a game concept that needs 1,000 players in a single room all fighting each other. I’ve got another concept that needs 10,000 players in poker games on a single server. I need a MMO that uses P2P concepts to reduce hosting cost. Oh, and did I forget that I need a slow turn-based MMO that has a million users that must persist indefinitely.

Now, I know I can do all of the above with Unity… how would the inbuilt source networking handle it?

Agreed, but it could still be applicable to RTS’s for certain things.

I’m sure in any game that teleports, they would turn off interpolation before entering a teleport, and turn it back on after exiting. Generic functions could still be used for this. It could be implemented in such a way to give you that amount of control.

I don’t understand why your so adversarial to this. Do you not consider lag compensation, network prediction and interpolation to be common networking needs? Or do you just think it would be too diffucult to produce a solution that would be highly reusable in alot of different games? I am not trying to be adversarial here or put Unity down in comparison to Source, I really don’t understand why these things aren’t integrated into the Unity engine, it seems like they should be, like it’s just something they haven’t gotten around to doing.

The way I envision this myself is really just a more robust ‘State Synchronization’ function on the Network View. Where instead of just synchronizing the state of a Transfom via full authority of the server, it would synchronize the state with some prediction, lag compensation and interpolation functions. I can see this being useful in many different things. I don’t know how it would pan out in MMO’s, but I don’t think the standard Unity networking system supports MMO’s in the first place. Most Unity games that have realtime multiplayer are client-server setups with 4 to 16 players, and I think such a function could be made to be highly useful and reusable.

Which would give terrible results in the situation I outlined.

Because I’m making a point. Take a look at the scenario’s I outlined and explain how you would do it with the source inbuilt networking. Then I’ll explain the point.

Well you wouldn’t do anything with MMO’s with the Source built-in networking, it maxes out at 64 players.

I also believe Unity’s own built-in networking reaches its limits around the same amount of players. Most people go to photon or something else for MMO’s in unity. MMO’s are a completely different thing.

But my desires for more built in networking functions in Unity isn’t for MMO’s, its for client server setups with 20 or so players.

So many assumptions, so much entitlement.

Unity is not an FPS game/engine turned free for modders. It’s a generic framework that allows you to
make everything between single screen iOS apps and scalable MMORPGs.

I would love to have the features you mention pre-made, but I don’t think it’s a shortcoming of Unity,
I simply think the right asset hasn’t been made yet (there is one that does exactly this in the works
http://forum.unity3d.com/threads/144555-Announce-FPS-Networking-Kit ).

Anyway if you want to understand the difference, just look at how many different types of games have
been made with Source (or UDK or CE for that matter). Then you will understand how specific your needs are.

But wait a second, haven’t you been telling me how generic and wonderful it is?

The point here is scope. The source engine apparently has a really nice FPS implementation - that’s generic enough to work for most scenario’s that fall within that scope. However that’s the limit of it’s use - it can’t make MMO’s, it can’t handle thousands of games a server, it can’t handle thousands of units per game etc.*

Unity takes the different view. It doesn’t give you a ready made networking solution - beyond a very basic set-up. What it does is it gives you the tools to make your own better one. With this system, there’s a higher upfront cost for the developer, but far more flexibility and power in the long run. If you think that a source-esque networking solution is warranted, then I suggest you make it and sell it :slight_smile:

  • These are rough assumptions based on normal limitations of the described networking.

Well that sounds like it would be it. Thank you.

I understand what your all saying and where your coming from, I don’t necessarily disagree. I do agree it is ideal to keep Unity as open ended as possible, with just underlying components available, putting it on the devs to do the specific works.

But I differ in that I do think it could be possible to write a bit of top-quality netcode that can cover these things in a 4-64 player multiplayer game:
-Walking around
-Shooting
-Driving vehicles
-Flying vehicles
-Physics Objects bouncing around
-Syncing of alot of objects moving around (like 100 to 200)

And if you go down the list of Unity Games released with multiplayer, this would cover like over 80% of them ( estimated statistic of course, but it is by far the majority ) .

There is a void there that can be filled. Now this could come in as an asset store bundle, and a handful of C# scripts, and probably will if Unity doesn’t do anything. I have been implying that unity should tackle the problem themselves. Thats because I think with lack of this void filled, the multiplayer experience of all unity games generally comes down a notch across the board, it gives the entire engine a reputation of not being as good on the web as other engines. I don’t see how Unity’s AAA initiative can come to pass if they ignore this aspect of games. The word Unity should imply a certain standard of Multiplayer experience the same way that other engines do.

Excellent - this is exactly what I’ve been trying to achieve :slight_smile: It’s not a matter of magic networking, but a certain well designed solution that’s reusable and covers many use cases.

I certainly understand your POV… problem is Unity is pretty weak in most area’s… Terrain Generation, GUI, 2D, Networking etc. are all pretty poor. In my own experience even Unity’s physics isn’t particularly well done - and I’ve had to reimplement it on occasion.

I treat Unity as a cross-platform renderer and mono installation… anything else is a nice bonus.