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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
40 views

Should I be adding a database functionality for my game rooms?

I'm a little confused on when it's needed to bring in Mongo or MySQL in a web browser multiplayer card game. Here's my plan so far: I'm using React, Node.js, Express, and Socket.io. I'm having the ...
1 vote
0 answers
56 views

What does a "non viable function" error mean?

I am trying to use a websocket and some C++ code in order to trigger a function toogleLight every time Unreal connects with a server. But I have the following error:...
1 vote
1 answer
62 views

LibGDX websockets GWT html app cant find source to WebSocket class

I'm using this library to connect to websocket server: https://github.com/czyzby/gdx-lml/tree/master/websocket It's working on android/desktop applications, but when compiling to html gwt app with ...
0 votes
1 answer
519 views

What is the best rate at which to send updates to clients for a first person shooter NodeJS WebSocket server?

I developed a multiplayer FPS using WebGL, Nodejs and WebSockets. So far it is running great. I am currently using setInterval(sendPlayerPositions, 16); to send updates to WebGL clients. Ideally I ...
0 votes
2 answers
2k views

Syncing & smoothing movement with rigidbodies with Socket.io

I am building a 2D top-down MMO that's very lightweight. I have a master client that determines everything's position and actions, and sends this information to all other clients. Now I have made a ...
0 votes
1 answer
61 views

Unity Mirror AWS clients won't connect to server

My Unity project uses the Mirror Networking component and I am using an AWS free tier EC2 instance to host it. I configured the instance following this guide from the Mirror documentation, including ...
0 votes
0 answers
131 views

How to send camera feed to Python script in Unity?

I have an image recognition code in Python and I need the input image to come from the Webcam in Unity. I've seen the Python Scripting package and the method of using a websocket and take the app as ...
0 votes
1 answer
3k views

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

I'm currently playing around with phaser.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 ...
0 votes
1 answer
333 views

How to implement WebRTC in a Godot project that already has communication through WebSockets?

I'm currently working on a fast-paced multiplayer sports game using Godot. The players' movements and actions are already being synchronized with WebSockets and Channels using a Node.js server. I now ...
0 votes
1 answer
261 views

Multiple Node/Express/Socket.io servers for game lobbies?

Building a multiplayer game on the web that will be able to handle thousands of players at once, separated into independent lobbies/sessions. There may be 20 players in one lobby, 10 in another, 30 in ...
0 votes
1 answer
252 views

How to set a header on a WebSocketPeer?

How to pass custom header information on a Godot4 WebSocketPeer connection?
0 votes
1 answer
144 views

In a multiplayer game developed using client server model with socket.io and node.js how can we describe the osi layers

What will the different layers in the stack look like in the osi model?
0 votes
1 answer
239 views

P2P + Authoritative server for Web based game, how to combine?

I'm working on an online Web RPG game (jRPG) with a map, that characters can go around. Also, an important part, is that each player has his own world and each player can invite his friends to play on ...
0 votes
1 answer
417 views

How do I implement a countdown timer for a multiplayer chess game?

There's a lot of multiplayer games out there that uses countdown timers to set a time limit in their game sessions, but how is it actually implemented? For example, in a chess multiplayer game based ...
0 votes
0 answers
58 views

How do I handle multiple matches for a multiplayer game based on web?

In a multiplayer chess game based on web where the server must validate the plays, store the current game state and provide the gameboard info to be rendered on client side, among other things related ...
1 vote
1 answer
489 views

How can I protect against a cheater changing variables on the client?

I built a multiplayer fighting game with impactjs, socket.io and nodejs and faced with "change variables hack" (I want to call it like this). All my current logic with jump, running, shoot ...
0 votes
1 answer
291 views

Connecting clients with UDP and WebSocket connections

I'm in the process of making a physics intensive multiplayer game. Naturally I use a UDP to transfer packets regarding rigidbodies between client and an authoritative server. However non-essential ...
0 votes
0 answers
33 views

Signalling time-expiry to clients in a browser-based multiplayer game

I'm trying to develop my first ever browser-based multiplayer game that utilizes my own websocket server which has no multi-threading capability. It will be a game where players try to be the fastest ...
3 votes
3 answers
21k 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 ...
1 vote
0 answers
22 views

WebRTC Non-Guaranteed Data Sending Model Needing a Piece of Guaranteed Data

For games it is best to have non-guaranteed sent data, otherwise the game slows down while it waits. However, when one user initiates a game, then that has to be guaranteed data, otherwise the other ...
0 votes
0 answers
40 views

WebRTC - Protocols and Getting the Timing Right in a Racing Game

I am trying to work out the protocols to set up a game between 2 players and the ideas behind getting the timing right between those two players in a running race game. Since this is obviously a timed ...
0 votes
0 answers
219 views

How to prevent repl.it WebSocket from going to sleep?

I have a WebSocket hosting on repl.it But when the repl sleeps, the WebSocket does as well. My friends told me to have a pinger to ping the site. It doesn't work. They told me to fetch the server. ...
0 votes
2 answers
199 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
1 answer
383 views

Working with websockets in Unity: Cannot convert lambda expression to type 'IObserver<ReconnectionInfo>' because it is not a delegate type

I'm a bit stuck on a delegate error in Unity. The code works fine if I'm in a c# console app however Unity is giving me the error: Cannot convert lambda expression to type 'IObserver' because it is ...
0 votes
1 answer
249 views

How to launch Libgdx cross-platform (Android, HTML, Desktop) multiplayer client with socket?

So i'm struggling with making my cross-platform client side to work, specifically on HTML part. I have java server that is responsible for all the controls and events, and I control it via netty-...
0 votes
1 answer
202 views

Web Game Security - AntiBot

I'm going to develop a real-time browser game using NodeJS in backend for a fast WebSocket, but I'll both prevent bots and other cheats, so my frontend JS might be very advanced. I'm experienced with ...
0 votes
1 answer
145 views

Authoritative game server and database storage

In an authoritative game server working with websockets, should you store every action to the database before sending the response to the client? The risk is the slow response time. Or should the ...
0 votes
0 answers
25 views

Can you run a websocket client in EU4 server mode?

Is it possible to build a websocket client (eg using blueprints) and then package this into an EU4 server (like suggested here). If so, would this mean that the EU4 server's websocket client could ...
5 votes
1 answer
10k views

How can I use websockets in a Unity WebGL project?

There are plenty of good Websocket APIs for C#, but I run into trouble when targeting Unity WebGL due to this restriction described in the Unity documentation: No direct socket access Due to ...
0 votes
0 answers
42 views

My server simulation is getting locked up between receiving movement input from players and updating projectile position

I'm currently developing a 2D game in the browser with Nodejs and Canvas. Im simulating the world state in the server side with a timestep of 60 frames per second. Im only sending a snapshot of the ...
0 votes
0 answers
255 views

WebSocketSharp For Unity

I have integrated WebSocketSharp with Unity 2018.4.14f1 and it works well with Android and IOS. I wanted to know that most of the other socket.io plugins for unity have a wrapper of Class Packet over ...
1 vote
1 answer
89 views

How to connect Google Domain to AWS ELB url [closed]

I have recently uploaded a server with node js in my AWS environment and added a HTTPS listener in my load balancer. Also generated a certificate using ACM(AWS certificate manager) for my google ...
0 votes
1 answer
271 views

Websocket : Is wss faster than ws?

I am developing a small game where latency matters and I have been reading this article https://samrueby.com/2015/01/26/why-is-https-faster-than-http/ and it claims that Https is faster than Http. I ...
1 vote
3 answers
6k views

Websocket server thread per connection

I'm creating an html5 multiplayer game and am looking at how to create a websocket server. I've been looking at various libraries and one thing I noticed is that each one will create a new thread for ...
0 votes
1 answer
134 views

Multiplayer platformer

I'm considering building a multiplayer game having a central server handling the game and keep clients updated. I was checking various examples of ".io" games styles of implementation and seems pretty ...
0 votes
1 answer
58 views

Can HTTPS webserver host an HTML page that uses JS to connect with secured web socket protocol multiplayer game just like node js?

Can HTTPS webserver host an HTML page that uses JS to connect with secured web socket protocol multiplayer game just like node js? If so point me in the correct direction to read more.
1 vote
0 answers
1k views

Using UDP vs Websockets

I am running a Unity Game on a PC (for development purposes) and then on an Android phone (for production). I need to send data to the Game continuously from a WiFi enabled microcontroller (Esp32). Is ...
4 votes
0 answers
855 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
2 answers
634 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 ...
1 vote
1 answer
2k 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
1 answer
1k 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 ...
1 vote
1 answer
106 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 ...
1 vote
1 answer
1k 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
1 answer
1k 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
0 answers
363 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
1 answer
508 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 ...
2 votes
0 answers
631 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
1 answer
803 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 ...
1 vote
0 answers
132 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, ...
2 votes
3 answers
754 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 ...