Network libraries

Alright, I’ve started learning game programming a couple of months ago and was (and still) doing somewhat good, but I’ve decided to take it to another level by making the game multiplayer. With previous experience in network and web programming in Java and C, I have no networking questions but one: Why can’t I import the “new” libraries, but can only use the “old” ones ? com.jme3.network.HostedConnection doesn’t seem to exist for me. My jMonkeyPlatform is updated (basically the first thing I’ve checked). Also

[java] Client client = new Client( host, port );



…becomes…



Client client = Network.connectToServer( host, port ); [/java]

I can’t see “Network” as a class at all.



Thanks in advance,



Mercurialol

It sounds like you are not running the latest version… maybe just plain alpha 4 or something. You say you are updated but then the com.jme3.network.Network class should be in the jar with everything else (you could check by looking in the jar).



And I assume you have imported the right package, etc… (com.jme3.network)



Are you doing this from JMP or some other IDE?

JMP IDE, yes.

About says:

[java]

Product Version: jMonkeyPlatform Alpha-4

Java: 1.7.0; Java HotSpot™ Server VM 21.0-b17

System: Windows 7 version 6.1 running on x86; Cp1252; en_US (jmonkeyplatform)

User directory: …[/java]

I’m not sure what you mean by “plain alpha 4”, like unupdated alpha 4?

he means you most probably haven’t updated to the nightly version of jmp. Tools → Plugins → Settings → Update nightly (or similar)

Yeah, what @wezrule says. Alpha 4 is pretty old at this point and I no longer remember exactly when I added the new networking stuff. Seems like it was after alpha 4 from the issue you are having.

Oh yeah, that was the issue. Thanks fellas, it’s all good now.



So… What exactly is updated by clicking on Help → Check for updates ?

This fixed my problem too, perhaps it would be nice to suggest this somewhere? (i.e. that people should enable JME3 nightly builds)

You mean like the big fat hint when you start the IDE for the first time? Or the separate entry in the manual about updating? Doesn’t work, there will always be a guy who says “you should have written it on a post-it on my fridge at home”. :stuck_out_tongue:

1 Like
normen said:
You mean like the big fat hint when you start the IDE for the first time? Or the separate entry in the manual about updating? Doesn't work, there will always be a guy who says "you should have written it on a post-it on my fridge at home". :P


Yeah well, I never read hints and I would never really read the manual either.
Why isn't it just enabled by default, or why aren't there more frequent updates?
weeknie said:
Yeah well, I never read hints and I would never really read the manual either.
Why isn't it just enabled by default, or why aren't there more frequent updates?

So why you suggest writing it down somewhere anyway?
The first question is answered in the manual as well, the frequency of the updates is dependent on the level of compatibility of the current nightly changes.