• Content Count

  • Joined

  • Last visited

Everything posted by GamerWael

  1. When I follow the authoritative multiplayer tutorial here: Everything works fine except the setDrag which has no effect whatsoever, and even the collideWorldBounds doesn’t work which I added by myself. function addPlayer(self, playerInfo) { const player = self.physics.add.image(playerInfo.x, playerInfo.y, 'ship').setOrigin(0.5, 0.5).setDisplaySize(53, 40); player.setDrag(100); player.body.collideWorldBounds(true); player.setAngularDrag(100); player.setMaxVelocity(200); player.playerId = playerInfo.playerId; self.players.add(player); } The client sends an input request, on the server phaser is running in headless mode and applies velocity based on the input received and then sends the new position back to the client(This happens every frame). setDrag is also on the server side.
  2. I want to build a top down, twin stick shooter and I wanted some help in figuring out the best way to implement it. There will be other buttons on screen as well. A static joystick is fine, no need of a dynamic one. I have tried out the vjoy plugin, but I didn't find it good enough as it only had events for up, down, left and right. I want more specific information. Should I just use pointers or is there a way to implement nippplejs, or is there a better option?
  3. I have tried to implement a simple nipplejs joystick on playcanvas(engine only version) as well as threejs but the joystick isn't showing up even in static mode. I'm sure I'm instantiating it properly as I have tried it on anothe div on the same page and it works, but it doesn't work on the canvas. <canvas id="application"></canvas> <script> //Game code var options = { zone:document.getElementById("application"), color: "white", size: 100, threshold: 0.1, fadeTime: 0, multitouch: false, maxNumberOfNipples: 1, dataOnly: false, position: {bottom: "100px", left: "100px"}, mode: "static", restJoystick: true, restOpacity: 0.5, lockX: false, lockY: false, catchDistance: 200, dynamicPage: true, }; var manager = nipplejs.create(options);
  4. Hi, I need some help deciding which is the best 3D web game framework. I'm looking for something that has good mobile support native touch/virtual joystick support preferably. I have worked with playcanvas but there's no good mobile fps example, most of them use a secondary joy stick for camera control and it runs on very low fps on my device ( ), although it has quite a lot of examples for pc FPS games. I really like playcanvas so if anyone has any examples/templates/ideas to help me make it mobile friendly that would be appreciated. Does anyone have any suggestions or frameworks?