Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by bombe93

  1. Ok i tried but but with your changes gives me this error (client side): WebSocket connection to 'ws://serverip:9520/socket.io/?EIO=3&transport=websocket&sid=YcKquHdjmXK1_nLoAAAA' failed: Connection closed before receiving a handshake response
  2. I tried but gives me an error: Cannot find module 'socket.io/lib/sores/redis'. I think you are using an older version of socket.io.
  3. Ok. yes it seems to work perfectly! I tried with your changes but gives me an error: http://s23.postimg.org/tixearg3f/Cattura2.png I think that the module "redis" there isn't in the socket.io but there is this: https://www.npmjs.com/package/socket.io-redis
  4. Ok but without 'ent' gives me this error (i think javascript or socket.io) https://github.com/Automattic/socket.io/issues/1989 I used this https://github.com/evilstudios/chat-example-cluster/blob/master/index.js There was an error with cluster.
  5. Ok it all works but I have a problem. Passing an object as a variable( example pickInfo) in the server side gives me an error(using ent.encode(objet). Without ent.encode() gives me this error(maybe javascript/socket.io): https://github.com/Automattic/socket.io/issues/1989 if anyone knows what is wrong or if there's another way to pass objects let me know, thanks.
  6. I used the address of the server instead of localhost because the client files are run on another PC that is not the server. ( is only an expample of server ip instead of localhost) ---------------------------------- Maybe is a problem with Cluster? (https://github.com/Unitech/pm2/issues/81) RedisStore is a bit different (https://github.com/Automattic/socket.io/wiki/Migrating-to-1.0#redisstore-changes) -------------------------------- it seems that I have solved: https://github.com/evilstudios/chat-example-cluster
  7. For example, even if I do not open the web page where run the ws command sometimes appears to me also "Connected to worker: 2". I believe that it should not do it if I do not open the page, right? --------------------------- Yes, but i always use not localhost but the ip of the server and the port like is right?
  8. Ok, i run in 8520 port. I tried several times and it seems that sometimes connects and sometimes it fails. I can't understand what is the problem
  9. Yes socket.io is installed. I checked if the port is open with the site (http://www.yougetsignal.com/tools/open-ports/) and it results open.
  10. Yes i installed redis (sudo apt-get install redis-server). If i write redis-server in command line this is the response (http://s15.postimg.org/kjrj6zosr/image.png). The path "RedisStore = require('socket.io/lib/stores/redis')," gives me an error (http://s9.postimg.org/d9lam45n3/image.png). Therefore i installed "npm install socket.io-redis --save" and changed this code: RedisStore = require('socket.io/lib/stores/redis'), redis = require('socket.io/node_modules/redis'); in this:RedisStore = require('socket.io-redis'), redis = require('redis'); but gives me this error: "
  11. I have a problem: RedisStore = require('socket.io/lib/stores/redis'),redis = require('socket.io/node_modules/redis'); RedisStore does not exist. I installed redis but the path is "root/node_modules/redis". Why use the path socket.io? This is the right solution? (http://stackoverflow.com/questions/23952640/migrating-socket-io-from-0-9-x-to-1-x-problems-with-configuring-redisstore) --------------------Returns many times this error "WebSocket connection to 'ws://MyIp:8520/socket.io/?EIO=3&transport=websocket&sid=HsbslLeePELkFMehAAAA' failed: Connection closed before receiving a h
  12. Ok I'm trying node js and I see that there are several plugins or extensions. I am using Express (http://expressjs.com/) and to save variables (like position of object in Babylon scene) I think these things are available(http://expressjs.com/guide/database-integration.html). So the questions are, which one is best? Is it okay this plugin or another? Thanks
  13. thanks for the answers, other suggestions? other frameworks?
  14. Yes, I was wondering if you can create it with Babylon Js.
  15. Hi, I'ts possible to create a multiplayer game with Babylon JS? Maybe adding node js is possible? (example fps multiplayer, racing game)
  16. I solved! The problem is that the function _initCamera is private so I had to create a new variable scene(in this way the cam works, "var camera = cam;"): _initCamera : function() { var cam = new BABYLON.FreeCamera("camera", this.spawnPoint, this.scene); cam.attachControl(this.scene.getEngine().getRenderingCanvas()); cam.ellipsoid = new BABYLON.Vector3(2, this.height, 2); cam.checkCollisions = true; cam.applyGravity = true; var sceneJump = this.scene; window.addEventListener("keyup", onKeyUp, false); fu
  17. it's what I think! The code does not wrote it, but I'm trying to improve it by adding new things(like jump). I think there are 2 cameras, one for player and the other for the minimap. Here is the link: https://github.com/Bombe93/Babylon-test
  18. In this way does not give me any error but nothing happens UPDATE: "onKeyUp" function does not work if I try to pass variables (like camera). I think gives me this error because it seems to be an isolated function and therefore does not take the variables that I need as the camera. (the jump function is at 114 line number) /** * A player is represented by a box and a free camera. * @param scene * @param game * @param spawnPoint The spawning point of the player * @constructor */Player = function(game, spawnPoint) { if (!spawnPoint) { spawnPoint = new BABYLON.Vector3(
  19. Now gives me this error "Uncaught TypeError: Cannot set property 'animations' of undefined" in this line "camera.animations = []; "
  • Create New...