Search the Community

Showing results for tags 'move'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Platform
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





Found 35 results

  1. Super newb here again with a pretty basic question. i managed to spawn a group and thanks to a mod post I figured out that easing does not play well with physics so I set the body.move to false and case ease from one spot to another. I then tried to create a zig-zag pattern with easing in chunks: tween = game.add.tween(enemies.getAt(1)).to( { x:enemies.getAt(1).x-20, y:enemies.getAt(1).y+20}, 2400, Phaser.Easing.Circular.In, true);tween = game.add.tween(enemies.getAt(1)).to( { x:enemies.getAt(1).x-20, y:enemies.getAt(1).y-20}, 2400, Phaser.Easing.Circular.In, true);tween = game.add.tween(enemies.getAt(1)).to( { x:enemies.getAt(1).x-20, y:enemies.getAt(1).y+20}, 2400, Phaser.Easing.Circular.In, true);tween = game.add.tween(enemies.getAt(1)).to( { x:enemies.getAt(1).x-20, y:enemies.getAt(1).y-20}, 2400, Phaser.Easing.Circular.In, true);However, it does not execute after the first one. I am wondering if there is an easier way to create a movement pattern for an arc or a circle (or an equally/more difficult one that works). Any help would be appreciated.
  2. I'm getting a frame drop while moving two grounds created from height map. With Intel HD 4000 I have around 40 fps and with Adreno 330 (smartphone) I have 20 fps. I've created a simple example based on the height map tutorial. I've just added an additional ground object and ground movement and still getting this frame drop. The frame drop is not so drastic as in my own project but it still exists. With Intel HD 4000 I have 50 fps and with Adreno 330 I have 40 fps. Anyone have any idea why is this happening and how it may be fixed? I have tried to reduce the amount of subdivisions, it increases the frame rate but only a bit. The example is attached.
  3. Hi all, I've come across a problem with groups and P2 bodies. Basically, I have a group, to which I add a Sprite with a P2.Body. So when I move my group, the sprite is actually moving with it, but its body does not budge an inch. Is there a fix to this? Cheers
  4. How do I desired deceleration of the object in motion? Suppose when the object is in the water acts on it slowing. I tried to do velocity * 0.99. Slowing down there, but got out a lot of bugs. Now do so:this.obj.rotation = game.physics.arcade.moveToXY(this.obj, this.pointer.x, this.pointer.y, this.speed, 200);How do I make braking object? I've already rummaged
  5. Hello all, trying to move player to an array value, anyone got any advice on how I can do this? Thanks in advance The player movement is based on a dice roll total for a Snakes and Ladders game. So not trying to move the player at x,96 just want to place the sprite at location 4 if dice total is 4 etc. if(player.moved) { //move player to new pos console.log("The player needs to be moved " + player.moved + " by this many places: " + player.number); player.position += player.number; var location = new Array (100); //first row (Right to Left) location[1] = player.position.x=0,player.position.y=864; location[1] = serverPlayer.position.x=0,serverPlayer.position.y=864; location[2] = player.position.x=96,player.position.y=864; location[2] = serverPlayer.position.x=96,serverPlayer.position.y=864; location[3] = player.position.x=192,player.position.y=864; location[3] = serverPlayer.position.x=192,serverPlayer.position.y=864;
  6. Hi! I'm trying to do a shop with a catalog of items. Currently the items are text. There is a list of items I want to be in a container. To display all items in the list I have a scroll with an arrow to up and one down. The problem is this., Gotta keep the items inside the container. For example, if I press the down arrow on the scroll the first item leaves the container. Is there any way to keep items inside the container? A greeting.
  7. Hey so i moved away from the gameControler.js So instead i tried this. lftButton = game.add.button(0, 300, 'button', actionMoveLeft, this, 2, 1, 0); rhtButton = game.add.button(200, 300, 'button', actionMoveRight, this, 2, 1, 0); //but i know that it has to keep update alive cause when you only use this you have to press the button like crazy to make the player move. tried too add an extra pointer, and then check for active input and so on but still no good came from it. So please any better solutions too this would be awesome thanks! function actionMoveLeft() { player.body.velocity.x -= 900;'left');}function actionMoveRight() { player.body.velocity.x += 900;'left');}-Learning
  8. Hi! I have a sprite scaled.this.player.scale.setTo(0.7, 0.7); When the sprite is moving does rare things. It doesn't move correctly. But if the sprite is scaled 0.5 0.5 is moved perfectly. What I doing bad?
  9. Hello everyone! I'm creating a Tetris style game where I want my blocks to fall at ~16 pixels every 10 frames. You can see something similar here: (gameplay video of Tetris) I was curious how I could emulate this within Phaser. I'm familiar with other game engines where there's a delta time variable (Cocos2D-iphone, Cocos2D-x) and the concept of removing that is completely new to me. Thank you for your time.
  10. If I do this: h = game.add.sprite(0,0, "hospital");h.x = 49900 - h.width;h.y = findGround(h.x + h.width) - h.height + hospitalOffset * 0.5; The sprite will display at 0,0 (top-left of the screen... ignoring the camera location) as a brief flicker before moving to the correct location.I'm guessing this is down to some precalculated transforms which aren't updated by the x,y setters.What function should I call to recalculate the transform to prevent this flicker? (Notice that I can't position it directly because I need the width and height of the sprite which aren't available until after it's been created)