bbmario Posted April 23, 2015 Share Posted April 23, 2015 Is there any examples lying around about building multiplayer games with Babylon? Maybe just a moving cube, where players can connect and move it around. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted April 24, 2015 Share Posted April 24, 2015 Hello, I create a server here. this can be a beginning for multiplayer http://www.html5gamedevs.com/topic/12321-create-a-cluster-server-with-nodejs-and-socketio/?p=70965 Quote Link to comment Share on other sites More sharing options...
Jaskar Posted April 26, 2015 Share Posted April 26, 2015 Hi ! Take a look at : https://github.com/Jaskar/BabylonJS-Multiplayer-ExempleI just upload it.It works with nwjs & some modules (socket.io, path, express) Steps :Download NodeWebkit at http://nwjs.io/Add modules socket.io, path, express (I let you search on the web how to do that)Download my github repoAdd the package.json, serving and www folders to nwjs folder.Click on nw.exeThen, click on the button "open the server"Ready to play ? Launch a browser and connect to 'localhost' (verify that wamp is not running). You can run as many browser as you want. Each time a new player will spawn. The only limitation is your graphic card. WARNING : This code is just a stack of personnal test, and the code may be not commented or in french. So, you can take a look but at your own risk If you need some explanation, I'm sitting here Quote Link to comment Share on other sites More sharing options...
kru64 Posted April 26, 2015 Share Posted April 26, 2015 Jascar, excellent example! Jaskar 1 Quote Link to comment Share on other sites More sharing options...
Jaskar Posted April 27, 2015 Share Posted April 27, 2015 Hey,Thanks @kru64 !@bbmario : Let me know if you have troubles or if it works correctly.PS : Oops, I mispelled example in the github repo (french spell) Quote Link to comment Share on other sites More sharing options...
aWeirdo Posted December 25, 2015 Share Posted December 25, 2015 Sorry for Bumping an old thread,I was playing around with your example, Jaskar, and upon trying to add a simple grass texture to the ground, it refuses to load it.. Instead of grabing it from the path i provided, "./../textures/grass.png" it tries to GET/ it from http://127.0.0.1/textures/grass.pngand gives 404 error. cheers. EDIT(fix):express.static wasn't set,In case anyone else needs this,navigate to \www\js\app_get.js and add: app.use(express.static(dirName + '/serving')); Quote Link to comment Share on other sites More sharing options...
Nikos123 Posted December 27, 2015 Share Posted December 27, 2015 The next stage to my RTC game will be to build multiplayer on top of WebRTC. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.