Questions tagged [kryonet]
TCP and UDP client/server library for Java
152
questions
2
votes
1
answer
68
views
libgdx throws error on spritebatch creation
If I change the screen like this it works.
button.addListener(new ClickListener() {
@Override
public void clicked(InputEvent event, float x, float y) {
...
0
votes
1
answer
100
views
Kryonet desirialization issue with Hibernate Entities
I hope that someone might have had this or a similar problem before and could help me :)
I have a KryoNet Server / Client architecture, where I am sending messages.
One of these Messages contains an ...
1
vote
1
answer
61
views
Race Condition: Kryo keeps attempting to serialize items with references
I'm writing a video game utilizing a procedurally generated universe using KryoNet.
A bit of context, KryoNet will serialize the object, and then every reference in the object along with it and try to ...
0
votes
1
answer
51
views
Jython registering class with kryonet
I want to register a python/jython class with kryonet. I get this Error when I try it:
TypeError: register(): 1st arg can't be coerced to com.esotericsoftware.kryo.Registration, java.lang.Class
using ...
0
votes
1
answer
329
views
Making a fat jar file and adding dependencies - Eclipse IDE
I am using the Eclipse IDE, using Kryonet and LibGDX libraries.
I am currently trying to make a fat jar file - making kryonet a dependency.
How would I make a big jar file?
Here is my build.gradle ...
0
votes
0
answers
79
views
Trouble creating a fat jar in gradle - Using Eclipse IDE, Kryonet and LibGDX
Currently I am designing an online multiplayer game for a university project using Eclipse IDE and using libraries Kryonet and LibGDX.
I'm having trouble creating a fat jar in gradle, I've followed ...
1
vote
1
answer
135
views
Linear impulse and incorrect positions in multiplayer
I'm creating a game in LibGDX. I was initially following a tutorial for a super Mario brother game from youtube, however, I have changed the game to include my own characters and graphics. I am using ...
0
votes
1
answer
75
views
Separate main() methods to run DesktopLauncher.main() and Server using Libgdx and Kryonet
I want my GameServer to run separately from the game itself. So, players(clients) can join into one static GameServer and I can handle them together and see how many clients are connected, currently.
...
1
vote
0
answers
75
views
Problem with TextArea using Kryonet and Libgdx Project
Im new to stackoverflow, Kryonet and libgdx, too. Here, while learning process of libgdx, I want to make an online rock-paper-scissors game to experience both libgdx kryonet. At first I wanted to ...
1
vote
1
answer
129
views
How to send data to kryonet outside java
trying to understand how to work with kryonet, it is quite easy to send and receive message from java client, but what if I want to send it from some UI tool like Hercules, or not java code. As I see ...
0
votes
1
answer
118
views
Locating servers IP address
I am making a game in Libgdx where a user(client) will be a host of the server himself
and only one other client can connect to him and play with him(likewise there might be multiple independent ...
0
votes
1
answer
330
views
Storing components for an ECS in java
I'm creating a networked game in java using ECS(Entity Component System) and this is my first time using ECS. I'm not sure how I should store the components though. I do want to use an Entity class ...
1
vote
2
answers
383
views
Class references null when starting service in background
I am trying to implement a "never-ending background service" in my android app. It should be used to wait for a server sending a certain type of object to the client and notify the user when this ...
1
vote
0
answers
46
views
Kryonet server / client connection successful but having issues printing out emoji
I'm using Kryonet API for a chat app. I managed to get the server / client connected. Text messages are sent and received successfully but I'm having difficulty posting emoji's. When debugging I'm ...
0
votes
0
answers
209
views
Java, Android Studio, Gradle, LibGDX, KryoNet - Error: Program type already present: com.esotericsoftware.jsonbeans.Json$Serializer
This problem popped up out of nowhere on me and it only affects the Android project and building an APK.
I'm not entirely sure what the problem is. I spent the better part of last night on Google ...
0
votes
1
answer
350
views
Buffer Overflow In KryoNet Trying To Recive A Object Graph
I'm sending an object which contains a 2X45x45 big 3-dimensional array. In every slot, there is a custom object which I also registered in kryonet. It seems to send fine but trying to recive it I keep ...
0
votes
1
answer
252
views
Java Kryonet RSAPublicKeyImpl not registered
I'm trying to send a PublicKey (java.security.PublicKey) from a Kryonet server to a client by using connection.sendTCP(key); I get this exception when doing so:
Exception in thread "pool-1-thread-1" ...
0
votes
1
answer
56
views
Kryonet server not receiving a registered class
I'm making a simple chat using kryonet. I've had no problems sending messages. But for some reason the server just doesn't respond when i send it an attachment.
I'm trying to send a file(converted to ...
0
votes
1
answer
194
views
How to handle game object updates with kryonet client
I working on a simple multiplayer game in java2d that handles 4 players at a time.
Here is a code sample that receives data from the server.
server.addListener(new Listener() {
public void ...
0
votes
1
answer
210
views
What does Kryonet send over each couple seconds?
I noticed Kryonet sending/receiving an object I did not register to each connected member about every 5 seconds. It's probably just a couple byte and even for a couple thousand players would not up ...
0
votes
1
answer
356
views
Unable to compile a project due to duplicate class definitions in Kryonet
Caused by: com.android.dex.DexException: Multiple dex files define Lcom/esotericsoftware/reflectasm/MethodAccess;
The above error is preventing my Android project from building, I'm using Kryonet and ...
1
vote
1
answer
591
views
Message not being received by kryonet listener?
So I'm having a problem testing my networking, there's a lot of code below but this is as small as I could make an example. The problem I'm having is that it seems the listener I'm registering with ...
0
votes
0
answers
276
views
Kryonet Client immediately disconnecting from server
I am currently in the process of writing an app which has the phone connect to a server.
Both client and server are using the Kryonet framework.
The problem ist the following :
When the server is ...
0
votes
1
answer
51
views
Handling multiple TCP and HTTP responses in SplashActivity
I should organize 2 HTTP (Retrofit + Rx) and 2 TCP (KryoNet) requests in my SplashActivity. When I get the response from all requests I should start MainActivity. How can I combine requests, handle ...
1
vote
1
answer
475
views
kryonet client, send message to server without open a new connection
I'm saying i'm not a programmer but a guy who has been learning to program with java for a while. I hope to find the solution to my problem here. I'm trying to program my home automation system and ...
0
votes
0
answers
496
views
JavaFX Components not updating
I'm building a lobby that should display messages from players.
Here is my lobby controller:
public class LobbyController{
@FXML public JFXTextArea chatArea;
@FXML public JFXTextField ...
0
votes
1
answer
541
views
Android client not connecting to server KryoNet
I am trying to connect from an Android client (from my phone) to a server (my PC). Both the server and the client are using KryoNet. The connection is succesful when I try to connect from a client ...
0
votes
1
answer
2k
views
Connecting client to server Kryonet and Libgdx
I'm trying to connect from a client which uses libgdx for the interface to a server. I use Kryonet on both the client and the server. However it is not working. Any idea what's wrong?
Here is the ...
0
votes
2
answers
2k
views
Why are my getters returning null when I try to send to the server?
I know this question has been asked a countless number of times on here, and I've searched SO and other sources for a solution but I just can't resolve the error. I have a getter and setter for my ...
1
vote
0
answers
44
views
Trouble getting a list of the client names from GUI and sending to server
I'm working on a multiplayer/client game using kryonet and JAVAFX for the GUI.
I'm having trouble simply getting a the names of clients after they connect to the server. I thought of getting the name ...
0
votes
1
answer
164
views
libgdx ios app getting rejected for not working on IPv6 network using Ec2 and Kryonet
My App has now gotten rejected twice for not working on an IPv6 network on a device running IOS 10.2 My App was built using these resources and I was hoping someone could give me some insight on where ...
0
votes
0
answers
558
views
hosting a game online using NIO Kryonet, performances issues and workflow and other issues
So I have been coding a game using Libgdx, and THE very simple and powerful kryonet(SERVER-CLIENT) for multiplayer section . So far I could properly do the multiplayer over LAN and it works great!. I'...
0
votes
1
answer
122
views
Java getting serializer error with kryonet and slick2d?
I am trying to execute this server code.
package server;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.io.IOException;
import javax.swing.JFrame;
import javax....
0
votes
1
answer
145
views
Slick2D+Kryonet - Client gets connected but packet was never received
Im devloping a game to learn the basics of making online games. Though, it didnt go as well as I hoped. From what it looks like its the client not receiving the packet for some reason. As said in the ...
0
votes
0
answers
233
views
ESP8266 communicating over wifi with android phone
I am trying to find a way to read data using my app from an ESP8266, on Chrome works fine by the way. According to the documentation (I am using the Simple HTTP Server example) ESP uses sockets. I ...
1
vote
1
answer
1k
views
Mysql in Java. How to implement efficient asynchronous queries?
I'm creating a game with a server and multiple clients.
I'm using Kryonet for networking and each connection has it's own listener where it receives packets.
There listeners are called on a ...
0
votes
1
answer
165
views
Kryonet - how to get the sender (Connection) during serialization?
I have a huge, huge problem. I'm using AES serialization for packets and here comes an issue.
Serializers in Kryo look like this:
public class AESSerializer extends Serializer {
private final ...
1
vote
1
answer
134
views
Does Kryo Automatically Register Classes Used in Fields?
Using Spark, decided to use Kryo since it is the recommended de/serializer.
Say I have:
public Class1 {
private Class2 field1;
}
Do I need to register both Class1 & Class2 or just registering ...
2
votes
0
answers
590
views
LibGDX + Kryonet, will it work on iOS?
I'm creating a multiplayer mobile game using LibGDX library. For networking I use Kryonet which is written in Java. As I read (and tried), Kryonet works well on Android devices but I have no emulator/...
1
vote
1
answer
405
views
Kryonet connection ID limit?
I'm using kryonet for my LibGDX project. Every time a client connects to the server, a new connection ID gets created. Eg. Client 1: ID 1. Client 2: ID 2.
When a client reconnects, the counter ...
0
votes
1
answer
235
views
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 ?
1
vote
1
answer
68
views
Static int is not the same for different processes
I'm developing a game in LibGDX and I have a static int named TILE_ID that is assigned to every tile everytime a tile is created, like this:
{loop in Level.class}
Tile t = null;
switch (...
0
votes
1
answer
225
views
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 ...
3
votes
2
answers
1k
views
Boolean not changing in thread
I have a class MPClient and MultiplayerMatch. MultiplayerMatch, in his constructor, creates a MPClient runnable thread.
To avoid data overflow, I have a boolean named "moved" in MultiplayerMatch that ...
1
vote
0
answers
546
views
UDP buffering and interpolation in a multiplayer game
We're developing a fairly simple 2D multiplayer platform shooter and we've run in to some problems with constructing an UDP buffer for the states of world entities(players, bullets, etc.). Currently ...
1
vote
1
answer
3k
views
How to import the Kryonet library to a libGdx project on Android Studio
How do you add an external library (in this case, kryonet) to a libGdx project in Android Studio? I've seen people telling it's related to the build.grade, but where do you put the jar file or how do ...
1
vote
1
answer
945
views
How to secure Kryonet (SSLSocketChannel)
I have a working game servers + clients system using Kryonet that I want to secure. I have read a lot of the source code for Kryo and Kryonet and also a bit about java.nio (SocketChannels and SSL). I ...
2
votes
1
answer
125
views
kryonet server crashing when receiving an object
I have a problem with Kryonet server crashing after receiving an object from client.
Server code:
package com.qookie.miner_server;
import java.io.IOException;
import com.esotericsoftware.kryo.Kryo;
...
1
vote
0
answers
80
views
Kryonet/LibGdx received not called on client using android emulator, but works on device
I'm using KryoNet with LibGdx to implement some network logic.
It works fine when running desktop client, and it also works when I test it on some Android devices, but on some others it does not work....
1
vote
0
answers
79
views
KryoNet RMI Code works on PC but not on Android
I've written some code to utilize the RMI feature of KryoNet. I've followed the examples and it all worked great on my computer.
However when running the same code from within an Android application ...