Serious fps networking

Its a realy time consuming task for a single developer or a small team of developers to build

a serious first person shooter network solution.



Due to this fact it’s the wrong way to answer to all fps network questions with:

read the tutorials and do it yourself.



Maybe it’s the right answar if you just want to make a game to play with your friends.

But if the game should be played by a large number of players, you will waste a

unnecessarily amount of time and end up with a product which is far away from

a usable solution.



To obtain a usable product in a reasonable time, you have to use a commercial

solution or a product which is developed by a large communnity. Since there is

no commercial fps network solution for java, at least I do not know such a solution,

remains only the last one.



The main features which such a fps network framework should have:



A server with a optimized version of the jme. Its necessary for cheat detection.

Cheat detection.

Low ping gameplay

Lag compensation

Network physics / Synchronized animations



Before this creates a misunderstanding, it’s not about that other people should do the job, but the fact that beyond a specific project size it no longer makes sense to do everything by yourself, therefore people use jme

or libraries.

And for those who thing this is too game specific for a community project, just think about the large number

of fps which could use it.

Yeah, definitely, we are working on bringing more out of the box functionality here but really, the basics are there and its a matter of a few classes to make a synchronized network server for any kind of game with jME and SpiderMonkey right now. We are also working on creating a PHP server for basic syncing (ofc no physics/jme server-side) and server manager for java and PHP servers.

If am understanding correctly you are asking for another layer on top of spidermonkey that handles generic FPS games kind of like how the halflife engine handles all mods and games released under it. I dont want to come across as a jerk but I am not understanding the logic flow here. Adding network code is too much for a small team of developers to add to a commercial product they want to market to many players. Somewhere down the line the requirements of your game may change as well as size of players and the said framework may not handle your growth or requirements. At the point you have to write a custom solution to not only support what you have already but to scale to fit your needs. Of course adding out of the box functionality is always a plus but if you are building a complicated game sometimes a simple solution (or going the easy route) will not work out for you in the long run.



TLDR; Idea of baseline framework per game good in short run, may not be so good in long run for your project.

1 Like

Somewhere down the line the requirements of your game may change as well as size of players and the said framework may not handle your growth or requirements. At the point you have to write a custom solution to not only support what you have already but to scale to fit your needs.



This depends on the design. A well designed solution can grow with your project.



The main points for such a solution are:



You need a server side version of the jme. Or to say it in other words, you server must be aware of the game world to have reasonable network physics like server side collision detection.

Maybe it would be easy to put just the whole jme to your server, but this would be most probable a realy slow solution.

To optimize this, a jme expert have to remove all the functions which are not needed server side.



The next srious problem for a small team or single developer is making such a solution solid.

Stress tests on a single machine are a good start, but could not replace tests with many

real player with different hardware and os.



Maybe this shows that a pure java solution is to slow. Then you need C++ experts for the core

of that solution.



All this could happen and even one of these points could be a intractable task or slow down the development in a way that it makes no sense to do this.

You just have to use the nullrenderer for the server application. Really, I dont know what kind of “time consuming task” you are talking about. Its literally less than 50 lines of code altogether to do a fps server with whats there and you have a solution fine-tuned to your game. You could have done it in the time you were writing these posts…

Like I was saying before, everything you listed is debatable on a per project/game basis. You are asking for basically asking for a complete half life source engine that has been fine tuned with jmonkey. Normen is correct that you can make a server in as little as 50 lines of code. Is it going to support 200 people per server that works to your liking right off the bat? Nope, but that is part of the process of being a game developer. I work in building pc simulations for a living and you are NEVER going to get what you are asking from a product right off the self. Eventually your requirements will require you to MOD the shit out of off the self product (which in some cases takes more time and effort than writing your own solution). I’m sorry if I am not really understanding what you are trying to get at. If you want help or ideas I am more than willing to point you in the right direction of writing a server either using your own networking API or spidermonkey.

Well i wrote my complete own networking solution so far. And while it is true, that it is much work and requires a lot of effort at least the result is not subquality(Tested so far 5000 moving network synchronized objects and 2 clients without no bottleneck so far and 5% server load). Because the more you learn about the underlying stuff the better you are able to optimize it for your game.