Questions tagged [kryonet]

TCP and UDP client/server library for Java

KryoNet is a Java library that provides a clean and simple API for efficient TCP and UDP client/server network communication using NIO. It runs on both the desktop and on Android. It is very efficient, so is especially good for games. KryoNet can also be useful for inter-process communication.

KryoNet makes the assumptions that it will only be used for client/server architectures and that KryoNet will be used on both sides of the network.

The following resources are available for KryoNet:

151 questions
0
votes
1 answer

Issue with delta time server-side

How can I make server-side game run the same on every machine, because when I use server's delta time it works different on every computer/phone. Would something called 'fixed timestep' help me ?
IgnasR
  • 172
  • 3
  • 10
0
votes
1 answer

Can't connect Android to desktop server

I'm developing a game using libGdx and Kryonet and I'm currently working on the server <-> android connection. First I run the server on a computer, and if I run two instances of the program on the same computer (so the IP will be the local IP:…
Evenilink
  • 85
  • 1
  • 10
0
votes
1 answer

How to check for specific servers to connect to through Kryonet LAN search?

I'm making a game using Slick2D for game-logic and Kryonet for networking. The game can be played in 2-player multiplayer through LAN, where one player is the host-server and the other player is a client that receives information on what to render.…
gurdingering
  • 207
  • 5
  • 12
0
votes
1 answer

Sending object over Kryonet causes crash

I'm trying to send objects using Kryonet. For most objects it works fine, but for my own Vector implementation it crashes. The class is registered on both sides. It contains an empty constructor and all variables are decalred as public. public…
Geosearchef
  • 600
  • 1
  • 5
  • 22
0
votes
1 answer

KryoNet - Sending packets to Android clients

I am developing an Android app which has to connect clients to my server for sending/receiving different sort of packets. To achieve that, I am using the KryoNet library. My clients connect themself to the server and send their own packets…
David B.
  • 81
  • 2
  • 9
0
votes
1 answer

Kryonet RMI, cannot wait for response on connection's update thread

I would like to make a game using LibGDX and Kryonet library, using RMI. So I created clean project. What I want to do for now is, setup server to listen on port 10048 and on new connection to print client's name which will I get by calling a method…
clzola
  • 1,925
  • 3
  • 30
  • 49
0
votes
1 answer

Can I use KyroNet to handle minecraft packets?

Can Kryonet be used to manage minecraft packets? I assume not, because my listener only fires UP the connected, and 'disconnected' methods, not the 'received' method which should be getting used to handle the packets: public void…
Neil Derno
  • 77
  • 2
  • 13
0
votes
1 answer

Java KryoNet BufferUnderflow

I am having a very odd issue with the latest version of KryoNet. I'm sending a very simple packet from my client and my server, and getting the buffer underflow exception. I have 4 other registered packets, all of which work flawlessly. The packet…
SirTrashyton
  • 173
  • 2
  • 3
  • 12
0
votes
1 answer

Kryonet - double incoming packets

Okay. I am receiving packet once, but it's block is fired twice. For example: I have a block like this: if (object instanceof InitTheGame) { System.out.println("STARTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT"); …
user5064340
0
votes
0 answers

Kryonet - connecting from the same IP address (different LAN addresses)

Let's say that I have my TCP server in Germany. When I try to connect from two mobile phones from Poland in the same LAN network (they have different ip's here): 192.168.1.8 and 192.168.1.14 It disconnects previous device. They both have the same…
user5064340
0
votes
1 answer

Java Kryonet Error when sending object

I am using Kryonet for TCP sending of objects, particularly one called TransferMessage: public static class TransferMessage{String text; String username; Color color = Color.black;} Now, I know that I have to call…
Andrew Lalis
  • 894
  • 3
  • 15
  • 26
0
votes
2 answers

Java System.out.println() affecting program flow

I am working on a server/client based game using the KryoNet java library as well as slick. When the server class receives a connection from a client, it sends necessary startup information to the client, including what player number it is. One…
htuy42
  • 307
  • 3
  • 10
0
votes
1 answer

In kryonet, how do I disconnect from a server without stopping my program?

I am trying to make a simple TCP chat program, and I want the user to be able to start the program, then be able to enter a specific ip to connect to, and then disconnect from that specific server, and then connect to another after that. I know…
Andrew Lalis
  • 894
  • 3
  • 15
  • 26
0
votes
0 answers

Java adding to lists

I am trying to make a simple TCP chat program, and when the user sends the message "/list", I want to reply from the server with a list of all online users. else if (cmd.text.equals("/list")){ //Sends the client a list of all registered…
Andrew Lalis
  • 894
  • 3
  • 15
  • 26
0
votes
1 answer

Comparing value of transmitted objects

I am trying to make a simple irc server and client, and I am trying to find a way to have the server respond differently to certain messages sent to it. I am using the kryonet api for networking. Here is my listener: public void…
Andrew Lalis
  • 894
  • 3
  • 15
  • 26