Monkeyzone Networking sample

Hi there. I am new to JME3 and am trying to run the Monkeyzone example mentioned on Monkey Zone: Multi-player Sample Project :: jMonkeyEngine Docs

Unfortunately I am ending up with compile errors. So I had to get my hands dirty, and while doing so I am setting up a Maven project. The artifacts I include contain the examples from Maven Artifacts :: jMonkeyEngine Docs. I got pretty far, but there is a class that I simply cannot locate:

com.jme3.niftygui.NiftyJmeDisplay

My project already contains

    <dependencies>
        <dependency>
            <groupId>${jme3_g}</groupId>
            <artifactId>jme3-core</artifactId>
            <version>${jme3_v}</version>
        </dependency>
        <dependency>
            <groupId>${jme3_g}</groupId>
            <artifactId>jme3-desktop</artifactId>
            <version>${jme3_v}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>${jme3_g}</groupId>
            <artifactId>jme3-lwjgl</artifactId>
            <version>${jme3_v}</version>
        </dependency>
        <!-- https://jmaven.com/maven/net.sf.sociaal/jME3-jbullet --> 
        <dependency>
            <groupId>net.sf.sociaal</groupId>
            <artifactId>jME3-jbullet</artifactId>
            <version>3.0.0.20130526</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/com.github.nifty-gui/nifty -->
        <dependency>
            <groupId>com.github.nifty-gui</groupId>
            <artifactId>nifty</artifactId>
            <version>1.4.3</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.jmonkeyengine/jme3-networking -->
        <dependency>
            <groupId>org.jmonkeyengine</groupId>
            <artifactId>jme3-networking</artifactId>
            <version>3.5.0-stable</version>
        </dependency>
    </dependencies>

Which artifact do I have to have as dependency so the class will be found?

1 Like

There are better networking examples to start from, especially if you intend to do real time networking.

There are a variety of levels of networking examples in that directory. The sim-eth-* examples are actual full-blown real time network sync examples using SimEthereal. If you are into entity-component-systems then sim-eth-es is also using the Zay-ES ECS library.

sim-eth-basic is a regular “game object” version of the same simple game. Basically a 3D networked space shooter without any shooting.

1 Like

That class should be in <artifactId>jme3-niftygui</artifactId>. Good luck!

Regarding the better networking examples: I will take a look at Simsilica.

I am also wondering about three options of networking in JME, and when to pick which:
Spidermonkey
SimEthereal
Netty

Thank you. That could probably have helped. Meanwhile I got the MonkeyZone out of the box running.
Actually all I had to do was:

  • add the missing libraries already contained in the JME setup
  • improve the logged error when connecting to the server did not work

The first part made the demo compilable at all.
The second one would tell me what connection attempt failed. When I saw 127.0.0.1 in the logs I understood that I had to run the server myself.

1 Like

SimEthereal is real-time object synching on top of SpiderMonkey.

Also, Zay-ES’s built in networking is also on top of SpiderMonkey.

Overview on SimEthereal:

Which has this picture:

2 Likes