rich Posted November 25, 2014 Author Share Posted November 25, 2014 If you call world.resize() with no parameters then it will set width and height to "undefined" as it's expecting you to give the new width/height with the resize call. Link to comment Share on other sites More sharing options...
kenray Posted November 26, 2014 Share Posted November 26, 2014 I'm getting an error "object is not a function" when trying to use this call:thisDevice = new Phaser.Device();(which has worked fine in all pre-2.2 builds, btw) Link to comment Share on other sites More sharing options...
wayfinder Posted November 26, 2014 Share Posted November 26, 2014 Ok I need to post some examples of how to use the new scale manager! lmao you're a born diplomat I'll check the documentation again Link to comment Share on other sites More sharing options...
JUL Posted November 26, 2014 Share Posted November 26, 2014 Ok So, still on my current project, (started on 2.0.7, currently running using 2.1.3), performances are worse, on firefox and cocoonjs, instead of eventually slowing down, it stutters, producing weird behavior with sprite.body.blocked.down from what I can see (sprite starting the end jump motion like it fell from one pixel above or something) Retro font bug is back (superposition of characters)... But only on cocoonjs latest version (on my android galaxySII) That is all I've seen this morning. Edit:Hm.Forget about retro font, it appears to do it also with 2.1.3 on cocoonjs, I haven't launched the project on cocoonjs since a while. Well, 2.0.7 still has my preference. Link to comment Share on other sites More sharing options...
Vieo Posted November 26, 2014 Share Posted November 26, 2014 I'm currently using 2.1.0 when I switch to 2.2.0. I get a lot of issues with collision with tilemap. The game is a platformer style with gravity, and the player fall through the floor when falling from a height. Is this a know issue? If not I'll try create an example Link to comment Share on other sites More sharing options...
valueerror Posted November 26, 2014 Share Posted November 26, 2014 Well that was so simple it was ridiculous: https://github.com/photonstorm/phaser/commit/667d477a16768657b0bee32e5e2b4b2e896e5632 haha.. thank you very much rich.. now that i've tested the newest dev version with your fix i understand what you tried to tell be in the post before ;-) the transparent render circle is now exactly over the sprite unfortunately this didn't solve the entire problem.. have a look at the screenshot now please ! in my update loop i pin the origin of the white rope to the sprites position.. the problem: it is behind exactly like the render circle was before your fix.. in terms of weird looking in my game this changed nothing.. do you have any idea how i could fix this too ? thank you in advance ! Link to comment Share on other sites More sharing options...
rich Posted November 26, 2014 Author Share Posted November 26, 2014 I'm currently using 2.1.0 when I switch to 2.2.0. I get a lot of issues with collision with tilemap. The game is a platformer style with gravity, and the player fall through the floor when falling from a height. Is this a know issue? If not I'll try create an example Example definitely needed, as this isn't happening in any of our tests. Link to comment Share on other sites More sharing options...
rich Posted November 26, 2014 Author Share Posted November 26, 2014 in my update loop i pin the origin of the white rope to the sprites position.. the problem: it is behind exactly like the render circle was before your fix.. in terms of weird looking in my game this changed nothing.. do you have any idea how i could fix this too ? There's no way other than don't pin it in the update loop - the values at that point will always be behind the soon-to-be adjusted physics values. Maybe create your own custom sprite for the rope and override the postUpdate so it can position itself then. Link to comment Share on other sites More sharing options...
valueerror Posted November 26, 2014 Share Posted November 26, 2014 thx rich.. i figured that i had to move the pinning to postUpdate() (of the sprite maybe) i'm now trying to figure out how to do this Link to comment Share on other sites More sharing options...
rich Posted November 26, 2014 Author Share Posted November 26, 2014 Thinking about it, you could just move the "pinning" code to your states preRender method, rather than update. Then it will always have the correct x/y coordinates. Link to comment Share on other sites More sharing options...
valueerror Posted November 26, 2014 Share Posted November 26, 2014 i probably have to do this.. i just extended my gummi sprite and added the "pinning" to it's postUpdate() funciton.. and it doesn't work.. the postition is updated but it's still one frame behind the sprite Link to comment Share on other sites More sharing options...
valueerror Posted November 26, 2014 Share Posted November 26, 2014 works like charm !!! thank you so much, rich testdrive: http://test.xapient.net/phaser/offsettest/index-fixed.html Link to comment Share on other sites More sharing options...
rich Posted November 26, 2014 Author Share Posted November 26, 2014 Phew.. thank God The only issue I can think of with preRender is that depending on your State set-up it can fire BEFORE create has, so if you reference sprites in preRender that are made in create it can potentially error. It's easy enough to check for this though. Link to comment Share on other sites More sharing options...
rich Posted November 26, 2014 Author Share Posted November 26, 2014 I moved the emitters 30 pixels up in the example and fixed the x-position with the same results (updated the example online too). I noticed that if I add "game.world.resize();" in the console it will work as before but it wasn't needed in previous versions and I don't know why it would be necessary now. Is this expected? Also, if I do so game.world.bounds.width/height will be undefined. One final test please - does it still happen if you remove the tilemap completely? Am trying to determine if it's world bounds related or tilemap collision related. Link to comment Share on other sites More sharing options...
nkholski Posted November 26, 2014 Share Posted November 26, 2014 One final test please - does it still happen if you remove the tilemap completely? Am trying to determine if it's world bounds related or tilemap collision related. Sorry, same results without the tilemap: http://niklasberg.se/entityExplode/index-2.2.0-rc.html Another reason it's probably related to bounds is that this example without setBounds works well with RC8: http://niklasberg.se/entityExplode/index.html My guess is that something is causing one big jump in the y-position for particles (connected to update/velocity.y?) sometimes and then it stabilizes to continue as expected from the faulty position. I hoped to find a possible solution but I don't know where else in the phaser source I could test for this. BTW, I also noticed that the scroll bars appears and disappears repeatedly like if the page content changes size, but only when the browser window width is larger than the height and the console is not up. I will try to see if I can find a possible cause. Link to comment Share on other sites More sharing options...
rich Posted November 27, 2014 Author Share Posted November 27, 2014 No that's good to know - if it does it without the tilemap I can narrow it down fast. Link to comment Share on other sites More sharing options...
szocske Posted November 27, 2014 Share Posted November 27, 2014 Fixed-delta, render-independent physics sounds wonderful!Is it now reasonable to expect the exact same initial scene (world?) to evolve exactly the same when run twice?I've been putting off a project idea for a while now waiting for this! (a blend of angry birds, KSP, and the time slider from CodeCombat) Link to comment Share on other sites More sharing options...
neurofuzzy Posted November 28, 2014 Share Posted November 28, 2014 What should I be seeing in your fiddle? because it drags fine for me with no visual glitches other than the cropping of the top tile, which the comments said would happen anyway? Looks like you read before I updated my post. The proper URL is: http://jsfiddle.net/ggaudrea/6k8yroep/1/ ** EDIT: updated due to assets changing servers Try it in Safari. Link to comment Share on other sites More sharing options...
rich Posted November 28, 2014 Author Share Posted November 28, 2014 szocske - there will always, always be a brief lag when your game first starts as chrome and it's kind start compiling and JITing what it can. This is unavoidable and will ironically lag your game as it plays out - once done though the new timers will help massively with consistent play across differing device speeds (it was the whole reason for the changes ) Link to comment Share on other sites More sharing options...
rich Posted November 28, 2014 Author Share Posted November 28, 2014 neurofuzzy - I'm a bit confused by all your tile size stuff, so I'm just going to add mouse drag to an existing tilemap and see what gives. Link to comment Share on other sites More sharing options...
Desseas Posted December 1, 2014 Share Posted December 1, 2014 Hi all and let me just say, Great Job with the new update.Me and my team had major fps issues with the previous versions.It seems that thing are more controlable now.We are testing one of our games with the new version.You can find the game we are currently working here:http://sportnews.nooz.gr/games/demos/SuperGoalPK/index.html.Our goal is for the game to be able to run in a slow machine.We have tested it on a really bad machine with 1GB of ram and 1,60 intel genuique cpu.Finally the tweens show even in this terrible machine and the funny fact is that game.time.suggestedFps returns 0!!!Atm we are dealing with scale problems.anyone able to make sclaling work?We would be really thankful for any responce regarding scale and or requirments for pc and stuff.We managed to scale horizonically but when we reduce the window size vertically it does nothing.our scale code: function scaleGame(forceResize){ if(fixedScreenSize) return; forceResize = forceResize || false; if(forceResize) windowResized = true; if(windowResized){ //game.scale.setShowAll(); game.scale.pageAlignHorizontally = true; game.scale.pageAlignVertically = true; game.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; game.scale.setScreenSize(true); game.scale.refresh(); windowResized = false; gameCenterX = (game.width - (game.width/2)); gameCenterY = (game.height - (game.height/2)); }}$( window ).resize(function() { windowResized = true;});we call the scaleGame in the update.game center variables are there only to be used at a later stage so no need to pay attention to those. Link to comment Share on other sites More sharing options...
rich Posted December 1, 2014 Author Share Posted December 1, 2014 Thanks for the feedback. I'm going to be writing some guides on scaling today. Link to comment Share on other sites More sharing options...
rich Posted December 2, 2014 Author Share Posted December 2, 2014 Just to say that I've nearly finished the guide to the scale manager. I will almost certainly be releasing Phaser 2.2 today. I need one upstream fix from Pixi first but then I'm good. I'm sure there are a couple of issues left, but on the whole this is easily the most solid release yet. For anyone wanting to test today I've just pushed RC13 build files. qdrj 1 Link to comment Share on other sites More sharing options...
qdrj Posted December 2, 2014 Share Posted December 2, 2014 Just to say that I've nearly finished the guide to the scale manager. I will almost certainly be releasing Phaser 2.2 today. I need one upstream fix from Pixi first but then I'm good. I'm sure there are a couple of issues left, but on the whole this is easily the most solid release yet. For anyone wanting to test today I've just pushed RC13 build files.Guide for scaling will be super helpful. I have done 2 fully responsive games with Phaser so far (scaleMode.RESIZE) but using some scale "hacks" all over the code. And this is for you RIch - http://www.youtube.com/watch?v=E-WHW-QNswE#t=24 Link to comment Share on other sites More sharing options...
stupot Posted December 2, 2014 Share Posted December 2, 2014 RC13 looking very good. I had a number of issues cropping up in the last 2 weeks, but not the time to investigate if it was me or Phaser so I stayed away for a while. However in RC13 just about all my problems have gone and I can probably bring it back into my daily dev. Link to comment Share on other sites More sharing options...
Recommended Posts