On a side note regarding the gamepad. This is the console error I was getting:Controllers: added manager for application, 1 managers activeCouldn't find controller for name "..."

It may be a non issue though, I just noticed it was red in the console due to the print statement used.

Oh, well, yes, that's how it should be It's pretty bad designed right now (with those "...")I set "..." as the default value, so that that shows up in the settings ^^

Anyways, regarding the connection issue:Eh... seems like everything is fine (when I read what the Traces say)... There seems to be no disconnection...This is what the Server prints (I think...), what does the client Print?

Very cool that you are interested in my coding, would be cool if we could somehow get in contact. Skype? Anything?

Not trying to be spammy, just posting debugging progression here in case other users hit a similar issue. I have the stack trace printing to the console during the client connect. Note the bolded lines below. I'll do some more digging any hopefully find the root issue.

Bummer, still stuck. I've been reading the Kryonet discussion group and some other users indicated having issues on the latest kryonet build. I've tried 3 or 4 different versions though and none seem to change anything.

If anyone else pulls down and connects successfully let me know . Inserting breakpoints into this project hasn't seemed to help me debug. Next step would be to insert breakpoints into kryonet code and recompile it from source, but not sure I have the energy to tackle that .

Any chance you could try reuploading to github? If you look at the .classpath file you'll see that it's pointing to .jars in a path where they don't exist. I'm wondering if the .classpath is out of sync then maybe there is something else out of sync in github vs. your local pc. Just a random thought since I'm out of ideas

Any chance you could try reuploading to github? If you look at the .classpath file you'll see that it's pointing to .jars in a path where they don't exist. I'm wondering if the .classpath is out of sync then maybe there is something else out of sync in github vs. your local pc. Just a random thought since I'm out of ideas

The problem is, that .classpath is not anymore 'maintained' by me... I'm now using intellij, but yeah, I could try to start up with eclipse again and fix the .classpath

How do you change the drawing order as shown at 0:16 in your video? Also how are you doing collision detection it seems very good and I was thinking maybe I could incorporate something like it into my game

How do you change the drawing order as shown at 0:16 in your video? Also how are you doing collision detection it seems very good and I was thinking maybe I could incorporate something like it into my game

1. Very easy. I have my entities, and do y-sorting: I sort them and then render them.Also take a look at 'Entity'This is very easy if you want to sort entities. But if you want to draw a Tiled map Bush once in front and once behind the player, that's harder... It took me some time (A great amount of time actually) to figure it out...

2. Very hard. It's LibGDX's port of Box2D, but it's really hard to get rotation, movement, scaling and everything else working. Really hard...Also, you need to define (rather complex) shapes for some kinds of Entities. For now there are almost only circles, but take a truck for example. You'd need lots of vertices... Also you need to brake the truck up into several convex Polygons and additionally be sure, that the convex polygons don't have more than 8 vertices.I'd say it's not really worth it. I already thought about moving back to my own collision system: A simple one. No physics. I don't even really need them...But when they're already there, why not leave them How I render an Entity (this could be VERY useful code. It took me ages. AGES.)How I save entities as Javascript-JSON. (take a look at 'body' and 'fixtures'. Those describe the Box2D Body)And finally look how I create fixtures and bodies from the .json

Thanks for taking the time to update github with the correct .classpath for eclipse. Unfortunately, I'm still having trouble getting the connect to work. I'm determined to resolve the problem at this point so I'll post details in the event it helps others.

1) I can compile and connect the kryonet examples on my local pc (and use the same ports as used for ror).2) I can compile and run the ror server and ror client with no issue. After clicking connect the map loads and I actually see the character entity created (but he is unable to move). Enter, F8 and esc keys are accepted as those see to be client side only.3) From what I can tell ClientConnector.java has a few overriden methods and I see that the received method gets called but the connected method is never reached. I know this because you have a print statement that would get output to the console if it was reached. I don't know kryonet very well but I would have thought that connected should execute before received?4) I looked into one possible solution on the kryonet discussion group but it didn't seem to work --> https://groups.google.com/forum/?fromgroups=#!topic/kryonet-users/QTHiVmqljgE

I've been trying to insert some various sleeps on threads to help pinpoint the problem but no luck. My prior post regarding a TCP registration error seems to no longer be a problem (it was a side effect of debugging code I had in place). I'm currently trying to break down the timing of the connect and update thread to see if somehow data is being sent before the connection is established.

I confirmed that queue.add(runnable) keeps getting called over and over. I assume on a normal connect this should just get called a single time. I added "System.out.println(queue.peek());" just before queue.add to see what was happening and got a dump like:

This seems to indicate that not only is the list getting added to multiple times (from a single connection attempt) but that occasionally the list is emptied and results in those null lines. In other words a listener is added, something happens and it gets removed from the list, next time through we see a null line, and then the next time a new listener is created. It seems to go on like this indefinitely.

Hopefully I'm on the right track now. I am curious if anyone else running this demo were to insert this line if they would see the same output.

Thanks for taking the time to update github with the correct .classpath for eclipse. Unfortunately, I'm still having trouble getting the connect to work. I'm determined to resolve the problem at this point so I'll post details in the event it helps others.

1) I can compile and connect the kryonet examples on my local pc (and use the same ports as used for ror).2) I can compile and run the ror server and ror client with no issue. After clicking connect the map loads and I actually see the character entity created (but he is unable to move). Enter, F8 and esc keys are accepted as those see to be client side only.3) From what I can tell ClientConnector.java has a few overriden methods and I see that the received method gets called but the connected method is never reached. I know this because you have a print statement that would get output to the console if it was reached. I don't know kryonet very well but I would have thought that connected should execute before received?4) I looked into one possible solution on the kryonet discussion group but it didn't seem to work --> https://groups.google.com/forum/?fromgroups=#!topic/kryonet-users/QTHiVmqljgE

I've been trying to insert some various sleeps on threads to help pinpoint the problem but no luck. My prior post regarding a TCP registration error seems to no longer be a problem (it was a side effect of debugging code I had in place). I'm currently trying to break down the timing of the connect and update thread to see if somehow data is being sent before the connection is established.

2) I can compile and run the ror server and ror client with no issue. After clicking connect the map loads and I actually see the character entity created (but he is unable to move). Enter, F8 and esc keys are accepted as those see to be client side only.

Yes. Enter, F8 and Esc are client side. Walking isn't client side, because the input from the client goes to the server and then travels back to the client, where it is 'allowed' to be processed. Additionally (if the server would send anything) it would correct the player's position, but actually this has nothing to do with your issues...

3) From what I can tell ClientConnector.java has a few overriden methods and I see that the received method gets called but the connected method is never reached. I know this because you have a print statement that would get output to the console if it was reached. I don't know kryonet very well but I would have thought that connected should execute before received?

It's normal behavior that connected is never called.Try to start a server and connect a client, let's call it client A, and connected another client B. In A's Console you'll see the debugging output about client B connecting to the server.

So you actually receive messages, but you still can't walk? Or do anything? What happens if you connect two clients?

I could reproduce once... only once... when I was debugging somehow (through breakpoints and stepping), but I couldn't reproduce anymore. And I don't even remember what exactly I did.The problem with debugging is, that the connection code depends a lot on timeouts and locks and stuff... So if you step through the code, simply by waiting to long on one instruction you could break a lock (for example the TCP registration lock, which waits 'only' 100 ms).But I have no Idea what one could do instead...

I've been trying to insert some various sleeps on threads to help pinpoint the problem but no luck. My prior post regarding a TCP registration error seems to no longer be a problem (it was a side effect of debugging code I had in place). I'm currently trying to break down the timing of the connect and update thread to see if somehow data is being sent before the connection is established.

Same as above: client A's connect is only called when another client B connects to the server, to which client A is connected to.

[snip...]I confirmed that queue.add(runnable) keeps getting called over and over. I assume on a normal connect this should just get called a single time. I added "System.out.println(queue.peek());" just before queue.add to see what was happening and got a dump like:

Totally normal behavior, I'm sorry... What the queued listener does is: It takes the listener to which it should redirect to as an argument, and delivers Runnables which call the appropriate Listener's methods (receive, connect, disconnect, etc.). For that I have to give a method for queueing those Runnables. (The 'queue' method).

The reason for that is that I can call and process those Messages in my main loop then (tick method of ClientConnector). There it polls all the Runnables and processes them in the current thread.

[snip...]This seems to indicate that not only is the list getting added to multiple times (from a single connection attempt) but that occasionally the list is emptied and results in those null lines. In other words a listener is added, something happens and it gets removed from the list, next time through we see a null line, and then the next time a new listener is created. It seems to go on like this indefinitely.

Hopefully I'm on the right track now. I am curious if anyone else running this demo were to insert this line if they would see the same output.

Messages come to the client -> multiple times Runnables for processing the messages come in.The list is emptied, because the Client's main loop polls out all the runnables It's not fast enough sometimes, though, that's why it doesn't print null sometimes...</edit>

I was curious to see if I could get this working. I deleted the project and downloaded the latest from github and it worked! I'm not sure what has changed since the last build (if anything) but for some reason it seems good now. I was able to start the server and connect multiple clients and see them update on both sides.

A couple things I noticed (which I'm sure you already know about)1) Once you hit enter and type in a chat message, you lose the ability to regain focus and move your character around again2) The entered chat message doesn't seem to go anywhere3) Entering a chat message causes your character to disappear to the other connected client4) Entering a chat message causes the other connected client to no longer be able to move

I really appreciate the overall direction of this project, including the way you have your code organized. Now that I have a build running I'll also see what I can do to contribute.

Nice you want to contribute, I really find that extremely cool Hopefully I'll find time (and will) to continue working on it, I'd love to collaborate

Currently I'm having a day job, so I don't have that much time (willpower reduced as well...).I still need to train myself to one of those persons who can have a programming hobby next to a programming job...

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org