thefootballguy Posted June 19, 2016 Share Posted June 19, 2016 I am a beginner at phaser trying to create a game that all of the sprites will be generated through bitmapdata. However, I always have to refresh browser twice to see the sprites. Like in the phaser example on generating a sprite: http://phaser.io/examples/v2/create/generate-sprite You won't see the sprite till you refresh. My questions are the following friends: What needs to be done to have all the bmd sprites generated the first load? (Will I have to create a loader, do something with cache?) If developing a multiplayer game with bmd sprites will some problem persist? Thank you for your time and I hope you can help me wrestle with understanding phaser. Link to comment Share on other sites More sharing options...
rich Posted June 20, 2016 Share Posted June 20, 2016 I can see the sprite fine without refreshing. Anyone else? Link to comment Share on other sites More sharing options...
Milton Posted June 20, 2016 Share Posted June 20, 2016 Yep, works fine first time. Interesting problem OS/Browser? Link to comment Share on other sites More sharing options...
thefootballguy Posted June 20, 2016 Author Share Posted June 20, 2016 Using Firefox, it did not display the sprite. Firefox/Windows 8 (in private browsing) Firefox/xUbuntu Chrome Works tho Link to me loading https://gyazo.com/99aad2e9e22fd9376983b98fc3fb6e2f Picture of What it is displaying (unloaded sprite) Link to comment Share on other sites More sharing options...
rich Posted June 20, 2016 Share Posted June 20, 2016 Any errors in the console? This is likely a web site / connectivity error. Rather than a problem with Phaser itself. Link to comment Share on other sites More sharing options...
Milton Posted June 20, 2016 Share Posted June 20, 2016 Same problem here. Ubuntu / Firefox needs a refresh... Only warnings (and they also show up on refresh): Strict-Transport-Security: The site specified a header that could not be parsed successfully.[Learn More] iframe "Phaser v2.5.0 | Pixi.js v2.2.9 | Canvas | WebAudio | http://phaser.io" phaser.2.5.0.min.js:12:2308 GET http://disqus.com/embed/comments/ [HTTP/1.1 304 Not Modified 272ms] Prefixed Fullscreen API is deprecated. Please use unprefixed API for fullscreen. For more help https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API phaser.2.5.0.min.js:22:4131 'mozHidden' and 'mozVisibilityState' are deprecated. Please use the unprefixed 'hidden' and 'visibilityState' instead. phaser.2.5.0.min.js:11:9795 Use of getPreventDefault() is deprecated. Use defaultPrevented instead. jquery-2.0.3.min.js:5:12747 Password fields present on an insecure (http://) page. This is a security risk that allows user login credentials to be stolen.[Learn More] (unknown) Password fields present on an insecure (http://) iframe. This is a security risk that allows user login credentials to be stolen.[Learn More] (unknown) Link to comment Share on other sites More sharing options...
thefootballguy Posted June 20, 2016 Author Share Posted June 20, 2016 Running the generating sprite example locally in firefox. Offline with just code gave me the same thing. Link to comment Share on other sites More sharing options...
rich Posted June 20, 2016 Share Posted June 20, 2016 Sodding Firefox. If it's not one thing, it's another. If this fails, then I assume ALL of the 'create' examples fail as well? As they all work in the same way. Link to comment Share on other sites More sharing options...
Milton Posted June 20, 2016 Share Posted June 20, 2016 gen-paint: first load, no grid more-sprites: first load, no sprites rat-attack: first load, no sprites Link to comment Share on other sites More sharing options...
thefootballguy Posted June 20, 2016 Author Share Posted June 20, 2016 Yes It looks like only polyline http://phaser.io/examples/v2/create/polyline Is the only one that works completly Link to comment Share on other sites More sharing options...
gongohogarth Posted December 11, 2016 Share Posted December 11, 2016 Could this be related to ? Link to comment Share on other sites More sharing options...
Recommended Posts