Is it possible to use SpiderMonkey in a non-JME project?

As I mentioned in this thread, I am making a computer port of a popular board game. I would like to, if possible, use SpiderMonkey as the networking layer for it. I also intend for there to be two clients that use the same networking protocol: a 3D JME client, and a Swing 2D client for later. As such, I need to determine if JME’s SpiderMonkey networking libraries can be used in the Swing 2D client without bringing the rest of JME in. If possible, it would be best to just add the jme-networking jar to the classpath (along with my message classes and such of course), but, I suspect that there are default serializes for several JME types. If so, what is the best way to do this and would it just be easier to write my own networking protocol then to remove all of the JME dependencies from SpiderMonkey?

It depends from jme3-core.

I would like to know from someone who regularly develops SpiderMonkey if it is just a few serializer registration lines that I can remove before recompiling or if it is deeply integrated. If so, then I can just use my modified version for both the JME and non-JME versions as I don’t intend to send any JME classes.

EDIT: The only reference to any sort of jme code is in this file which registers a serializer for Vector3f. I’ll probably download the code later and attempt to recompile it without jme code after removing that usage. Any feedback from a SpiderMonkey developer, however, would be useful.

The only dependency of spidermonkey to jme3-core is the registration of Vector3f.
I simply created a dummy Vector3f class and am using spidermonkey without core for my card game.

1 Like

If you want a similar framework but don’t want any dependencies on JME you could have a look at KryoNet

Note: you can also include the jme3-core jar in your dependencies and just not use any of it. It causes no harm other than a few extra bytes (1.4 meg). I mean, I guess it could be significant but usually that’s smaller than a handful of textures or one music file, etc…

Similar as a commodity but not similar in usage, etc… SpiderMonkey diverged pretty dramatically a looong time ago.

But yeah, in the “plug this widget in for that” without any prior learning or whatever then it does serve the same role.

That shows I’ve not used SpiderMonkey for a while :smiley: