Jump to content

Phaser 2.2.0 Release Candidate 11 - Please Test!


rich
 Share

Recommended Posts

Perfect, thanks Noid.  Your simple example let me find the bug nice and quickly... dumb mistake on my part!

 

// accumulate time until the slowStep threshold is met or exceeded

this._deltaTime += Math.max(Math.min(1000, this.time.elapsed), 0);

 

Looks reasonable, but actually permits it to run desiredFps (usually 60) 'catch-up' frames in a single update if the game has been stalled (ie. you navigated away from it).  Currently the physics collision isn't running from the Phaser update loop directly (it's that "collide" call you have to put in your local update loop) but the physics motion is and I think that needs to change.

 

I'm about to commit this temporary fix but thought you might like it immediately:

 

Game.js, line 730:

            // accumulate time until the slowStep threshold is met or exceeded... up to a limit of 3 catch-up frames at slowStep intervals
            this._deltaTime += Math.max(Math.min(slowStep * 3, this.time.elapsed), 0);
Link to comment
Share on other sites

On the latest dev, checked out and built.

 

I've noticed that there is an apparent speed up sometimes (skipped frames) kicking in when the game is running perfectly well and smooth at 60fps with no apparent problems like GC.  It was worse on the initial RC1.

 

Also one graphic in a group is offsetting incorrectly, not looked at why, but RC1 didn't do it.

Link to comment
Share on other sites

Ok everyone - thank you all for your help so far! I have just built Release Candidate 5. This includes the very latest Pixi 2.1.1 release (from a couple of hours ago) and lots of other fixes and updates, including Pete's fix for the timer values which should utterly stop the "player going through the floor" errors :) He did spot a bigger issue with the way arcade physics motion and collision are handled, but we aren't going to attempt to change it in this version.

 

There are so many updates and fixes in this build it's getting silly now. Lots of them thanks to Paul (@pnstickne) who has been a complete demon on github.

 

So please.. I urge everyone to test this build one last time if you can :)

 

I'm going to send a mailing list email out as well I think, asking for testers on there too, as I know not everyone visits the forum.

Link to comment
Share on other sites

@rich

 

Solved the retro font issue.

 

With 2.0.7, I just had to do that to update the text:

 

this.counter.text=minutes+':'+seconds;

And it worked just fine.

 

But with the latest phaser version, I had a weird result doing so, like I've mentioned before in this thread (new text being pasted over the previous one, not replacing it, resulting in a weird/ugly pile of unreadable/merged characters)

 

So I did that:

this.counter.text='';

this.counter.text=minutes+':'+seconds;

 

And now it works again like it is supposed to.

 

 

 

Btw, remember the slow downs I experienced with the new versions in firefox? That don't occure with 2.0.7 ? And you told me that it was on pixi's end ?

 

Well, those can be seen when hadware acceleration is set to false in firefox (about:config panel)

Once hardware acceleration is set to true, there's no visible difference between 2.0.7 and the latest versions.

 

Same deal with the "giant jumps" I experienced with this version that did not occure with 2.0.7, same deal with "flickering linearity" of the "press start" message on the intro screen.

 

Everything goes fubar when hardware acceleration is set to false (which, again, is not the case with 2.0.7)

So I guess yeah, something about pixi.

 

 

Hope that will help you sleep better.

Link to comment
Share on other sites

Interesting, none of the retro fonts examples need to be blanked out first in either canvas or webgl mode, they clear properly with no overdraw.

 

Honestly I still reckon the FF issues you get with h/w accel are, unfortunately, between FF and your GPU and how Pixi now does sprite batching. If it was a universal FF problem the forum would be flooded with messages as such, and I'd see it here too.

Link to comment
Share on other sites

My 'offset' problem occurs with pivots and jumps when a sprite angle changes from zero to non-zero.  I'm pretty sure it's bug/fix in PIXI, so lets forget about this for now as I can use anchor instead.  More info here:

 

http://www.html5gamedevs.com/topic/6817-difference-between-anchor-and-pivot/

https://github.com/GoodBoyDigital/pixi.js/issues/997

 

But, to replicate, I hade code which boiled down simply to this:

    myBall = game.add.image(100, 100, 'ball');    myBall.pivot.x = myBall.width * .5;    myBall.pivot.y = myBall.height * .5;

Using any image, changing the angle from zero (myBall.angle=1) would make the ball jump position & rotate.  Previously (approx RC1 and below) the ball would just rotate.

 

Update: just found this, looks completely relevant to my issue:

 

https://github.com/GoodBoyDigital/pixi.js/pull/1164

Link to comment
Share on other sites

@rich

I recognized that the collision detection does not work sometimes -> only since I added the new 2.2 ver.
It's a simple Arcade.Physics collision between sprites.

A ball and a wall. - this does not depend on the ball speed, sometimes it occurs at high speed sometimes at very low speed.
I couldn't figure out why. But this problem themes to appear by 1 of 90 collisions ~ vague guess.

I've set :

game.time.desiredFps = 60;

But desiredFPS ( which is in fact a great feature )  themes to cause more problems. 

As the game runs "smoother", more collisions are not detected ( again: this is not depending on an incredible high speed of the ball object).

Update func:

game.physics.arcade.collide( this.ball, this.wall, this.wallColission, null, this);

I have checked other dependencies, now commented out nearly everything in the update.

Still the collision sometimes does not work and I do not know why. Since 2.2 RC

 

I will have to test if this occurs more often with the desiredFPS option - but at first impression I would say yes.

regards


Edit**

In comparison  2.1.x   /  2.2 RC
.2.2 runs not as fast as 2.1 (fps are still the same - this time without desiredFPS)
at multiple events 2.2 gets problems in playing the sound (get stuck),
cocoonJS and renderfunction showing up to 60FPS but the graphics are bucking.

game.debug.text(game.time.fps || '--', 2, 14, "#00ff00");   

2.1 - sometimes lower FPS but everything runs fine.


This does not only appear on cocoonJS, as I recognized it on Desktop Browsers too (Collision prob, describted above).


EDIT2****

On WebGL mode it is nearly a 50% chance to ignore collision (without desiredFPS).
- WebGL has only 2 / 3 FPS than Canvas ( don' t know if this is alright? before it was much higher I think :: tested on desktop & mobile)
- only checked RC 2.2
 

Edited by Sam
Link to comment
Share on other sites

Hi Sam, can you post a simple example of your ball and wall problem.

 

I tested collisions using a particle emitter with physics enabled and once the balls had separated they only ever overlapped when there were three or more in a group and the simple 'separation' algorithm failed.  I tested this under simulated heavy load by dropping in an extremely time intensive loop and the behaviour remained constant.

 

If you will throw up an example I'll take a look and see if I missed something in the time changes, or if your approach is different to my tests.

Link to comment
Share on other sites

@Sam - which RC version? We're up to 6 now.

 

@InsaneHero - install this http://nodejs.org/ - use the command prompt, go into the phaser folder and type in "npm install". Once done (you only need do it once) you can run "grunt" as often as you like to build your own version into the dist folder. "grunt jshint" will do a validation pass on the code.

Link to comment
Share on other sites

RC6, here's my comments:

 

1. offset problem with pivot when angle is non-zero, fixed in PIXI (here), I can confirm that pulling just this into RC6 fixes the problem.

2. groups added to groups always have 0 z index, I've added some more info in the PR (here)

3. my canvas is pinned to the top of the display area, previously it was centered, this is most probably to do with the scalemanager changes and I probably need to be doing things differently, I'm not saying this is a problem as I haven't looked into it, but worth mentioning now.

4. smooth, doesn't appear to be dropping frames trying to catch up when there was no need to, like it did previously, needs keeping an eye on though, 2 mins isn't a thorough test.

 

cheers

Link to comment
Share on other sites

Ok I think I've solved my problem but for anyone else trying to install node.js to build into the dist folder, here's what I went through to get there!

 

 

Unfortunately npm install generated a bunch of errors.  I used the .msi installer for node.js and I can see that it's path has been added correctly.

I found this thread that suggests switching to the non-secure http as a last resort, but I also noticed that the second time I tried npm install I got a different set of errors... is it possible it did a partial install and I need to clean up before trying that?

 

Unfortunately I closed the cmd window with the original errors without copying them first.

The new errors from 'npm install' are:

 

C:\wamp\www\phaser-dev>npm install
 
> [email protected] prepublish C:\wamp\www\phaser-dev
> grunt build
 
'grunt' is not recognized as an internal or external command,
operable program or batch file.
 
npm ERR! [email protected] prepublish: `grunt build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] prepublish script.
npm ERR! This is most likely a problem with the phaser package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     grunt build
npm ERR! You can get their info via:
npm ERR!     npm owner ls phaser
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program File
s (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! cwd C:\wamp\www\phaser-dev
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\wamp\www\phaser-dev\npm-debug.log
npm ERR! not ok code 0
 

 

From another thread I tried "npm install -g grunt" which appeared to work, however it still isn't available.

Finally I read the whole of that last thread then tried "npm install -g grunt-cli" and all of a sudden "grunt" is working and appears to have built phaser (yay!)

 

Hope this saves someone else from an hour of frustration!

 

Link to comment
Share on other sites

@Sam: I'm playing the breakout example you linked using the current dev build, and I'm not seeing any collisions fail after clearing the whole screen several times.  Can you describe what it is you see when the collisions don't work right please?

- I sent you a link to my demo/test but I don't think it'll help you much.

Link to comment
Share on other sites

@rich

still in RC6. updated my files a few minutes ago.

** Canvas mode themes a bit faster than before-
WEBGL: still very slow, collision not working at all (examples.phaser.io - invaders , are very laggy too)

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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