rich Posted September 9, 2014 Share Posted September 9, 2014 https://github.com/photonstorm/phaser 2.1.0 was supposed to be a Phaser release that just updated p2 physics. However it quickly grew into something quite a bit more! We took the opportunity to introduce a bunch of new features (ScaleMode RESIZE being a pretty significant one) and hammer the github issues list into submission, until it was a mere shadow of its former self, now composed mostly of feature requests. As you should be able to tell from the version number this is an API breaking release. Not significantly, as most changes are confined to P2, but definitely in a few other areas too. As usual the change log details everything, and although we appreciate there is a lot to read through, everything you need to know can be found there. The next release will be 2.1.1 in approximately 1 month, so if you find any problems, and are sure they are actual problems, please report them on github and we'll get them fixed! To everyone who contributed towards this release: thank you, you're the best. Also, one of my favourite new examples (draw on it) http://examples.phaser.io/_site/view_full.html?d=bitmapdata&f=draw+blended+sprite.js&t=draw%20blended%20sprite Cheers, Rich Nepoxx, pandavigoureux29, lewster32 and 2 others 5 Link to comment Share on other sites More sharing options...
JUL Posted September 9, 2014 Share Posted September 9, 2014 yeah ! Edit:Arf, I knew it ! game.stage.bounds.width ... What is replacing it now ? Seems to not be defined anymore... Edit2: Well... After a lame hack to fix the game.stage.bounds not defined (big STAGE_WIDTH and STAGE_HEIGHT variables to store values and "replace all" game.stage.bounds.width and game.stage.bounds.height everywhere...) I noticed some weird things. Smooth short slowdowns, times to times, occuring during the game, not happening with 2.0.7.When the game is scaled up in fullscreen and SHOW_ALL mode... Game is severly slowed down, body.velocity values seem to be messed up, it looks like the player is moving at the same pace/rate as if it were scale 1:1... Animation still goes at correct speed but the distance traveled by the player is ridiculousy small, like if the scaling was not considered. The game worked fine in 2.0.7 btw. *canvas rendering btw Link to comment Share on other sites More sharing options...
Nepoxx Posted September 9, 2014 Share Posted September 9, 2014 Awesome! Thanks a lot for the great work. I'm really looking forward to the development of Phaser! Link to comment Share on other sites More sharing options...
MakingVsPlaying Posted September 9, 2014 Share Posted September 9, 2014 Time to upgrade the version of Phaser I've been using. Thanks for the continued development! Link to comment Share on other sites More sharing options...
rich Posted September 9, 2014 Author Share Posted September 9, 2014 game.stage.bounds = game.scale.bounds (same for game.stage.offset is now game.scale.offset). Nothing has changed re: Arcade Physics timings. Link to comment Share on other sites More sharing options...
JUL Posted September 9, 2014 Share Posted September 9, 2014 Thx for feedback Then I guess the problem doesn't come from the arcade physic engine. I re tested again, in firefox, fresh restart, no other tab open, and it still does it.Tested in chrome and it doesn't do it (the slow down). Performances seem to be better in chrome than with 2.0.7 btw. FireFox 31 macosx snow leopard mac book pro. edit:updated to ff 32, same deal. Again it doesn't happen with 2.0.7 Link to comment Share on other sites More sharing options...
Noid Posted September 10, 2014 Share Posted September 10, 2014 I understand that now each Tile object has a "properties" object containing all the tile properties defined via Tiled. Do all Tile objects with the same index share a reference to the same "properties" object or does each single tile in the map have its own copy of the object? [Edit] Nevermind. I checked the code and noticed they share a reference. Link to comment Share on other sites More sharing options...
Bengsis Posted September 10, 2014 Share Posted September 10, 2014 i trying new phaser using this template https://github.com/photonstorm/phaser/tree/master/resources/Project%20Templates/Basic. it stuck on Boot state. Is there anyone has same problem? when i try phaser 2.0.7 it's working Link to comment Share on other sites More sharing options...
ram64 Posted September 10, 2014 Share Posted September 10, 2014 @Bengsiswanto HendrawanDo you get any errors in the console? For me it works just fine. Link to comment Share on other sites More sharing options...
Bengsis Posted September 10, 2014 Share Posted September 10, 2014 no error. it just wont change state from Boot state. i think i gonna try it again Link to comment Share on other sites More sharing options...
spencerTL Posted September 10, 2014 Share Posted September 10, 2014 Are you sure you are using the template from the new release? There is an api change to the hasResized event that will freeze you at boot if you use an older one. Just comment out the relevant line if you are using it. I can confirm that the template in the new release works fine. Link to comment Share on other sites More sharing options...
Bengsis Posted September 10, 2014 Share Posted September 10, 2014 yes i'm sure. if i'm put this.state.start('MainMenu') on create and preloader it's not workingbut if i put on update function it's working Link to comment Share on other sites More sharing options...
rich Posted September 10, 2014 Author Share Posted September 10, 2014 You should never put a state swap in preload (although I appreciate you were probably just testing it out). I've got a huge pile of projects here happily swapping state from the create function, so it has to be something else in the set-up. Post an example somewhere perhaps? Link to comment Share on other sites More sharing options...
Bengsis Posted September 10, 2014 Share Posted September 10, 2014 you can testing on this linkhttps://dl.dropboxusercontent.com/u/17644267/basic/index.htmlplease check on console it's only run on boot state the code herehttps://github.com/mightiesthero/testingphaser210 thank you Link to comment Share on other sites More sharing options...
rich Posted September 10, 2014 Author Share Posted September 10, 2014 You can't have empty preload functions. Remove it, or add a Loader call into it. Link to comment Share on other sites More sharing options...
Bengsis Posted September 10, 2014 Share Posted September 10, 2014 ic. it working now. but on 2.0.7 preload function can be empty thank for the help Link to comment Share on other sites More sharing options...
markus.n Posted September 11, 2014 Share Posted September 11, 2014 I had exactly the same situation as Bengsis. Also, unlike instructed, his example did not work by just commenting out the preload function of Boot.js, I actually MUST load some images (or do something else?) there in order to get to Preloader. This seems very counter-intuitive and I couldn't find any mentions about this aside from this thread, does it really work as expected? I can imagine lots of people getting frustrated while trying to achieve a simple "hello world" page. At least that's how i begin, commenting everything unnecessary out and trying to console.log something, and currently it doesn't work like that.Which brings me to a suggestion, it'd be really nice to have a few actual, complete and out-of-the-box working "hello world" examples below the resources folder, in addition to the existing templates which don't include the images or phaser source file. That's where most people start off anyway, right? Link to comment Share on other sites More sharing options...
Recommended Posts