doorbash / colyseus-kotlin Goto Github PK
View Code? Open in Web Editor NEW⚔ Implementation of Colyseus client using Kotlin
Home Page: https://github.com/colyseus/colyseus
License: MIT License
⚔ Implementation of Colyseus client using Kotlin
Home Page: https://github.com/colyseus/colyseus
License: MIT License
Hello @doorbash, thanks for your amazing client sdk for Colyseus.
I'm having an issue during the handshake (Serializer)
W/System.err: java.lang.NullPointerException
at io.colyseus.serializer.SchemaSerializer.handshake(SchemaSerializer.kt:42)
at io.colyseus.Room.parseMessage(Room.kt:92)
at io.colyseus.Room.access$parseMessage(Room.kt:20)
at io.colyseus.Room$connect$3.invoke(Room.kt:75)
at io.colyseus.Room$connect$3.invoke(Room.kt:20)
at io.colyseus.Connection.onMessage(Connection.kt:66)
at org.java_websocket.client.WebSocketClient.onWebsocketMessage(WebSocketClient.java:598)
at org.java_websocket.drafts.Draft_6455.processFrameBinary(Draft_6455.java:862)
at org.java_websocket.drafts.Draft_6455.processFrame(Draft_6455.java:821)
at org.java_websocket.WebSocketImpl.decodeFrames(WebSocketImpl.java:379)
at org.java_websocket.WebSocketImpl.decode(WebSocketImpl.java:216)
Client-side:
Library: 'io.github.doorbash:colyseus-kotlin:0.14.5'
Schema:
class GameLobbySchema : Schema() {
@SchemaField("0/boolean")
var boo = Boolean.default
}
Server-side:
Library: [email protected]
Library Schema: [email protected]
Schema:
class GameLobbySchema extends Schema {
@type("boolean")
boo: Boolean;
}
I tried many things, but I'm completly locked right now, can you help me please 😊 ?
Thanks
Please implement current code
http://prntscr.com/mrl49g
I got current error on Android API 18
https://stackoverflow.com/questions/8151766/how-to-catch-java-lang-noclassdeffounderror
Thanks for your support.
Please fix using room callback
Problems:
Thanks for help.
Hey @doorbash!
As you may know, I'm working on version 0.11
of the server - hopefully, it won't be difficult to implement the changes in the client for Java.
The Client
class has been simplified a lot. The matchmaking now occurs in an HTTP request instead of a WebSocket connection: https://github.com/colyseus/colyseus.js/blob/0.11/src/Client.ts#L31-L93
The Room
had very few changes:
options
member is not necessary anymore (https://github.com/doorbash/colyseus-java/blob/master/src/main/java/io/colyseus/Room.java#L142)sessionId
is not coming in the JOIN_ROOM
message anymore (these lines can be removed https://github.com/doorbash/colyseus-java/blob/master/src/main/java/io/colyseus/Room.java#L204-L205)id
of the Room is not being sent as part of ROOM_DATA
anymore (no need to send this.id
here https://github.com/doorbash/colyseus-java/blob/master/src/main/java/io/colyseus/Room.java#L300)It would be great if you can keep this client up-to-date! 🙏
Cheers! <3
hi
can you add support for 0.10 colyseus ?
its 0.9
Hi, I found small mistake
options.put("sessionId ", sessionId);
http://prntscr.com/mvzl1y
Thanks for support.
Any plans to support? https://github.com/colyseus/colyseus/releases/tag/0.15.0
Hello.
How can I make ArraySchema implements Serializable?
@doorbash Hi, please fix small mistake.
/**
* Send message to the room handler.
*/
public void send(Object data) {
if (this.connection != null)
this.connection.send(Protocol.ROOM_DATA, this.id, data);
// room is created but not joined yet
for (Listener listener : listeners) {
listener.onError(new Exception("send error: Room is created but not joined yet"));
}
}
Problem is with calling onError
listener`s function. I think missing else
code. Thanks for help.
Unity port http://prntscr.com/mov5zy
Js port http://prntscr.com/mov6c2
@doorbash Hi, you can change on check contains substring "401 Unauthorized" with ignore case sensetive
http://prntscr.com/mlv4tb
Samples https://en.wikipedia.org/wiki/List_of_HTTP_status_codes
Thanks for help
Hi, @doorbash
Thanks for help.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.