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
755
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
141
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 ...
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
0
answers
53
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 ...
9
votes
3
answers
13k
views
How can I generate a 2d navigation mesh in a dynamic environment at runtime?
So I've grasped how to use A* for path-finding, and I am able to use it on a grid. However, my game world is huge and I have many enemies moving toward the player, which is a moving target, so a grid ...
2
votes
1
answer
758
views
Collision not working in phaser node multiplayer
I'm writing a tank trouble clone just for fun using phaser and node, so this is my tank instantiation
...
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 ...
0
votes
1
answer
80
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
1
answer
153
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 ...
13
votes
1
answer
15k
views
Multiplayer HTML5, Node.js, Socket.IO [closed]
I trying create simple Multi-player with HTML5 Canvas, JavaScript(too using John Resig simple Inheritance library) and Node.js with Socket.IO.
My client code:
var canvas = document.getElementById('...
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 ...
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?
...
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 ...
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 ...
10
votes
3
answers
4k
views
How often to save player's state in persistent online games?
In online games, people prefer to log on and off whenever they want. Usually, their game achievements are seamlessly saved, on the server. That is not that difficult to achieve, but I am wondering how ...
0
votes
2
answers
200
views
Can a block-chain with embedded shared content stop cheating?
I want to make a game where users create their content and embed it in a block-chain. For example, they have a small x,y grid. In the grid they place objects... After the grid is made they share it ...
7
votes
2
answers
3k
views
Get timing correct with client side prediction
I believe I've got my head round CSP after reading Gabriel Gambetta's blog, Valve article and buildnewgames.com but having an issue understanding the time execution of everything.
So if a player ...
5
votes
2
answers
7k
views
How can I better implement A star algorithm with a very large set of nodes?
I'm making a game with nodejs in which many enemies must converge on the player as the player moves around a relatively open space (right now it is an open field with few obstacles, but eventually ...
5
votes
5
answers
3k
views
How to keep track of players nearby other players in an MMO
I'm confused how to handle the players in my MMO server (using Socket.IO but I think this should apply to any MMO).
Suppose there are 2 players in my server that are far away from eachother. I will ...
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
336
views
Handling Latency in Multiplayer Shoot-em-ups
I had an idea for an architecture, and I was wondering if anyone has implemented something like this or has used AWS or some other service to help?
I thought about using NodeJS + SocketIO to handle ...
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 ...
6
votes
2
answers
4k
views
In Socket.IO, should I use JSON for communication between server and client?
I'm building an MMO with Socket.IO and Node.js. It works quite fast (though I don't have 1000 players yet) but my feeling is that it's not very optimized. JSON is super cool and easy to use within ...
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?
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 ...
7
votes
2
answers
6k
views
Common mistakes when developing a game with Socket.io and Node.js
I am not a game developer by trade but am working on a card game (that is real time, not turn based). I was wondering what the common mistakes are that people make when new to this sort of ...
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 ...
0
votes
1
answer
345
views
How to find and send data about on-screen players to a client in a real-time multiplayer game?
I'm surprised I couldn't find much information on this.
I am making a top-down browser game in which the players see a small section around their player (see the image). Since the player doesn't need ...
1
vote
1
answer
81
views
How to manage server "view" of game board when it is shared by clients?
I'm currently creating a simultaneous turn based card game in which two players play cards in three lanes to determine who wins points in these lanes.
I've been struggling this past week trying to ...
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
0
answers
55
views
How to find the source of a memory leak in a Blockchain + Node.js game
We have been working in a Node.js game, part of a game network, which seems to be working slower and slower as you keep it open, as well as it seems to increase the RAM and CPU usage over time.
We ...
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, ...
0
votes
1
answer
85
views
Trying to understand exactly how the server sends data to the client to prevent malicious actions
I recently started coding a game with one of my friends and he is taking care of the front end and I am doing the back end.
I read many blogs/articles/tutorials on how the back end communicates with ...
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
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 ...
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 ...
1
vote
1
answer
3k
views
Is it sensible to run a Socket.IO setImmediate loop for each connected player?
Instead of a game loop, I want something different: My game does not have much action going on; just moving users over a tile map with correct timers in between.
Since I am using Socket.IO, I want to ...
0
votes
1
answer
141
views
Compare two x and y if they are in a valid range
Today my mind is a little foggy, the right thing was for me to do it the other day, but I will not, I will continue today. XD I need some help to think and find a way that works without bugs.
What I'...
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 ...
0
votes
1
answer
600
views
Node.js/V8 as a Platform for High End Local PC Game Development? [closed]
As a Web/UI dev rapidly expanding into more wide-open generalist territory, the more I learn about how its done in other languages, the more I love JS for architectural and basic messaging/event-...
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 ...
2
votes
2
answers
449
views
Architecture for mixing synchronous and asynchronous program flow to maximize faux real-time yet logical gameplay?
What I am attempting to make is a faux real-time game engine in node.js (taking advantage of the non-blocking I/O). When I say 'faux real-time' what I mean is I want players to interact with the world ...
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
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 ...
0
votes
1
answer
88
views
How can I refer to a recipe defined in one function from elsewhere in my code?
I want to access the variable recipes defined in this code below.
Unfortunately I have to define my recipes inside ...
1
vote
0
answers
60
views
How can I run a Node server on the player's machine?
I'm making a game with Unity. The game's multiplayer server runs on Node, but it's only run on my own machine. How do I bundle Node to my game's installer to install it on my player's machine?
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 ...
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 ...
2
votes
1
answer
3k
views
Multiplayer game with Cocos2d-Javascript and Node.js
It is possible to make a multiplayer browser based game using cocos2d-javascript + node.js? If so, is there any tutorial about that?
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 -
...