10
votes
Websockets Server for Unity3d
System.Net.WebSockets seems to be completely built-in to .Net and freely available in Unity.
Here's a full Websockets client for Unity for example:
...
8
votes
Accepted
How can I use websockets in a Unity WebGL project?
As the documentation says, The Unity scripting API does not expose direct WebSocket access itself. But you can access the native web browser API by calling JavaScript from Unity C# scripts.
Create a ...
3
votes
Accepted
How can I protect against a cheater changing variables on the client?
This won't prevent all cheating but at least will make it harder for the average cheat engine/ change variable hack. Follow the simple advise: Don't trust the client.
Now what does that mean? Usually ...
3
votes
Accepted
Websockets Server for Unity3d
Websocket sharp: https://github.com/sta/websocket-sharp
It has a unity version which I've used as part of a cross-platform library and on a couple of local multiplayer games, and worked well. I have ...
2
votes
Accepted
iOS 9.3.5 WebSocket connection always closes with code 1006
In my case the problem was the line endings being generated in part of the response header I was creating in LabVIEW. I had a pre-built string that included everything but the base64 handshake, and ...
2
votes
Accepted
Multiplayer platformer
What is clear for me is:
any input the characters receive needs to be sent to the server and updated the other client.
any map event logic will stay on the server and update clients when happening
...
2
votes
Accepted
How to create additional rooms for new play sessions in a 2-player online game on Node.js?
I would suggest not using Socket.IO's rooms mechanism. It is not very flexible and isn't very appropriate for a robust server architecture.
Here's a quick scribble of how you could structure your ...
2
votes
Accepted
Authoritative game server and database storage
Sending the data to the client before you are sure that it was successfully stored in the database, you run the risk that the client will display information to the user that the server ultimately ...
2
votes
In a multiplayer game developed using client server model with socket.io and node.js how can we describe the osi layers
The OSI model is mostly a theoretical model. In practice, it tends to break apart as soon as you get below the standardized layers of the Internet protocols (below the transport layer). So this is ...
1
vote
Accepted
How do I implement a countdown timer for a multiplayer chess game?
As I mentioned in a comment, this can be implemented as a timestamp.
When an opponent reports their move to the server, the server records the time on the server clock as the last move time for that ...
1
vote
Accepted
LibGDX websockets GWT html app cant find source to WebSocket class
Solution: I downgraded websocket gwt library version in html module to
...
1
vote
Multiple Node/Express/Socket.io servers for game lobbies?
This is a pretty large question and the answer is "It Depends".
You'll see benchmarks for hundreds of connections on a single node.js instance, but those are normally useless because they're ...
1
vote
Accepted
How to set a header on a WebSocketPeer?
Okay, I have found how to do this:
Create an instance of PackedStringArray
Add it to the WS Client using _set_handshake_headers
...
1
vote
How to implement WebRTC in a Godot project that already has communication through WebSockets?
You can not, as far as I'm aware, re-use the same WebSocket Channel to send WebRTC messages. WebSockets are really just a persistent TCP based connection between client/server that allow for bi-...
1
vote
Working with websockets in Unity: Cannot convert lambda expression to type 'IObserver<ReconnectionInfo>' because it is not a delegate type
anonymous function is not the same as an object representing an anonymous function. you're trying to pass in anonymous function, but you need to wrap it in the object representing it and pass that one ...
1
vote
Web Game Security - AntiBot
With web - accept as a fact "Any client is a potential cheater".
If you have any game logic on the frontend - nothing will save your game from the cheaters.
If you move all the logic to the ...
1
vote
Accepted
Websocket : Is wss faster than ws?
Websockets isn't HTTP, even though the handshake is compatible. It doesn't rely on SPDY (by default, I get into this later), nor can it use HTTP2, so anything mentioned by the article doesn't apply ...
1
vote
Accepted
Do I need real socket connections to create AI Bot players in a multiplayer web game?
Hm... You shouldn't open those for AI characters, at least not for all of them, all the time. But this depends on your game.
Some assumptions:
1) There are more than one real player in the game.
2) ...
1
vote
How to launch Libgdx cross-platform (Android, HTML, Desktop) multiplayer client with socket?
For web support (support cross platforms) you need to use libraries that do not use Java features such as reflection (Gson problem). If possible use libraries implemented in libgdx. In your case, use ...
1
vote
Can HTTPS webserver host an HTML page that uses JS to connect with secured web socket protocol multiplayer game just like node js?
You can create a client websocket in browser-based JavaScript like this. Note the protocol wss:// before the URL of the server. ...
1
vote
Accepted
Should I compress WebSocket payload data in a game where latency matters?
The time it takes to pack and unpack the data is likely negligible.
But there is a different problem: Compression works best when you have a lot of data to compress. So if you want compression to be ...
1
vote
Should I compress WebSocket payload data in a game where latency matters?
TL;DR: Will compression hurt? No. But it probably won't help you if your goal is a very responsive game.
You have two problems to solve with connectivity...
Can I get enough data to the client in ...
1
vote
Server moving slower than client
I notice you're using setInterval to time your game loop. Javascript's timing functions are imprecise, depends on the browser and prone to drift.
It's best if you ...
1
vote
websockets authentication security
WSS means Websocket over TLS. So when you force the use of WSS instead of WS, you already solved most problems. Just make sure that
The server certificate is valid and signed by a root CA
The client ...
1
vote
how to handle server tick update for multiple rooms? (Nodejs)
You should remember that nodejs are single-thread.
So if you start few setInterval timers with about 15hz - some of times timers may and will start skipping ticks (as setIntercal can do it when loop ...
1
vote
Websockets Server for Unity3d
2021 Answer: Another library which is also built on System.Net.Websockets like Fattie's linked Marfusios library, but is made for Unity is the following:
https://...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
websocket × 109node.js × 37
multiplayer × 23
javascript × 15
networking × 14
client-server × 12
unity × 11
html5 × 11
server × 11
browser-based-games × 9
mmo × 6
html-canvas × 5
c# × 4
turn-based × 4
web × 4
php × 4
security × 4
socket × 4
architecture × 3
python × 3
webgl × 3
cocos2d × 3
databases × 3
udp × 3
c++ × 2