GameServer.java
and
GameClient.java
I’m not exactly sure if anyone here has Kryonet experience but my issue is that the
public void connected(Connection connection) {
for (int i = 0; i < 200; i++) {
if (!(cuboids[i][0] == 0 && cuboids[i][1] == 0
&& cuboids[i][2] == 0 && cuboids[i][3] == 0
&& cuboids[i][4] == 0 && cuboids[i][5] == 0)) {
sendCuboid(connection, cuboids[i][0], cuboids[i][1],
cuboids[i][2], cuboids[i][3], cuboids[i][4],
cuboids[i][5]);
}
}
System.out.println("Sent all cuboids present");
}
part of
GameServer.java
will run, however the packets it sends won’t be received by the connected client. I’m really baffled here because the "Sent all cuboids present"
string actually shows up in the console output
Thanks if anyone can explain a way around
EDIT: I’ve also tested with 3 clients through the following process;
[quote]Client #1 connects
Client #2 connects
Client #1 places a block
Client #2 and #1 can see it
Client #2 places a block
Client #1 and #2 can see it
Client #3 connects
Client #3 can’t see the two blocks placed
Client #3 places a block
Client #1, #2 and #3 can see it
[/quote]