FPS Server with jME3?

I’m looking into writing a server for my FPS. I’m looking at some problems that need to be resolved:



  • Client communication - this can be done using SpiderMonkey afaik

  • Authorative Game World - the server has final say in hits, player placement/movement, etc.

  • Events - The server may trigger events, like timed explosions, drops, etc.

  • AI - The server may need to implement some (simple) AI for NPCs



Does anyone have experience with the above? My idea would be to create a headless server instance of my game, which uses jME3.

Can jME3 run in headless mode? Or are there other approaches that make more or better sense?

Yes, jME3 can run headless. Easiest solution is letting the server handle everything and just syncing the client geometries with some interpolation, you can also use client side physics for interpolation. Ofc a server running everything is quite the CPU hog, so most titles do some outsourcing to the clients.

I added a Wiki page to explain how to start a headless (server) version of a game: https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:intermediate:headlessserver

2 Likes

I just wonder why jme3 on the server at all?, my server only uses it for assetloading of meshes, but the rest is independet of it, as there is always a certain overhead you don’t always need.

EmpirePhoenix said:
I just wonder why jme3 on the server at all?, my server only uses it for assetloading of meshes, but the rest is independet of it, as there is always a certain overhead you don't always need.


True, but in my case the client and server share a lot of code (for single and multiplayer). Also, I can take advantage of jME3's collision detection and such on the server end.

As with everything, it's a design question. For some games this may be perfect, for others it's totally and utterly useless.