• Content count

  • Joined

  • Last visited

About ptotheaul

  • Rank

Recent Profile Visitors

580 profile views
  1. Animate CC exporter

    Hi. I know there has been some discussion about how to export an Animate CC animation for use with Phaser/Pixi on the forums but it all is kind of old so I figured I'd ask to see if there is a new method of doing this. I have a movie clip that has other nested movie clips(each with a timeline animation) that need to be triggered. This is a conversion from Flash and works in createJS but it's really slow and I think would be much better if done with Phaser or Pixi. Also do any of the Phaser IDEs have timeline animators in them? That could also be an option.
  2. Transfer sprite velocity to another sprite

    What I'm doing is really going to be one sprite image that turns into two sprite images. I know there is this: sprite.body.bounce.setTo(1, 1); but I'm wondering if there's already a solution for transferring that bounce energy into two sprites.
  3. I have a sprite that's affected by velocity and gravity. After that sprite is hit I want to swap it with two different sprite but keep the velocity and gravity of the original. The effect I'm going for is like in Fruit Ninja when a fruit is slices and it breaks into two pieces. What is the best way to achieve this?
  4. destroy and reset a State

    I want to remove all of the sprites and groups from and reset the variable of a State. So I go from the 'Game' state to a 'Gameover' state/screen. When go back to the 'Game' state I want to totally start over. Is there a way to do this?
  5. I'm trying to use a dragon bones plug in ( The example is using a single state and to add the character to the game this is used: var sprite = this.dragonBonesPlugin.getArmature("key");; I'm trying to empliment this in a state system where my game is defined with the game variable passed in: var theGame = function(game){ etc. Adding normal sprites works like this: this.screenshot =, 0, 'ss'); But for some reason trying to add the dragon bones animation like this: this.character = this.dragonBonesPlugin.getArmature('key'); is giving me this error 'TypeError: is not a function' Does anyone know what the issue could be? I found this forum which sounds like it has kind of the same issue: I've tried some of the solutions mentioned(like adding 'use strict') but nothing has worked. Any clues? Here is a screen shot of the error info. Could it have something to do with the loading?
  6. I know this might be repetitive but does anyone know where I can find a tutorial on how to make(or codebase) a bubble blaster type game in Phaser? I see a lot of Phaser games based on this so I know it must be out there some where. I've seen other JS tutorials but I hoping for a Phaser specific one.
  7. Game Scaling for a fixed frame size

    I've figured out my question. To scale the game and the assets you use: this.scale.scaleMode = Phaser.ScaleManager.USER_SCALE; this.scale.setUserScale(.7, .7, 0, 0); .7 is a percentage of the original games size. You would just need to calculate the percentage needed to get to 853 x 480.
  8. Game Scaling for a fixed frame size

    I have this exact same question. I have a game that is 1140x710 but I want to scale it down to be 803x500. I've tried: this.scale.setGameSize(803, 500); but this just scales down the container without scaling down any of the assets to the visuals of the game get cut off. How to scale the whole game down proportionally?
  9. setCircle not showing as circle

    I'm using arcade physics to try and set a circle collision. I'm using: game.physics.enable(item, Phaser.Physics.ARCADE); item.body.setCircle(100); but the collision is still based on a rectangle that I can see when debugging. If i change the value in setCircle the size of the rectangle changes but it's still a rectangle. Is there something else I need to do to activate the circle?
  10. Circular Collision

    First of all I'm not sure this is the best way to group element for collision detection but I'm crating CHARACTER elements that contain various sprites that I want to act as one element. I want the different circles(made up of a few sprites) to bounce off of each other. In order to keep all the elements together and since I can't set 'body.setCircle' on a group I'm using the 'circle' sprite for physics and just updating the positions of the other elements to match the x/y of the 'circle' in the bubble.update = function(){}. Is there a better way to do this? My other question is, as I add more CHARACTER's I'd like to add the corresponding 'bubble' sprite to a: game.physics.arcade.collide() so that the 'bubble's bounce off each other. ie game.physics.arcade.collide(bubble1, bubble2, etc) is there a way to do this? CHARACTER _ctor: function() { var character_g =; var s1 = imageLoader.sprite(0, 0, 'Idle.png'); var s2 = imageLoader.sprite(0, 0, 'state1.png'); s2.visible = false; var bubble= imageLoader.sprite(0, 0, circle.png'); game.physics.arcade.enable([bubble]); bubble.body.setCircle(160); bubble.body.collideWorldBounds = true; bubble.body.bounce.set(1); bubble.body.gravity.y = 0; bubble.body.velocity.set(150); character_g.add(s1); character_g.add(s2); character_g.add(over); bubble.update = function(){ s1 .x = bubble.x; s1 .y = bubble.y; s2 .x = bubble.x; s2 .y = bubble.y; } s1.inputEnabled=true;,this); }
  11. I'm creating a group that has a few different image sprites and animations in that group. I use one sprite in the group for the click sprite. What I need to know is how to target the other sprites in the group from the click function. ie: in the below code in 'itemClick' i'd like to set s1 invisible and set s2 visible item_ctor: function() { var item_g =; var s1= imageLoader.sprite(0, 0, 'Idle.png'); var s2= imageLoader.sprite(0, 0, 'state1.png'); s2.visible = false; var over= imageLoader.sprite(0, 0, 'hamster/Bubbles/over.png'); item_g.add(s1); item_g.add(s2); item_g.add(over); s1.inputEnabled=true;,this); }, itemClick: function (sprite, pointer) { console.log("click"); sprite.visible = false; -> THIS WORKS HOW WOULD I TARGET s2 FROM HERE? },
  12. Psudo 3D(2.5D?) Projectile motion

    I'm trying to simulate a ball coming at the screen with a projectile motion arc in 2d space. Does anyone know where there is a tutorial or equations to deal with this. I would image the equation would need to take in the vertical and horizontal angles of the projectile as well as it' initial velocity and the desired start and end scale of the projectile. Any ideas?
  13. Group scale?

    I have a problem. I can scale a group but the bounding rectangles of the groups children do not scale proportional to the group scale. Is there an easy way to do this? I've seen people post that they loop through and reset the body dimensions for the children but it seems like there should be an easier way.
  14. Group scale & body scale

    I wanted to reopen this issue because I'm creating a 2.5D game and having the same issue. Is looping through and resetting the body size really the best option?