Jump to content

kurhlaa

Members
  • Content Count

    157
  • Joined

  • Last visited

  • Days Won

    1

kurhlaa last won the day on October 23 2019

kurhlaa had the most liked content!

About kurhlaa

  • Rank
    Advanced Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. @b10b, what do you mean by "Then have each client be deterministic (bullets need only exist here)" ?
  2. @b10b, at the moment I already send a weapon's "fire" event itself, not the position of every single bullet at every frame. I also wish to avoid sending identical "fire" websocket messages tens of times per second from every player. So I'm interested to know how other projects deal with syncing every bullet. About feeling that it's "good" - agree.
  3. Hi, I have a strategical question. Imagine a standard multiplayer shooter. What are the ways to broadcast and sync the shooting events? I ask because I'm confused by the weapons like automatic rifles - they shoot many times per second, or can fire just 1 bullet, it depends on how long you press the mouse button down. If in a match there are 20 players, all of them have rifles and shoot constantly - does this mean, that each player sends tens of websocket messages every second, which means the server side broadcasts hundreds of them every second? And if there are hundreds of parallel
  4. Update: if I play a test long audio in a background - freezes disappear. Could it be that sound manager initializes something all the time, what can/should be done only once?
  5. Hello, I try to play multiple short sound files. The problem is that it looks like sound files are not being played from cache - when I replay the sound which wasn't played for some seconds I see a noticeable screen freezing, like lag. It feels like JavaScript removes it from cache after 1-2 seconds and then reads/loads the file again on replay. I tried to play sounds with 2 methods: 1. directly: this.sound.play("soundname"); 2. from the instance: var music = this.sound.add('soundname'); ... // After some delay during the game music.play(); but result is the
  6. What do I do if I have multiple players, they all can move and collide - but shouldn't be able to push each other? I can't set immovable for everybody, because then collisions do not work. I wish there is a physics switch in Phaser to disable energy exchanging, so when 2 objects collide - the second one doesn't feel that
  7. Can you please check this new example? I'm still doing something wrong, the wall is still moving. I see that during the collision touching.* is sometimes false. I've added collider instead of calling collide() manually and added checking for touch.left & touch.right .. var config = { type: Phaser.AUTO, parent: 'phaser-example', backgroundColor: '#0072bc', physics: { default: 'arcade', arcade: { debug: true } }, scene: { preload: preload, create: create, update: update } }; var cursors; var pla
  8. Hello, If I add lights to the scene with something like: this.lights.enable().setAmbientColor(0x555555); .. then enable lighting the needed objects with: object.setPipeline('Light2D'); Then later I wish to disable all scene lights (with being able to enable later again). I try with: this.lights.disable(); But this makes all light enabled objects invisible. Probably this is because pipeline is set to every object. The question of course is - how to just turn off lights globally, like in real world, so all images stay visible (just with default normal colors)?
  9. Simple modified version of labs example: var config = { type: Phaser.AUTO, parent: 'phaser-example', backgroundColor: '#0072bc', physics: { default: 'arcade', arcade: { debug: true } }, scene: { preload: preload, create: create, update: update } }; var cursors; var player; var game = new Phaser.Game(config); function preload () { this.load.image('block', 'assets/sprites/block.png'); this.load.image('flectrum', 'assets/sprites/flectrum.png'); } function create () { cursors = this.input.ke
  10. In my case both objects are able to move in general, not immovable. They can move, they can stop. I wish to disable "pushing". So both objects can move, collide, but can't push/affect each other
  11. Hello, In Arcade physics, if you move towards the other object - after the collision this object moves, so it's like you are pushing it. How to prevent pushing completely? I wish player stops after the collision completely (in collision direction only, X axis for example) and the other object does not move at all. (Player should be able to move in other directions of course). I've tried to manipulate "moves", "immovable", "isMoving", "blocked", "touching" params of both bodies, but no luck. Probably there is a special magic combination of them or other setting I haven't n
  12. Hello, I've modified a little one labs example (first game). I have 1 ground platform and all stars falling on it, and a player. Plus collisions between everything, even between stars themselves. Player initially is in the middle of the screen and stars. If I move to the right - stars are moving, hitting each one and all joining the line; so you hit 1 and move it, then 2'nd star joins, then 3'rd, 4'th and so on. That's correct, you get all stars in a line next to each other. The issue appears when you move to the left - I'm able to join only 2 stars - all other acts like physics
  13. According to the source code - function group.add() expects GameObject as param only, not groups or anything else. child.on tries to add an event listener for the GameObject, and probably there is no such functionality for the groups
  14. @blackhawx, the question is not about a delay my timeout is just to simulate an action which happens later. How will you set a "delay" if you don't know when user will press the button? Why 1000 and not 13729 ? And I need exactly this - move an object when a needed event happens, immediately. There shouldn't be a delay inside a tween itself. The question is how to move an object to the needed position.
  15. @blackhawx, thanks for links, I've tried searching and tween.updateTo should do what I need. But why this code sample doesn't work? var config = { type: Phaser.WEBGL, width: 800, height: 600, backgroundColor: '#2d2d2d', parent: 'phaser-example', scene: { preload: preload, create: create, update: update } }; var tween; var game = new Phaser.Game(config); function preload () { this.load.image('block', 'assets/sprites/block.png'); } function create () { var image = this.add.image(100, 300, 'block'); tween = this.tweens.add({
×
×
  • Create New...