Jump to content

Please help test Phaser 1.2


rich
 Share

Recommended Posts

OK I'm trying to port my game (working on 1.1.6) to Phaser 1.2.

 

I got an error with the minified version, so in order to make sure it wasn't solved I downloaded the whole code and minified it with grunt. Got the same error.

 

When opening my game in Chrome, I get a black screen and this error:

 

Uncaught ReferenceError: game is not defined phaser.js:53571

 

The line it is pointing at, is Phaser.Utils.Debug, boot function, and reads:

this.textureFrame = new Phaser.Frame(0, 0, 0, this.game.width, this.game.height, 'debug', game.rnd.uuid());

It seems like the last parameter should be this.game.rnd.uuid(). As soon as I changed that I get past that error to the load screen where it crashes a bitmapText error, but I guess that's because I need to adapt my game to the new version.

Link to comment
Share on other sites

Because you moved the quadtree this line is not working anymore, if I activate acade physics.

this.quadTree = new Phaser.Physics.Arcade.QuadTree(this, this.game.world.bounds.x, this.game.world.bounds.y, this.game.world.bounds.width, this.game.world.bounds.height, this.maxObjects, this.maxLevels);

I changed it to "new Phaser.QuadTree" but then get an error again, if I try to set collision between sprite and group (in collideSpriteVsGroup function):

 

Line:

this.quadTree.populate(group);

Error: Uncaught TypeError: Object #<Object> has no method 'populate'

Link to comment
Share on other sites

I have a game with around 48 sprites constantly entering and leaving the screen. In order to avoid instancing a sprite object everytime one of the game elements leaves and enters, I reuse them all the time. 

Long story is detailed in this thread, short story is I could not find a way to rewrite the sprite animations when they are used again, so I had to load every possible animation for every type of game object on game start. This means 48 sprites, with around 50 animations each one of them, way more than 2.000 animations being loaded on game start. 

In previous versions this took some time loading on slow CPU's (could maybe take up to 2 seconds on my smartphone), but loaded fast on my desktop computer (i5 2500K @ 3Ghz). 

When porting to version 1.2 I have noticed it takes a lot more time to do this load on my computer. Sometimes even up to 30 seconds on my PC, which makes it virtually unplayable on any slower device.

 

 

 

 

EDIT: Just forget about this. Apparently Phaser 1.2 outputs Animation objects to console log everytime one of them is created. Chrome parses the objects logged in console, and that was causing the huge CPU load. With console disabled it loads just as fine as previous versions did.

Link to comment
Share on other sites

Uncaught TypeError: undefined is not a function phaser.js:55183

 

had to change this

 

// this.quadTree = new Phaser.Physics.Arcade.QuadTree(this, this.game.world.bounds.x, this.game.world.bounds.y, this.game.world.bounds.width, this.game.world.bounds.height, this.maxObjects, this.maxLevels);

 

to this =>

 

this.quadTree = new Phaser.QuadTree(this, this.game.world.bounds.x, this.game.world.bounds.y, this.game.world.bounds.width, this.game.world.bounds.height, this.maxObjects, this.maxLevels);

 

in order to get it working...

Link to comment
Share on other sites

Just made transition to 1.2 version. Perfomance on mobile is amazing! I have replaced all Phaser.Sprites for Images and got x2 fps boost. Thanks a lot Rich!

Now I'm gonna help with typescript definitions.

Link to comment
Share on other sites

Hi all,

 

Ok I'm back after a non-coding weekend and kicking this thing hard, ready for Thursdays release. You'll find new builds and new TypeScript defs (that at least now compiles with VS, but is missing lots of stuff (i.e. all ninja + p2 parts)). I've got a hit-list of things to address which I'm working through, so expect lots of volatility in the codebase for the next few days, with constant updates and changes.

Link to comment
Share on other sites

If you come across any bugs NOT physics/tilemap related, then please post to github. If you find a physics/tilemap bug which you think should work (i.e. the code isn't all just commented out or something :) then post it here and I'll look into it.

Link to comment
Share on other sites

Is there any reason the new physics system would cause something from two weeks ago not to render anymore?

 

If I put a log in my update function it still updates, but just looks like It doesn't render.

 

All I've got is a black screen on my MainMenu with no assert messages.

 

EDIT: Nevermind its just me being dense until I post on the forums again. I was still using .add.group(false) to create groups I needed putting on the stage not the world.

Link to comment
Share on other sites

I switched my checkout to branch 1.2 (v2.0.0?) and after building with grunt I still had issues with setCircle() not being defined. Also game.physics.enable() was undefined... Sure I must be missing something as earlier in this thread someone had the same problem. Should I be including the whole library as separate files from the src directory?

Link to comment
Share on other sites

Hello, I'm new in the forum. I download the "002 - animated tilesprites" example from phaser lab then I change the texture image with this my png http://esperimenti.gabriele-pellegrinetti.it/phaser/demoCL2/assets/images/magma.png.

When I load the sample from my iPad and from my iPhone (mobile safari) work well... but if I load the same sample from my mac (latest version of safari, chrome, firefox) the animation dosen't show.

In the safari console I get this error message

WebGL: drawElements: texture bound to texture unit 0 is not renderable. It maybe non-power-of-2 and have incompatible texture filtering or is not 'texture complete'

can you help me?

Tanks

Gabriele

PS. sorry for my poor english

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...