(2,1) where (0,0) is top left. It feels comfort.
Loved what was in the video, had no problems with the bloom
I completely agree. I’m just thinking whether I should make the player be able to play around with those values, just for the sake of fun
Just another video about Ruins of Revenge [Name might change]. I’ve now got help with a mapper / story creator
I was seriously thinking about making a thread in the “WIP” section, but I decided against it, because it’s only engine stuff I’m doing at the moment. When the first Items / Maps and Story parts are present, then I’ll make a thread.
But here is the video I was talking about
_Ezxj8Ji_Fs
I’m using Kryonet. The networking code features smooth networking (not only updating of positions), physics networking and safety from cheating.
merged topics :cranky:
Sorry… Didn’t think of that
Was trying to compile and hit some errors. The classpath was missing the tiled preprocessor jar so I simply downloaded and added it.
However, after fixing that I’m seeing errors in eclipse across the board around instantiation.
Example:
public class Master {
private final ObjectMap<String, JsonObject> entityTypePool = new ObjectMap<>();
private final String basePath;
Description Resource Path Location Type
Syntax error on token “<”, ? expected after this token Master.java /RuinsOfRevenge/src/org/matheusdev/ror line 39 Java Problem
Am I the only one getting these errors?
Your game is awesome. I love it. Can’t wait to play it.
My problem was resolved simply by downloading the latest version of eclipse. The version I was on would not compile with 1.7 even though I had the 1.7 JDK installed.
On to the next problem
I have the client connecting to the server successfully now. However, the connection is dropped after 5 seconds. Also it doesn’t seem that any keyboard commands are being accepted except F8 and Esc.
I don’t have a gamepad plugged in and am wondering if this is the problem. From what I can tell I’d say the connection is set to timeout quickly and no keyboard input is being sent to the server.
Ehh…
???
Any exception?
The game should actually work without gamepad…
I ruled out the gamepad as being the problem. I noticed that the server prints to the console that a connection was made. However, I don’t see the corresponding client connection being printed.
Console Output:
[SERVER]: Client /127.0.0.1:5351 connected.
ControllerPlayer initializing: [Entity]:
type: player
id: 10
connection: 10 pos: [23.0:25.0]
rot: 0.00000
vel: [0.0:0.0]
rot-vel: 0.00000
103:22 INFO: [kryonet] Connection 10 disconnected.
[SERVER]: Client null disconnected.
ControllerPlayer dying
Per clientconnector.java I would have expected to see this get dumped at some point:
public void connected(Connection connection) {
System.out.println("[CLIENT]: connected to " + connection.getRemoteAddressTCP());
}
Still debugging … I turned on trace level logging for kryonet on the client. It looks like it’s attempting to connect over and over again but using a different port each time.
00:11 INFO: [kryonet] Connection 1 connected: /127.0.0.1
[SERVER]: Client /127.0.0.1:4708 connected.
ControllerPlayer initializing: [Entity]:
type: player
id: 1
connection: 1 pos: [23.0:25.0]
rot: 0.00000
vel: [0.0:0.0]
rot-vel: 0.00000
00:23 INFO: [kryonet] Connection 1 disconnected.
[SERVER]: Client null disconnected.
ControllerPlayer dying
00:29 INFO: [kryonet] Connection 2 connected: /127.0.0.1
[SERVER]: Client /127.0.0.1:4713 connected.
ControllerPlayer initializing: [Entity]:
type: player
id: 2
connection: 2 pos: [23.0:25.0]
rot: 0.00000
vel: [0.0:0.0]
rot-vel: 0.00000
00:41 INFO: [kryonet] Connection 2 disconnected.
[SERVER]: Client null disconnected.
ControllerPlayer dying
41:06 INFO: [kryonet] Connection 3 connected: /127.0.0.1
[SERVER]: Client /127.0.0.1:4782 connected.
ControllerPlayer initializing: [Entity]:
type: player
id: 3
connection: 3 pos: [23.0:25.0]
rot: 0.00000
vel: [0.0:0.0]
rot-vel: 0.00000
41:18 INFO: [kryonet] Connection 3 disconnected.
[SERVER]: Client null disconnected.
ControllerPlayer dying
Strange… seems to be some settings issue. Have you searched inside the System’s settings? I don’t know… probably the process hasn’t got the permission do listen on ports?
I really have no idea…
I need to look into the source again, to find out, why there was that gamepad issue, can you post it? Wanted to have it optional, but…
Compiled using Intellij IDEA just to compare and hit the same problem.
Someone posted an issue for Kryonet in Feb. regarding a connection and immediate disconnection issue but there is no further discussion --> https://code.google.com/p/kryonet/issues/detail?id=32
I’m using Win 7 64 bit. I disabled the windows firewall. Here is the client side console output with tracing turned on:
Reading config.
00:00 TRACE: [kryo] Register class ID 14: org.matheusdev.ror.net.packages.CreateEntity (com.esotericsoftware.kryo.serializers.FieldSerializer)
00:00 TRACE: [kryo] Register class ID 15: org.matheusdev.ror.net.packages.EntityState (com.esotericsoftware.kryo.serializers.FieldSerializer)
00:00 TRACE: [kryo] Register class ID 16: org.matheusdev.ror.net.packages.NetPackage (com.esotericsoftware.kryo.serializers.FieldSerializer)
00:00 TRACE: [kryo] Register class ID 17: org.matheusdev.ror.net.packages.Input (com.esotericsoftware.kryo.serializers.FieldSerializer)
00:00 TRACE: [kryo] Register class ID 18: org.matheusdev.ror.net.packages.FetchEntities (com.esotericsoftware.kryo.serializers.FieldSerializer)
00:00 TRACE: [kryo] Register class ID 19: org.matheusdev.ror.net.packages.CreateEntity[] (com.esotericsoftware.kryo.serializers.DefaultArraySerializers$ObjectArraySerializer)
00:00 TRACE: [kryo] Register class ID 20: org.matheusdev.ror.net.packages.DeleteEntity (com.esotericsoftware.kryo.serializers.FieldSerializer)
00:00 TRACE: [kryonet] Client thread started.
00:00 INFO: Connecting: localhost/127.0.0.1:5455
00:00 DEBUG: [kryonet] Port 8510/TCP connected to: localhost/127.0.0.1:5455
00:00 TRACE: [kryo] Read class 9: com.esotericsoftware.kryonet.FrameworkMessage$RegisterTCP
00:00 TRACE: [kryo] Read field: connectionID (com.esotericsoftware.kryonet.FrameworkMessage$RegisterTCP)
00:00 TRACE: [kryo] Read int: 10
00:00 DEBUG: [kryo] Read: com.esotericsoftware.kryonet.FrameworkMessage$RegisterTCP
00:00 TRACE: [kryo] Object graph complete.
00:00 TRACE: [kryonet] Connection 10 received TCP: RegisterTCP
00:00 INFO: [kryonet] Connection 10 connected: localhost/127.0.0.1
00:00 TRACE: [kryonet] Connection listener added: org.matheusdev.ror.client.ClientConnector$1
00:00 TRACE: [kryonet] Client listener added.
On a side note regarding the gamepad. This is the console error I was getting:
Controllers: added manager for application, 1 managers active
Couldn’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.
Reading config.
00:00 TRACE: [kryo] Register class ID 14: org.matheusdev.ror.net.packages.CreateEntity (com.esotericsoftware.kryo.serializers.FieldSerializer)
00:00 TRACE: [kryo] Register class ID 15: org.matheusdev.ror.net.packages.EntityState (com.esotericsoftware.kryo.serializers.FieldSerializer)
00:00 TRACE: [kryo] Register class ID 16: org.matheusdev.ror.net.packages.NetPackage (com.esotericsoftware.kryo.serializers.FieldSerializer)
00:00 TRACE: [kryo] Register class ID 17: org.matheusdev.ror.net.packages.Input (com.esotericsoftware.kryo.serializers.FieldSerializer)
00:00 TRACE: [kryo] Register class ID 18: org.matheusdev.ror.net.packages.FetchEntities (com.esotericsoftware.kryo.serializers.FieldSerializer)
00:00 TRACE: [kryo] Register class ID 19: org.matheusdev.ror.net.packages.CreateEntity[] (com.esotericsoftware.kryo.serializers.DefaultArraySerializers$ObjectArraySerializer)
00:00 TRACE: [kryo] Register class ID 20: org.matheusdev.ror.net.packages.DeleteEntity (com.esotericsoftware.kryo.serializers.FieldSerializer)
00:00 TRACE: [kryonet] Client thread started.
00:00 INFO: Connecting: localhost/127.0.0.1:5455
00:00 DEBUG: [kryonet] Port 9124/TCP connected to: localhost/127.0.0.1:5455
00:00 TRACE: [kryo] Read class 9: com.esotericsoftware.kryonet.FrameworkMessage$RegisterTCP
00:00 TRACE: [kryo] Read field: connectionID (com.esotericsoftware.kryonet.FrameworkMessage$RegisterTCP)
00:00 TRACE: [kryo] Read: 6
00:00 DEBUG: [kryo] Read: com.esotericsoftware.kryonet.FrameworkMessage$RegisterTCP
00:00 TRACE: [kryo] Object graph complete.
00:00 TRACE: [kryonet] Connection 6 received TCP: RegisterTCP
00:00 INFO: [kryonet] Connection 6 connected: localhost/127.0.0.1
00:00 INFO: [kryonet] Connection 6 disconnected.
00:00 INFO: Connecting: localhost/127.0.0.1:5455
00:00 DEBUG: [kryonet] Port 9127/TCP connected to: localhost/127.0.0.1:5455
00:00 TRACE: [kryonet] Unable to update connection.
java.net.SocketException: Connection is closed.
at com.esotericsoftware.kryonet.TcpConnection.readObject(TcpConnection.java:100)
at com.esotericsoftware.kryonet.Client.update(Client.java:239)
at com.esotericsoftware.kryonet.Client.run(Client.java:317)
at java.lang.Thread.run(Unknown Source)
java.net.SocketTimeoutException: Connected, but timed out during TCP registration.
Note: Client#update must be called in a separate thread during connect.
at com.esotericsoftware.kryonet.Client.connect(Client.java:159)
at com.esotericsoftware.kryonet.Client.connect(Client.java:114)
at org.matheusdev.ror.client.ClientConnector.(ClientConnector.java:63)
at org.matheusdev.ror.client.ClientMaster.createConnection(ClientMaster.java:131)
at org.matheusdev.ror.client.ClientMaster.(ClientMaster.java:80)
at org.matheusdev.ror.screens.ScreenConnect.tryConnect(ScreenConnect.java:92)
at org.matheusdev.ror.screens.ScreenConnect.access$0(ScreenConnect.java:89)
at org.matheusdev.ror.screens.ScreenConnect$3.touchUp(ScreenConnect.java:70)
at com.badlogic.gdx.scenes.scene2d.InputListener.handle(InputListener.java:58)
at com.badlogic.gdx.scenes.scene2d.Stage.touchUp(Stage.java:317)
at org.matheusdev.ror.screens.AbstractScreen.touchUp(AbstractScreen.java:85)
at org.matheusdev.ror.RuinsOfRevenge.touchUp(RuinsOfRevenge.java:168)
at com.badlogic.gdx.backends.lwjgl.LwjglInput.processEvents(LwjglInput.java:297)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:186)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:110)
Saving up = W
Saving down = S
Saving left = A
Saving right = D
Saving debugDraw = F8
Saving escape = ESCAPE
Saving chat = ENTER
Config written.
AL lib: alc_cleanup: 1 device not closed
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 :).
Client#update() is called in a separate thread, the Kryonet updateThread (not handled through my code, see Kryonet’s code: Client#start())
So that shouldn’t be the issue…
I can’t reproduce