Questions tagged [node.js]
Node.js is a framework for making server-side Javascript applications, which is becoming more and more popular for game development. It endorses asynchronous I/O and implements CommonJS standards.
137 questions
2
votes
1
answer
759
views
unity, socketio, nodejs. amount of messages sent is multiplied by amount of NPcs that have ever spawned
I am building a 2d top down multiplayer mmo. very lightweight.
a note on architecture
I am using Unity as an engine, I have a backend Nodejs/socket.io websockets server. and a main Master client ...
2
votes
1
answer
1k
views
cron jobs for MMO browser game
I have to implement cron jobs in to my MMO browser game.
Its like in Travian game - you build something, and wait few minutes or hours..
But the problem is, that cron job shedulers made to be sheduled ...
1
vote
0
answers
442
views
Node.js in LibGDX project [closed]
I'm developing a game with LibGDX, and right now I'm trying the multiplayer part. I have managed to connect several players through Node.js and socketIO but when I try to make the lobby I am doubting ...
3
votes
0
answers
150
views
Optimising my Node.js/Js/Socket shooter game
So here I made a little shooter game just to play around with and on my pc it runs fine but for people with worse internet/less powerful computers (e.g at school/few friends of mine) it is quite laggy ...
1
vote
0
answers
223
views
What is Unity NetworkTransport message encoding and signature
I'm new to exciting world of Unity, and I have problem establishing network connection using NetworkTransport API.
I'm using NodeJS as server. And I have some questions.
Does NetworkTransport.Connect ...
0
votes
1
answer
806
views
How do I make my offline socket.io server go online?
I've made a simple multiplayer game using socket.io, and took a lot of help from YouTube and the Internet on how to do it. However, the tutorials only talk about how to run the server locally, and ...
1
vote
1
answer
921
views
Throw ball - distance and force
I have a question, I need a formula to calculate the distance and a force based on the speed that drags the finger up on the phone. And is there any way I can get a look? And also shows the trajectory ...
0
votes
1
answer
106
views
How to solve this card game turn requestes clashing issue
So I am developing a poker card game using JS +node.js + socket.io.
It is turn-based game. There will be a host and 4 other players.The flow is the players need to make a yes/no choice, then the host ...
1
vote
0
answers
397
views
How to create communication with node.js server to client browser about monsters(object)
First hello and sorry for my English, and now about my problem.
I create node.js server that communicates with the browser-client for player position, life, def, ...
1
vote
2
answers
362
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 ...
0
votes
2
answers
837
views
Unity / NodeJS Projectile synchronization
I am working on a MOBA game similar to League of Legends. I am building the game server system in NodeJS/Socket.IO but I'm running into issues on figuring out the best way to handle projectiles (aka ...
0
votes
1
answer
100
views
Quantity of dropped/spawned items in container
I'm having trouble figuring out how to spawn more than one item in to a container with a weight limit. What I'm having trouble with is the understanding, rather than what statements to write;
My ...
0
votes
1
answer
158
views
why are my client and server physics not syncing up? node.js and html5
My server looks like this -
...
0
votes
1
answer
130
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 ...
0
votes
1
answer
2k
views
Structure game database to store player info and items
Recently I started developing my tiny html5 multiplayer game made in Node.js, Express.js, MongoDB(Mongoose), Socket.io and using Phaser.js.
I am quite new to these frameworks and especially new to ...
1
vote
1
answer
874
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 ...
2
votes
0
answers
74
views
Pixel Check With Node.js [closed]
I'm trying to check if a pixel of a certain color at (x,y) has moved within a boundary of [(x1,y1),(x2,y2)] and also update its new position to console. I'm doing this as a desktop application so no ...
2
votes
2
answers
1k
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 ...
1
vote
0
answers
122
views
Instanced based game with multiple node instances
I have a nginx load balancer with 4 nodejs instances behind it, and one Redis server to ...
0
votes
1
answer
2k
views
WebGL Redirecting URL
If player's browser don't support WebGL, I want to redirect Web Player version. I think it's possible in UnityLoader.js file but how?
...
9
votes
2
answers
2k
views
Collisions between players in multiplayer racing game
I'm creating a simple racing game (spaceships, no gravity) using p2.js, phaser and node.js.
What I have done:
Client receives world state from server:
extrapolate other players based on latest ...
5
votes
2
answers
1k
views
synchronizing client-server actions
What's the usual way to handle events that are checked both on server and the client, like attacking? There's a cooldown timer to an attack of which the client is aware (so to prevent spamming server ...
8
votes
2
answers
4k
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
votes
1
answer
2k
views
Different physics engines on the client and server sides
I am developing a 2D multiplayer game as follow:
semi-authoritative server
handle up to 40 players per game.
Players and other game objects will interact/collide with each other
Physics like ...
1
vote
1
answer
1k
views
Synchronizing players and game objects in a server/client multiplyer game
OK guys,
I have some experience with 2D game development (single player only), so that's fine no questions here.
The problem is with multiplayer games. I already read lots of other questions and ...
1
vote
1
answer
668
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 ...
2
votes
1
answer
142
views
Best practice/way for client to speak with server
I'm making a multiplayer game in HTML5 Canvas and Node using Express and Socket.io. It's a platformer style game and so far the players are able to see each other and move around on the screen. It ...
2
votes
1
answer
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
1
answer
151
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
2
answers
160
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
2
answers
752
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 ...
2
votes
3
answers
159
views
How to handle "game missions/flights" across the world map
Sorry if my title is a little vague, I wasn't entirely certain how to word this specific question.
I'm developing a small little MMORTS game, and in this game is the world map which consists of ...
1
vote
1
answer
986
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 ...
-3
votes
1
answer
333
views
handling wars in multiplayer browser game [closed]
I'm building a browser game about countries, cities, the user control his city, building it upgrading it, can fight other cities in the same country, elections and war between countries, peace, trade ...
1
vote
1
answer
1k
views
How to use Cocos2dJS to connect to a Socket.IO server?
How can I connect to a nodejs socket.io server from a cocos2djs game? I've google all the way to no avail. I tried this but it ...
0
votes
0
answers
164
views
Fix latency when sending state
I have a multiplayer game done with Phaser, which runs in the browser and on a node.js server.
The server is authoritative, every 50ms or so it sends the game state object to all clients. The clients ...
0
votes
2
answers
869
views
Multiplayer game principles
I am developing game using libGDX libraries . I want to create multiplayer mode , where several players can play at the same time in the same room , each player can create his own room and other ...
0
votes
1
answer
298
views
NodeJS setTimeOut - How to run callback before delay time exceeded
I'm developing a card game server.
I want to do this :
While server process a turn for players, players have 20 seconds to do something. If players send a request to server within 20 secs, timer will ...
0
votes
3
answers
2k
views
nodejs game server timer
I'm new to game server develop.
I'm developing a card game server.
How could I make nodejs server wait for few seconds then push data to client after an event fired ?
Example : in poker game, one ...
0
votes
1
answer
3k
views
Node.js 3D game? [closed]
Would it be suitable for making 3D games in an open world?
Of course provided that I :
create a node add-on in order to bind opengl
code a native layer for making threads and processes
I can almost ...
0
votes
1
answer
1k
views
HTML5 canvas multiplayer game with node.js and Isogenic engine [closed]
I want to create a multiplayer game using Isogenic engine i understand that this technology uses html5 and canvas for rendering graphics in frontend and node.js for backend. I started working on how ...
3
votes
2
answers
2k
views
Can I use Node.js on consoles?
I was wondering if Node.js was suitable for making games and apart from threads and engines, a big problem is can I port my game to Xbox or PS3/PS4?
1
vote
2
answers
218
views
Can various browsers be assumed to maintain predictible state accurately in multiplayer online gaming?
With many games it is said that server will assume that clients keep track of the world accurately. Assuming this is true, for a browser based multiplier space invaders game you would only tell the ...
0
votes
1
answer
632
views
Developing a general use multiplayer API [closed]
I'm tasked with the development of a general use multiplayer API in JavaScript, with a Node.js back-end. The goal of the API is to provide a service to JavaScript mobile game developers so they can ...
1
vote
1
answer
1k
views
Gamemaker multiplayer using 39dll
I am making a gamemaker multiplayer game using 39dll's tcp sockets. As I want to host the server (and my javascript knowledge is a lot better), I use node.js for the server. I have already got ...
6
votes
1
answer
3k
views
How can I run a Phaser engine game without a window?
I'm currently creating a multiplayer game using the HTML5 framework Phaser.
It's a game where zombies spawn on the map and players have to shoot them to kill them. The zombies target players that are ...
1
vote
1
answer
843
views
How do I implement pixel-exact collision server-side?
Recently I made a 2D offline game with HTML5 Canvas and JavaScript. I'm detecting collisions by first checking whether image bounding boxes overlap. If they do, I check against the bounding boxes, ...
1
vote
1
answer
2k
views
Node.js Lockstep Multiplayer Architecture
Background
I'm using the lockstep model for a multiplayer Node.js/Socket.IO game in a client-server architecture. User input (mouse or keypress) is parsed into commands like ...
0
votes
1
answer
548
views
NodeJS sharing variables with Client?
I'm currently developing a HTML5 Canvas Multiplayer Game using NodeJS and Socket.IO. My current setup using a logic loop on the NodeJS Server-end and sending update information to all Clients in this ...
9
votes
2
answers
9k
views
Physics Loop in a NodeJS/Socket.IO Environment
I'm developing a 2D HTML5 Canvas Game, and I am trying to think of the most efficient way to implement a Physics Loop on the server-end of things, running NodeJS and Socket.IO.
The only method I've ...