Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [websocket]

A bi-directional WebSocket protocol makes possible more interaction between a browser and a web site, facilitating creation of real-time games.

2
votes
0answers
41 views

What's the “right way” to open a websocket connection inside WebGL?

The official Unity documentation says that, to run websockets in the WebGL player, you should use this plugin on the Asset Store. Unfortunately, following that link leads to a notice that this asset ...
1
vote
2answers
75 views

Should I compress WebSocket payload data in a game where latency matters?

I have started work on a new game project where users are in an open environment and fight each other in a fast-paced shoot-out. I know that compressing all of the WebSocket's payload data using zlib ...
0
votes
0answers
20 views

How can I make a game-wide round timer with socket.io?

I'm making a javascript multiplayer networked game called "Ultimate Tag". It's basically a multiplayer tag with upgrade every time you tag someone. I want to have 5 minute rounds with timers, and a ...
0
votes
0answers
25 views

WebSocketSharp issues when used for online turn-based game in Unity

I'm using Websocket-Sharp in Unity for a turn-based game to communicate with a server. As I said here, This library has a major problem with detecting connection lost when turning on/off VPN in ...
0
votes
0answers
203 views

Websocket client connection for Unity 3d

am looking for help to get usage of websocket client in unity3d. i have my business logic running in python which posts the msg in JSON format to port say 8080 using websocket server code written in ...
0
votes
0answers
38 views

Google Protocol Buffers 3 Builders in C#

I am developing a game in unity3d. I am using google's protocol buffer 3.6.1 compiler to compile .proto files in c# but its not creating its builders. does builders removed ? whats the new way to ...
1
vote
1answer
55 views

Server moving slower than client

I am implementing a pretty straightforward client/server multiplayer architecture with Socket.IO and am having an issue where my client framerate seems to be faster than the servers. I have both ...
0
votes
2answers
76 views

websockets authentication security

Im doing a online game havingclient, js html5, and server, nodejs with websockets. I've read some blogs about websockets security, and its limitations, but no real implementation or example. Could ...
0
votes
1answer
341 views

How to create additional rooms for new play sessions in a 2-player online game on Node.js?

I'm creating a 2-player online game using Node.js with Express and Socket.IO My task is to create a new room when 1st, 2nd, etc ... rooms are full. From this article I know how to create one room for ...
0
votes
0answers
65 views

Socket.io game communication efficiency

I'm developing an online realtime multiplayer html5 based game which at least one client acts as a console display while the other (n) number of clients are controllers. None of the clients are ...
0
votes
0answers
182 views

Why Unity with Socket.io on Heroku doesn't work

I deployed server with Socket.io on Heroku using a free dyno, and when I start Server.js nothing happens. Server.js: ...
0
votes
0answers
106 views

The websocket messages in my online game are being served too slow

Im attempting to make a online game in python, though I have ran into a problem. Basically I want the game to be playable in many regions, but the websockets are to laggy to be played in farther ...
1
vote
1answer
182 views

Do I need real socket connections to create AI Bot players in a multiplayer web game?

I have built a realtime multiplayer web game using WebSocket protocol. In my game I create about 100 AI bot players to simulate playing the game with the real players. Every time a bot is dead the ...
0
votes
1answer
450 views

iOS 9.3.5 WebSocket connection always closes with code 1006

I'm working on an app that uses a LabVIEW implemented server on the backend that is proxied via apache. It works great on desktops and android devices but on iPhone and iPad the websocket connection ...
0
votes
1answer
408 views

how to handle server tick update for multiple rooms? (Nodejs)

I'm making a multiplayer game using socketio + nodejs. Currently I use setInterval on my server and requestAnimation on my client render. Now I want to create multiple game instances for each room and ...
2
votes
0answers
293 views

Persistent realtime game authentication (JWT, Passport)

Context I am building a MMO game in HTML5 with canvas. I use NodeJS on server & JS from scratch on client. I also use socket.io to manage realtime. The game is persistent & each player keep ...
1
vote
0answers
49 views

Unity won't Instantiate() outside of Start(), even though code is the same

I am trying to add a gameobject to my game using a socket connection. I have a SocketHandler class, which simply connects to my NodeJS socket server, which can also call a method on another class, ...
1
vote
3answers
6k views

Websockets Server for Unity3d

Is there any way to implement websocket server, which I can run inside Unity3d standalone linux instance? I gonna connect to it directly from webpage (pure javascript, not Unity3d WebGL). I've tried ...
0
votes
1answer
703 views

Socketio, nodejs. syncing movement with rigidbodies over the network - unity

I am building a 2d top-down mmo. very lightweight. I have a master client that determines everythings position, and actions and send this information to all other clients. Now I have made a great ...
2
votes
3answers
212 views

How to securely submit a score?

We have an app with several mini-games in it and in each a highscore can be achieved. The score gets submitted by requesting an endpoint and passing the score as a json in the body. How can we be sure ...
1
vote
1answer
449 views

2D Websocket WebGL game

Inspired by BrowserQuest, I want to try my hand at making my own kind of game like this but I don't really know anything about game development other than the basics, like how the game loop works. ...
1
vote
2answers
222 views

Determing winning on the server side or client side?

I am using JavaScript + Node.js+Websockets to develop a multiplayer card game. In my single game version the Win determining calculation is done on the client side (of course) with a function. It ...
2
votes
0answers
634 views

Websocket-based realtime multiplayer game client and server communication?

I am building my client/server realtime MMO game using websocket which is based on TCP. My game will be server authoritative and will use non-lockstep. That means all game logic (not graphical) will ...
0
votes
2answers
193 views

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

As a side project I'd like to program a board game similar to Twilight Struggle. For this pet project I'd like to satisfy several non functional requirements: The core logic must be written in ...
0
votes
1answer
103 views

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

I am developing the server for a browser game, it uses an ASP.NET API for authentication, login and character creation and a websocket for the rest of the game (Microsoft.Web.WebSockets). While on ...
1
vote
0answers
26 views

Socket.io emit textfield

Hello everyone I learned how to emit from socket.io website guides but I was wondering how does the chat example receive its input? For example in my cocos2dx app how do I pass a text field over to ...
1
vote
1answer
645 views

Binary Serialization and Protocol

i found this page Protocols. I'm currently working on a game similar to agario and i find that page is helpful for my game. They using WebSocket for sending game messages which is mine too. But i'm ...
1
vote
1answer
291 views

Photon Unity Network with Socket IO Ambiguities

When trying to use Socket.IO along with PUN I get multiple errors similar to the one below: ...
1
vote
1answer
587 views

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

I am using socket.io and HTML 5 canvas to build a MMO game as a practice. I finished the client side first and currently I am working on server side. Apparently the position/physics update is on ...
0
votes
1answer
92 views

SailsJS + Rotational direction coordinates calculation issue

I'm creating a small game to learn how NodeJS & Sails work (and by extension Waterline, Socket.io, Express, and all their components). I'm using websockets to make the server calculate the ...
1
vote
2answers
723 views

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

Where to start creating a multiplayer game like slither.io, agar.io, etc. I need only learn how to draw live positions and other data of all players into one fullscreen HTML5 canvas with update ...
5
votes
3answers
226 views

Calculate resources real-time. Sockets or not?

I'm currenly developing a game in Javascript. It's a Single Page Application so every change should be pulled from the server without page refresh. I'm currently wondering how I should handle the '...
1
vote
1answer
396 views

Game data structure in node.js

I am building a simple turn-based game in node.js using sockets.io. My web experience with node.js has typically involved saving everything to a relational database. I set this up for my game. I am ...
0
votes
1answer
467 views

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

I'm making a game in C++ using Box2D and WebSocket++. The world needs to updated every 1/60 second. Meanwhile the WebSocket server handles players. How I should ...
1
vote
1answer
1k views

Best client/server architecture for a mobile management game?

For the past year I have worked on a small company that develops a traditional browser based strategy game, of the likes of Travian or Ogame, but using a more interactive approach like Tribal Wars 2. ...
0
votes
1answer
2k views

Phaser.io with Socket.io - What should the Server calculate and what the Client?

I'm currently playing around with phasio.io and socket.io to create a really simple multiplayer. For the beginning i created basic movement which is synched via socket.io. The clients are sending ...
2
votes
2answers
674 views

Input and output of a server side game using web sockets

I am having a look at redeveloping an old flash based top-down zombie shooter game I made in highschool so that it supports multiplayer using socket.io. My ...
2
votes
3answers
252 views

Limit access to socket end point

I'm developing a multiplayer canvas game based on socket.io and box2d physics engine. Is there a way to limit connections to my socket endpoint and only allow connections from a specific domain? <...
0
votes
1answer
750 views

Streaming webcam via websocket performance issues (Code included)

I finally figured out, how I can stream my webcam, but I'm getting not the best performance. In low resolutions it's working fine, but as soon as I turn the resolution up, the performance gets worse. ...
7
votes
2answers
1k views

Should I use secure WebSockets for a game?

Is SSL necessary for a web game? I'm using Node.js with socket.io. Without it, when using unsecured networks someone on the LAN could change commands being sent to the server and "take over" a player....
1
vote
1answer
290 views

What's the most efficient way to send a users keypresses to the server?

So I've been coding a little project in JS recently, using node.js and socket.io to create a server, and HTML5 canvas to draw the client side. The user receives info from the server every 20ms, and ...
3
votes
1answer
339 views

Websocket Scalability w/ Player Skills

About 8 months ago, I asked this question, and received a lot of valuable information from the community. I have switched to nodejs, since then, and am finishing ...
1
vote
1answer
1k views

Building a simple bomberman game with Node.js and Socket.io [closed]

I'm building this game mostly because I want to experiment with Node.js and Socket.io, and the game is more like a proof of concept. To start with, I have a 2D grid system as the game map. ...
0
votes
0answers
32 views

Changing game variables through network in run time for debugging

I want to implement a system in my game that will allow me to change in game parameters on runtime through the network. Lets say my game is running on a ps4 or xbox one, I want to be able to register ...
0
votes
1answer
83 views

Is it bad practice to for the server to request data for a client from another client?

I'm making a collaborative whiteboard app so that when someone is drawing and uses a rectangle for example, a rectangle packet is sent to the server with parameters like ...
1
vote
2answers
102 views

When someone joins or leaves a room, send the entire user list or just the delta?

I'm developing a game that has a lot of rooms and most rooms will have between 2 and 15 users. On the UI there is a list of all the players currently in the room. I'm wondering, when someone joins a ...
-1
votes
2answers
415 views

Better to send multiple small packets or one large packet?

I'm developing a network game with node.js and I have the choice between these three options: 1) Send each point individually (very user responsive) 2) Send an update every 25 points or so (decent ...
1
vote
1answer
601 views

How should browser based muiltiplayer game state be syncronized using WebSockets and a Node.js backend?

I'm in the process of learning how to create browser based html5 games. I'd like to eventually be able to achieve a game with mechanics very similar to that of the game agar.io. I've been observing ...
2
votes
1answer
270 views

Should frame update and network packet sending synchronous or asynchronous?

I am making a game server that has 60 Update-Per-Second (assume I can most of the time achieve it). In the current model, my main loop does the following tasks in sequence: Update game logic (...
1
vote
2answers
351 views

HTML Multiplayer and Hiding Information

I'm in the process of conceiving a multiplayer web-based game of sorts and was looking into different ways of achieving this. Instead of using PHP/MySQL/AJAX like I'm used to, a lot of sites are ...