Theorems

Members
  • Content Count

    6
  • Joined

  • Last visited

  1. Theorems

    Phaser movement "vibrates" issue

    Ok I sort of figured out the problem and it has to do with my server not so much phaser. I assume the issue is starting when a packet gets lost. The client sends the server a packet of where it is currently, meanwhile the server sends the client a packet of where it thinks it should be. The client gets moved to the server's packet but meanwhile, the client's packet with the old position gets sent back to the server causing a loop between the last 2 moves causing the sprite to vibrate. I basically need to rethink how I am doing the client-server relationship to fix this I think.
  2. Threaten legal action and hopefully, the threat will be enough.
  3. Theorems

    Phaser movement "vibrates" issue

    Hello, I just started learning phaser and websockets a few days ago and I am having troubles getting smooth movement when sending positions through a websocket. Every 20 milliseconds I send a packet to the client from my server with an array of all the players and their angles and coordinates. and everytime the update() method in the client is called I send a packet to the server with that client's updated values. I am currently using this to move my players (this bit of code is in the games update method): if(serverPacket != null){ serverPacket.forEach(function(player){ if(game.playerMap[player.id] != null){ game.playerMap[player.id].body.x = player.x; game.playerMap[player.id].body.y = player.y; game.playerMap[player.id].angle = player.angle; } }); and it works well other than the fact that the player sort of vibrates while moving. I can easily copy paste an example of code and get smooth movement when I don't need to be sending the coordinates over a websocket but I can't seem to figure out how to make this work without the ugly vibrations when using socket.io... (also the angle movement is nice and smooth - moving the x&y is what causes vibrations) Thanks for any help!
  4. Theorems

    2D Virtual world game in Phaser

    Yes of course, you will need to use something like node.js for the server and something like socket.io to send data between clients
  5. Thanks for the answer! ill try making a few simple phaser games to test it out.
  6. Hi, I am looking to eventually make a multiplayer online game similar to Realm of the Mad God. I am good with javascript but have not yet learned any game engines or libraries and have just used the canvas. What should I learn to make a game like rotmg? Looking at phaser I have a feeling it would be better to make my own game engine for canvas in the long run to have it fully customizable and multilplayer but I don't have experience with any engines so I dont know. Any advice is appreciated, thanks.