WebSocketUtil - What should be added / Changed #524
ItsLJcool
started this conversation in
Show and tell
Replies: 2 comments 2 replies
-
maybe you should actually say yes directly to the multiplayer question or certain people will get confused😭 |
Beta Was this translation helpful? Give feedback.
2 replies
-
how to node js /j |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Information
How WebSocket's will be implemented
There will be a new class called
WebSocketUtil
. It has hasic handling for errors / try catches so the game doesn't crash.There is also a
WebSocketPacket
class that you can create. All it does is Serialize it into data that your server can decompile instead of sending raw bytes and possibly clogging up stuff.It has 3 parameters. The name of the packet, the data (Json format. Also can be a string and will be stringified), and if you want some additional metadata associated.
Currently the metadata that will be added on will be:
-- Username
-- Global Name
-- Premium Type
WebSocketUtil
)WebSocket Server Template For CodenameEngine
The merge won't happen until I fully complete a nice Template for making Servers with the
WebSocketUtil
Go check out the Template WIP here
I am accepting ideas / feeback. Make PR's and what not idk.
Quick FAQ
Will I have to make my own server?
Yes, it can be coded in anything but I am working on a JavaScript Node.js Enviroment that handles
WebSocketPacket
.Though if you want to not use the Template, you will have to make your own Unserializer for your program if you use
WebSocketPacket
since it Serializes the data.Can I make Multiplayer with this?
Yes you can. Kind of the entire reason I make a Pull Request anyways.
BUT IM MAKING IT ALREADY YOU CAN'T MAKE ONE !!!!!!!! GRGRGRG!!11!!!1!! STAY AWAY !!!!11!111!!!
- Will update here if I think some questions asked need a quick answer -
Beta Was this translation helpful? Give feedback.
All reactions