How to Structure a Multiplayer-Game

Hello Jmonkey-Community,



I am a Fun-Developert with i think quite good knowledge of coding php, c#, java, c++, c and so on… :slight_smile:



Some years ago, i did a little RTS Multiplayer game in C++ with an 3D-Engine named Irrlicht, for Sound Irrklang and for Network Raknet.

But now i want to to a little Game in Java, thats why i found the jmonkeyengine 3 :slight_smile:



I read the tutorials and think i understood the concept how the engine is working, not so hard :slight_smile: but what i didn’t learned in the Tutorials is how to Structure a game in a way that is quite usefull.

With that i mean, in the Tutorials there is always just one File doing all the Job in one Class, but how the jmonkeyengine is thought to act with a complex structure of classes. I

How do u structure your Games in “Code”, like this example:



CameraClass

Mainclass

Networkclass

playerclass

and so on.



I never did a “big” project in java. And I think its simple to do a good structure, but i do not really know how.

Perphaps someone, got an “Empty-Project” or something like that, to help me finding a good concept, how to structure alle the classes and how to interact with them with the jmonkeyengine.





Thanx a lot for all you help :slight_smile:



greetings xasz

The overall example here is MonkeyZone:

https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:advanced:monkey_zone



I personally think it’s too much at once looking at this whole game but you should give it a try.

For the future some templates for common game types are planned (I am currently giving one a try (Although I don’t know if my work will reach the neccessary qualitiy^^))