Html5Overview Posted October 27, 2018 Share Posted October 27, 2018 Hi there, I'm making a project and I have a few things that bother me for the last few days. a.) How do I add background to this project. Is there a way to add a background over css? If there already is a solution to do it over phaser 3 library, how to I add mobile phone background to fit on every screen? b.) I want to center a text to an exact middle of a screen. Is there a function to do so or I'll need to add text to screen_width.middle then add padding to a text to center it? c.) Why are my sprite images (Sword and shield) distorted is Chrome? If firefox they look fine, however, if they are sized down too much in Chrome they are distorted. Here is vide preview(forgive me for double screen preview): https://streamable.com/feba3 Link to comment Share on other sites More sharing options...
samme Posted October 27, 2018 Share Posted October 27, 2018 a) You would have to add a CSS background yourself, behind the game canvas. b) this.cameras.main.centerX etc. c) Need to see code. Link to comment Share on other sites More sharing options...
Html5Overview Posted October 28, 2018 Author Share Posted October 28, 2018 17 hours ago, samme said: c) Need to see code. Here is a code: https://gist.github.com/GroundZeroCro/093408747c2a62303bcc03ab15d016af Do you notice anything that could scale picture into that terrible resolution? Current sword and shield pictures are cca 200*200 px large. Link to comment Share on other sites More sharing options...
Recommended Posts