Yet-another Multiplayer Demo (with capx)

0 favourites
From the Asset Store
Simple yet very life-like rag doll made with Physics!
  • keep up the good work!!! :D

  • I wonder about Node.js, i doubt how to install node.js on shared web hosting

    Joannesalfa

    Installing node.js on shared web hosting is possible - it depends on whether your hosting company allows you command line/shell/terminal/telnet access.

  • > I wonder about Node.js, i doubt how to install node.js on shared web hosting

    Joannesalfa

    Installing node.js on shared web hosting is possible - it depends on whether your hosting company allows you command line/shell/terminal/telnet access.

    Thanks, i will ask some web hosting companies if they let me to install Node.js before to purchase the plan.

  • "...I am trusting that the clients are synchronized enough that if a bullet hits a player in one client, the same bullet will hit it in the other client because the bullet was created with the same position and velocity in all the clients..."

    I'm not sure why this bullet will "synchronized enough".

    Since this bullet is moved by "dt" and fps in each client could not be the same at all time, dt will be different. So that the moving point will be different. This different might be broken the synchronize.

  • rexrainbow : in my tests and for this simple game, the syncronization was good enough. If there was a lapse, it was very little. However, I do understand your concern. Some games woould designate one of the clients or the server itself as the authority in deciding if an event was true or not. In this case, one of the clients or the server, could decide if the bullet really hit a player or not. If it did, it could send a message to the other players telling them that a hit was made.

    It really depends on how you design your game what trade offs you want to take (the more messages, the more traffic that will need to travel over the wire)

  • Which version of node you used??? I have the 6.16 but i have installation problems with the socket io. I tried to install it on C:\ with all the privileges but it shows me a message like "try to exectute being root/administrator" when i install it elsewhere it points me another error.

    What can i do???!!! I�m going for an older version of node or is this wrong??

    THANK YOU!!!

  • j1k : try installing node.js in the default folder. After it is installed, open the CMD, cd to C:\node_modules (create that folder is not present) and run the "npm install socket.io" from there.

  • npm ERR! Error: EPERM, mkdir 'C:\'

    npm ERR!

    npm ERR! Please try running this command again as root/Administrator.

    npm ERR!

    npm ERR! System Windows_NT 6.1.7601

    npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod

    ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "socket.io"

    npm ERR! cwd C:\node_modules

    npm ERR! node -v v0.6.16

    npm ERR! npm -v 1.1.19

    npm ERR! path C:npm ERR! code EPERM

    npm ERR! message EPERM, mkdir 'C:\'

    npm ERR! errno {}

    npm ERR!

    npm ERR! Additional logging details can be found in:

    npm ERR!     C:\node_modules\npm-debug.log

    npm not ok

    That?s the message that shows me but in fact i?m loged as administrator and i?m running the cmd as admin and i have all the privileges to the node_modules.

    What can i do???

  • j1k i just downloaded the latest version of node.js and i am getting the same error with npm. I think npm install is broken for windows in this version. The only thing i can suggest is to try a previous version (like a month ago) of node.js if you can find one.

  • thx for the great plugin...I have 1 question though on my lan its working (i mean updating) but other people can see them updating..am I doing something wrong? also am running node.js and socket.io on the same server as apache (xampp) you can test it here [hide]http://70.24.232.115/test/[/hide]

  • B10KILLER : do you mean thst people connecting inside your lan do see your updates, but people connecting from the internet (outside your lan) can't see the updates? If so, it might be that your router is blocking connections to the port you are using for node.js.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • j1k I just downloaded and installed v0.6.18 of node.js few days ago and installed socket.io without any problem.

  • yeah sorry I didnt check the server.js to understand how it works lol my bad..it works now

  • Hi !!

    I followed your excellent instructions, and in 10 mins I have a Construct 2 Multiplayer game running across my LAN! This is simply amazing - I can't thank you, Zacko, and everyone else involved enough for making this possible! Good work guys - the C2 community continues to absolutely astound me on a regular basis with incredible innovation and creativity :D

  • This is great stuff Juantar.

    Would you be willing to show how to incorporate "Rooms" with SocketIO.

    See here(SocketIO Readme):

    ### Rooms

    Sometimes you want to put certain sockets in the same room, so that it's easy to broadcast to all of them together.

    Think of this as built-in channels for sockets. Sockets `join` and `leave` rooms in each socket.

    #### Server side

    js

    var io = require('socket.io').listen(80);

    io.sockets.on('connection', function (socket) {

    socket.join('justin bieber fans');

    socket.broadcast.to('justin bieber fans').emit('new fan');

    io.sockets.in('rammstein fans').emit('new non-fan');

    });

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)