Best practices for jMonkey networking

Networking is a broad subject that would take more than this chapter to cover in full detail. Since you can learn Java networking from the official Java tutorials, let's focus on jMonkeyEngine-specific networking advice here in this appendix.

What do the client and server do?

This is a common question asked by developers who design their first network game: How do I best separate the code between client and server?

In general, the server generates game events, such as a swarm of enemy NPCs spawning, random encounters, or quest masters handing out missions. To keep track of the game world, the server centrally maintains all data about objects and characters—these are your game entities. If the game uses JME physics, ...

Get jMonkeyEngine 3.0 Beginner's Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.