• Content Count

  • Joined

  • Last visited

About nobody

  • Rank

Recent Profile Visitors

746 profile views
  1. I also have 3 layers, 64x64 tileset size. Sometimes it laggs and its unplayable, then it works alright again (high end pc, ubuntu). That demo you references is really unbearable slow.
  2. Already identified some bugs, and fixed them. - fix zombie also follows death players (and then they stack on his poor corps)- fix crash when sending data to a closed socket- fix crash when a lot of blood effects is happening- fix chat- implemented auto-restart for the server, if something strange is happening again
  3. I created a realtime multiplayer top-down shooter, with zombies. Inspiration is basically, but it's similar to CounterStrike2D, and now moving to be more like Killing Floor. So it started as PvP game, but with Zombies it can be PvE. URL: The hardest part was to implement proper client-server synchronization, and the collision detection on the server. Creating the UI in Phaser was easy and simple, i had a lot of fun! I started in November 2015 as a side project, some hours here and there in the evenings. Currently most of the expected functionality is working. But all the game balancing has not been performed yet, but its possible to play and have some fun :-). Feedback is very welcome. But it will probably crash a lot ;-) Features: - Shoot bullets - Shoot grenades (AoE) - Create an unwalkable barrier at a specific location - Buffs: Movement speed, attack speed, invisibility - Powerups: ATM just health - Zombies: ATM just follow-closest-player logic - In-game chat (toggle with "T") How to play: - WASD/keypad for movement - Left mouse button for shooting - Key 1: Barrier - Key 2: Grenade - Key 3: Movement Speed buff - Key 4: Attack speed buff - Key 5: invisibility Technology: - Phaser on client - NodeJS as server - Websockets for communication - I ported Phaser arcade to NodeJS to have sane collision and collision detection - Pathfinding with easystar.js Story: A land far away was rich with powerful mages. But their king decided to put them all into a prison. After several years of being imprisoned and tortured, suddenly a revolution happened, and the mages fled the prison. Gone mad because of the inhuman treatment in the dark cellars, the mages all went on a killing spree in the city, shooting at everything they encounter. Strangely most of confrontation are with beings which are already dead, but still moving, and search for living flesh. Is there a connection between these events? (Who cares, the only thing which matters is to be #1 on the server!) Screenshot:
  4. For me and with Arcade, it's good enough to just make sprite.body.position += 100. Seems to be no need to update sprite position, or wait for the next update() and re-enable the body.
  5. Try: - Use CANVAS and not AUTO (WebGL is slow in Firefox) Note that Phaser uses physicstime and not the real time to render things. If for example firefox is loading another tab, the animation will stutter.
  6. Your eurecaServer.exports.handleKeys sends the keys input to all connected clients, and not to the origin one.
  7. Some tipps: - Use canvas (WebGL is very slow on FF) - Try removing all debug calls, especially text - make sure that your update() loop does not do a lot of computation - press F12 in chrome, click profiles, and record a bit while moving, and check if something "out of the ordinary" appears
  8. Fixes: Both in Arcade and P2 it's possible to manually move the body each update with time.elapsed (not using velocity, but doing body.x += distance). time.elapsed is a wall-clock time, therefore the bodies really move 100px in a wall-clock second. Attention: In Arcade, the collision detection has to be performed AFTER the movement of the body, in the update() function. The other way round does not work. e.g: update() { if (leftKeyPress) { sprite.body.x += movePixelPersecond * game.time.timeElapsed / 1000; } ... // this HAS to be after sprite.body movement. game.physics.arcade.collide(sprite, otherstuff); } Other remarks: Using P2 in Phaser just to perform collision detection with sensors seems to be fsckd. Sensors seems to not really work. Also: move everything with sprite.body.x, not sprite.x
  9. My example: - Press enter to move spaceship for 3 seconds. Output in JS console - Or: Move with keys, collision detection still works ATM with chrome+ff i get reliable x=713, instead of x=800. Its possible to manually update x/y of the object, but ofc its kind of a joke to have a library like Phaser, and then manually update the position of its objects.
  10. Update: Yeah, patching it to use game.time.time makes the objects behave much like expected (traveling 600px or 603px in 3 seconds, and not like 540 or 583, with velocity=200). At least in my simple test program. Just using " = true;" does not do the trick i'm afraid.
  11. Thanks for your answer :-). I also found this option, but, according to: This options does: And physicsElapsed: So imho it does not really fix my problem (?). I could patch phaser source like this, but i dont know if it catastrophically breaks stuff? Edit: Niceness
  12. I create a multiplayer game, where i expect that when a body has a velocity of 100px/s, and it moves for 3 (realtime) seconds, that it will have moved ~300px. With arcade and P2 physics, if there is any lag (framerate is not 60fps?), the above is not guaranteed. E.g. after 3 (realtime) seconds, the object only moved ~250px (in some situations). Is it possible to tell the physics system to "catch up", e.g. to do a physicsUpdate(timeSinceLastFrame), instead of physicsUpdate(1/60)?