Imperial
Member
Hello Everyone
Is there a guide/tutorial on making/writing a NodeJs Server to add Networking to the game ?
Here's the NodeJs I have so far
so as you can see I'm using the socket.write function to send data to the game maker client
but the Issue I don't want to always send data using string
using the buffer_read(buff,buffer_string);
so Is there any solution
and no I'm not going to use Shocknet https://marketplace.yoyogames.com/assets/6962/shocknet-node-js-multiplayer
Is there a guide/tutorial on making/writing a NodeJs Server to add Networking to the game ?
Here's the NodeJs I have so far
Code:
var net = require("net");
var port = 3000;
var server = net.createServer();
server.on("connection",function(socket)
{
var addr = socket.remoteAddress;
console.log("New Connection: " + addr);
socket.write("spawn");
socket.on("data",function(data)
{
console.log("data: " + data);
});
socket.once("closed",function()
{
console.log("Player Disconnected: " + addr);
});
});
server.listen(port,function()
{
console.log("The Server has been Started");
});
but the Issue I don't want to always send data using string
using the buffer_read(buff,buffer_string);
so Is there any solution
and no I'm not going to use Shocknet https://marketplace.yoyogames.com/assets/6962/shocknet-node-js-multiplayer