malgin Posted April 22, 2018 Share Posted April 22, 2018 Hello, community! I've just started using Phaser 3, and it's a pleasant experience. Special thanks to team for TypeScript definitions. I'm currently trying to implement scale logic for my game. I've read in this blog post that developers considered to change `ScaleManager` in Phaser 3, but I didn't find one in sources. I've also tried to take a look at how resize is handler in Mario platformer from pinned topic. Author used this: scaleMode: 0, //Phaser.ScaleManager.EXACT_FIT, ... but I didn't find `scaleMode` in Config.js object, and also didn't find any reference in Game.js object to this config property. It seems this was a way to scale game in Phaser 2, but not anymore. My current idea is to put all game objects in a 'parent' frame (not sure which object should I used for this btw..), and scale this 'frame' in each Scene on 'resize' event. This feels awkwardly wrong to me, and I'm looking for better approach. Would be very grateful for a hint where to look, or an advise on how to properly implement scaling. Thank you! Link to comment Share on other sites More sharing options...
nkholski Posted April 22, 2018 Share Posted April 22, 2018 The Mario example was made mainly while Phaser 3 was in beta and much by trail and error. That line should be removed because it does nothing (I found https://codepen.io/samme/pen/JMVBeV and tried it in my game with no success). I should really sit down and clean up the source. I ended up making a custom method to scale the whole canvas. Link to comment Share on other sites More sharing options...
greendot Posted July 24, 2018 Share Posted July 24, 2018 Hi guys, I've been trying to properly scale my game, any luck with a built-in solution from Phaser, or do we have to manually resize and position all the Game Objects ourselves? Link to comment Share on other sites More sharing options...
samme Posted July 25, 2018 Share Posted July 25, 2018 Link to comment Share on other sites More sharing options...
Recommended Posts