Skip to main content
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: ...
Fattie's user avatar
  • 150
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 ...
Philipp's user avatar
  • 120k
7 votes

Determing winning on the server side or client side?

Hello visitors of Jindsay's Card Game Forum. Here is your friend xXx_GameH4x0rPhilipp_xXx with another cheat for you. Do you want to win every game? Here is a simple hack which works with every web ...
Philipp's user avatar
  • 120k
5 votes

Calculate resources real-time. Sockets or not?

Introduction There are pros and cons to each method of synchronization you gave that depend on a couple of factors. First, is your game singleplayer or multiplayer, second, how real-time is your game?...
RJ-Adam's user avatar
  • 163
5 votes

Determing winning on the server side or client side?

Doing basically anything on client-side apat from the inputs is a bad idea. And believe me, if the programmers could collect inputs on the server side, so the client couldn't fake them, then they ...
Bálint's user avatar
  • 14.9k
5 votes
Accepted

2D Websocket WebGL game

1: Should the client wait for confirmation before moving the player? Websockets use the TCP protocol, which can have very irregular latencies from time to time (which is usually why UDP is ...
Philipp's user avatar
  • 120k
4 votes
Accepted

HTML5 realtime MMO games, should I do server side physics update or client side?

Unless you want players to be able to teleport through walls using their browsers build-in JavaScript debugger, you will have to implement any game mechanics worth manipulating on the server. This ...
Philipp's user avatar
  • 120k
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 ...
Mattia's user avatar
  • 398
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 ...
Zibelas's user avatar
  • 4,346
2 votes
Accepted

Photon Unity Network with Socket IO Ambiguities

After a lot of searching I found this link: https://developer.ibm.com/answers/questions/323592/watson-sdk-photon-networking-unity-conflict.html As per the above link, I deleted the websocket-sharp....
Vishal Mohan's user avatar
2 votes
Accepted

HTML canvas, Node WebSocket and multiplayer game like slither.io. How to send visual data over websockets?

When you have a massive multiplayer game, then giving everyone information about everyone is often overkill (upload bandwidth on the server would increase quadratic with the number of players). In ...
Philipp's user avatar
  • 120k
2 votes

Is it possible to write a game with a HTML5+REST service architecture?

The problem with REST is that it is based on HTTP, which is not a protocol designed for low latencies or minimizing traffic. When you just want to send a few bytes, the HTTP header will generate huge ...
Philipp's user avatar
  • 120k
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 ...
UnlikelyNomad's user avatar
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 ...
Kal_Torak's user avatar
  • 146
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 ...
Theraot's user avatar
  • 27.2k
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 ...
Hymns For Disco's user avatar
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 ...
Philipp's user avatar
  • 120k
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 ...
Tim Holt's user avatar
  • 10.3k
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 ...
congusbongus's user avatar
  • 14.8k
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 ...
Philipp's user avatar
  • 120k
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) ...
jo1storm's user avatar
  • 124
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 ...
Vladimir Ishenko's user avatar
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://...
fallerd's user avatar
  • 111
1 vote

How to securely submit a score?

Ultimately you can't, unless you execute all game mechanics on your server. The app runs on the user's device. Any code running on the user's device is under their control. The best you could try ...
Philipp's user avatar
  • 120k
1 vote

Is it possible to write a game with a HTML5+REST service architecture?

The first aspect I would consider is deployment. You need to check into how easy it is to deploy your end product to the platforms you list. As an example, Java is generally considered highly portable ...
Pikalek's user avatar
  • 12.4k
1 vote
Accepted

Time per turn in a .NET turn-based game?

Your server can keep time. The first thing you will need is to have the server start a turn. You would then notify the client that his turn has started and how much time they have to complete their ...
Theraot's user avatar
  • 27.2k
1 vote

Binary Serialization and Protocol

For Go/JavaScript may be a good solution to use MessagePack. And you can use it on client side with any platform. You will save traffic, and you can use JavaScrtipt implementation as well. Note: for ...
Vladimir Ishenko's user avatar
1 vote

Game data structure in node.js

The exact answer depend on your exact use case so I'll try to stay general. Basicaly, memory is cheap and fast. If you can afford to keep X games states in memory at once, then go away with that. The ...
Atrakeur's user avatar
  • 121
1 vote
Accepted

How to make async step timing (game loop) using Box2D and C++

It looks you fell into "I need this!" scheme. But all you need is just call some specific part of game loop asynchronously or non-blocking. How to achieve this? Make sure whole loop is executed 60 ...
Mars's user avatar
  • 233
1 vote

Best client/server architecture for a mobile management game?

I think really your question seems to be one of protocol rather than language. You've ruled out HTTP, but that doesn't necassarilly rule out PHP, as you can implement websockets in that as well as ...
hobnob's user avatar
  • 581

Only top scored, non community-wiki answers of a minimum length are eligible