Jump to content

Phaser 2.2.0 Release Candidate 11 - Please Test!


rich
 Share

Recommended Posts

Try this - display game.time.suggestedFps somewhere and see what that says, does it drop dramatically when going through the tiles? Also please try with RC2 which I uploaded tonight.

 

Do you have any especially large values in play? gravity? y velocity? anything that may cause it to tunnel?

Link to comment
Share on other sites

I added it: http://static.pablofarias.com/sidescroller-22/

 

It takes it a while to reach a suggested FPS of 60.

 

It seems the new version takes longer to have everything ready for gameplay. For example when you look at the 2.1 version (http://static.pablofarias.com/sidescroller) the character falls very smoothly from the start until it touches the ground, whereas in the new version it's not smooth and that's when it tunnels.

Link to comment
Share on other sites

Richard, I just realized that the game actually broke with 2.1.3. The floor stopped scrolling in that released, but it does scroll on 2.2

 

Not sure if that is related to the tunneling..

 

this is with 2.1.2 (working fine):   http://static.pablofarias.com/sidescroller/

 

2.1.3 no scrolling of the layer, no tunnel:   http://static.pablofarias.com/sidescroller-213/

 

2.2 scrolling of the layer OK, but tunneling through tiles:   http://static.pablofarias.com/sidescroller-22/

Link to comment
Share on other sites

tested on a couple of my games, some tweens don't work with this version, for example this one which animates the play button of FootChinko:

 

var pulseTween = this.game.add.tween(this.playButton.scale);
            pulseTween.to ({x:  1.05, y:.95}, 300,  Phaser.Easing.Linear.None, false);
            pulseTween.delay (50);
            pulseTween.to ({x:  .95, y:1.05}, 700,  Phaser.Easing.Elastic.Out);
            pulseTween.loop();
            pulseTween.start();
Link to comment
Share on other sites

I do not know if this can be taken on the phaser-side:

since cocoonJS 2.1 on iOS and Android, no phaser game shows up in the launcher, which many users have been experienced.
Problem is located at: 

*cite ludei*
 

 

Phaser, by default, checks the following code:

if (document.readyState === 'complete' || document.readyState === 'interactive')    {        window.setTimeout(this.onBoot, 0);    }    else if(typeof window.cordova !== "undefined")    {        document.addEventListener('deviceready', this.onBoot, false);    }    else    {        document.addEventListener('DOMContentLoaded', this.onBoot, false);        window.addEventListener('load', this.onBoot, false);    }

Normally, the default branch for cocoonJS is the third one, but now we have included Cordova in the Launcher, so it takes the second one instead. That is why it is not working as it should, because it recognizes the window.cordova.

 

Ludei is aware of this problem, no cocoonJS solution yet. Maybe it can be taken on the phaser site in the next update?

Ludei:
http://support.ludei.com/hc/communities/public/questions/200719089-CocoonJS-Launcher-2-1-iOS-Phaser-no-game-running-any-more-in-any-View-Option

HTML5Gamedev:
http://www.html5gamedevs.com/topic/10159-black-screen-with-cocoonjs-phaser-213/





 

Link to comment
Share on other sites

I have the same problem as fariazz. The player falls through the floor when the game starts, but if I reset the y position to the initial one from console collision will the floor works. I have gravity set to 600. 

 

I also noticed that the y-value of my emitters moved to the top of the bounds and not at the location I try to initiate them.

 

I do some manipulation of the bounds in the create-function and after the player is created, maybe that's causing the problem?

 

I made a mistake when trying to build the updated 2.1.3 and got 2.2.0-dev (v2.2.0 "Tarabon" - Built: Sat Oct 25 2014 23:18:12), but stuck to it since it worked fine for me so I guess these problems must have been introduced after that date.

Link to comment
Share on other sites

Regarding tunneling, what I've noticed is that whenever you switch tabs the game drops a lot of frames, but it doesn't happen if you switch windows. I thought it was something related to Chrome, but it happens with Firefox too. 

 

 

In the first half of the video I switch windows and you can notice that the fps meter stays at 59fps. However when I switch tabs it goes down to 7 or 5 fps. If I do it at the right moment, you can see my sprite tunneling through the floor.

Link to comment
Share on other sites

When you switch tabs RequestAnimationFrame stops running. When you switch windows it doesn't. As it's rAf that calculates the game time my guess is still that some ultra insane value is coming back in from it when you tab back again. Would you mind logging out the time value passed to Game.update and check what it spikes to after a tab switch out/in.

Link to comment
Share on other sites

Those numbers all look reasonable apart from the fact that are 60 repetitions of the 12090 elapsed time.  There should be only one huge elapsed time value and I'd be interested to know how we got 60 exactly the same.  Where did you put the logging line to capture these values Noid?

 

The new logic update system uses fixed time steps, and the physicsElapsed time is locked at 1000 / desiredFps, so it's very unlikely that whatever is happening is actually in the physics itself.  (I did find one possible case because the current Arcade physics can't handle three-body collisions well, but looking at the video it looks like only two bodies are involved).

 

It could be a visual artifact because the render update isn't running fixed time steps, and tweening has been moved into there too so tweening may also cause odd effects with large elapsed times.  I'm going to look into that next.

Link to comment
Share on other sites

I added the console.log statements at the beginning of the update function in Game.js, which is the main game state.

The tiles are a regular Phaser.Tilemap and the collision is between the sprites and the tile layer and it doesn't matter if it's touching one or two tiles, it will tunnel anyway. 

There are callbacks set for every index, and there's a timer that does "this.map.swap(16,17); this.map.setCollision(17, true);this.map.setCollision(16, false);" once per second. 

I've tried disabling all the callbacks and the timer to see if that was the problem but it doesn't fix it. 

It only happens when the sprite is moving fast and the game starts skipping frames so I never reported it cause I thought it was an unavoidable consequence of using a physics system with discrete collision detection. The problem is that when I switch tabs(on any browser) for some reason the framerate drops to ~5fps for an instant and that's when the tunneling occurs.  

Link to comment
Share on other sites

I usually use

    game.scaleMode = Phaser.ScaleManager.SHOW_ALL;
    game.scale.pageAlignHorizontally = true;
    game.scale.pageAlignVertically = true;
    game.scale.setShowAll();
    game.scale.refresh();

to scale my game and place it in the centre. It is no longer working atm. Any suggestions?

 

Furthermore,I love the fps feature :)

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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