fariazz Posted November 11, 2014 Share Posted November 11, 2014 fariazz - the character didn't go through the tiles once for me (played it several times over) It's going through the tiles in Chromium but not in FF for me.. EDIT: in FF as well.. it's kind of random when it happens and when it doesn't. EDIT 2: screencast https://www.youtube.com/watch?v=UfqGzdm-U1w Link to comment Share on other sites More sharing options...
rich Posted November 11, 2014 Author Share Posted November 11, 2014 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 More sharing options...
fariazz Posted November 11, 2014 Share Posted November 11, 2014 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 More sharing options...
fariazz Posted November 11, 2014 Share Posted November 11, 2014 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 More sharing options...
rich Posted November 11, 2014 Author Share Posted November 11, 2014 No the scrolling is unrelated, it's just a WebGL tilemap glitch. I think basically the game is spiralling.. maybe decoding audio files, something processor intensive anyway. We're having a look to see if there's a way to capture this better. Link to comment Share on other sites More sharing options...
enriqueto Posted November 11, 2014 Share Posted November 11, 2014 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 More sharing options...
valueerror Posted November 11, 2014 Share Posted November 11, 2014 i also had problems with tweens yesterday... several connected to().to() statements do not work.. only the last one seems to be executed. Link to comment Share on other sites More sharing options...
Sam Posted November 11, 2014 Share Posted November 11, 2014 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-OptionHTML5Gamedev:http://www.html5gamedevs.com/topic/10159-black-screen-with-cocoonjs-phaser-213/ Link to comment Share on other sites More sharing options...
rich Posted November 11, 2014 Author Share Posted November 11, 2014 Sam - hmmm that sounds simple enough. I've just pushed up RC3 - could you test it for me please? It has a fix specifically for the above issue in (along with various others from Pixi) Link to comment Share on other sites More sharing options...
Sam Posted November 11, 2014 Share Posted November 11, 2014 Yes I will do. Thanks rich,I will respond later this afternoon. Link to comment Share on other sites More sharing options...
Sam Posted November 11, 2014 Share Posted November 11, 2014 Works fine in canvas+in webview+ - blackscreenin webview - blackscreentested on iPad mini iOS8 cocoonJS Launcher 2.1 Link to comment Share on other sites More sharing options...
rich Posted November 11, 2014 Author Share Posted November 11, 2014 I can live with that. Link to comment Share on other sites More sharing options...
nkholski Posted November 11, 2014 Share Posted November 11, 2014 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 More sharing options...
Noid Posted November 11, 2014 Share Posted November 11, 2014 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 More sharing options...
rich Posted November 11, 2014 Author Share Posted November 11, 2014 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 More sharing options...
Noid Posted November 11, 2014 Share Posted November 11, 2014 This is game.time.elapsed and game.time.time when switching back quickly: And this is when waiting for a few seconds before switching back: Link to comment Share on other sites More sharing options...
rich Posted November 11, 2014 Author Share Posted November 11, 2014 Thanks. Will shove 12,090 into the the timer math now and see what happens. Link to comment Share on other sites More sharing options...
rich Posted November 12, 2014 Author Share Posted November 12, 2014 Noid - could you email me your game at all? ([email protected]) a zip of the source + assets, whatever I need to just launch it and see it. Link to comment Share on other sites More sharing options...
Noid Posted November 12, 2014 Share Posted November 12, 2014 Sent. Link to comment Share on other sites More sharing options...
InsaneHero Posted November 12, 2014 Share Posted November 12, 2014 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 More sharing options...
InsaneHero Posted November 12, 2014 Share Posted November 12, 2014 Watching the video again, it actually does look like he's bouncing on the line between two tiles. Are the tiles defined as separate physics objects? Could that be a 3 body collision when he lands? Link to comment Share on other sites More sharing options...
Noid Posted November 12, 2014 Share Posted November 12, 2014 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 More sharing options...
Noid Posted November 12, 2014 Share Posted November 12, 2014 I removed everything except the tilemap, the sprite and the collision check.Test: http://lisandrolorea.com.ar/tunneling-test/Source: http://lisandrolorea.com.ar/tunneling-test/game.7z I tried using overlap instead of collide and putting the code that updates the sprites velocity.y in a callback but the tunneling still happens. InsaneHero 1 Link to comment Share on other sites More sharing options...
Jack0815 Posted November 12, 2014 Share Posted November 12, 2014 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 More sharing options...
Sam Posted November 12, 2014 Share Posted November 12, 2014 cocoonJS canvas+ mode working only - can live with that too.Reported to Ludei so that they are aware of the changes to 2.2thanks for the fast troubleshooting. Link to comment Share on other sites More sharing options...
Recommended Posts