darkraziel Posted January 9, 2015 Share Posted January 9, 2015 Hi everyone, I'm kind of new on this forums and phaser in general, but I had a simple question I would like to ask. I've been a developing a prototype for a dungeon-crawling game and so far everything is working great. I have a random dungeon generator working and it can create maps of different sizes. Right now I'm generating my dungeon inside a tilemap and I'm drawing everything on top of a layer. My only problem is that the drawing function takes at least 5 to 10 seconds to complete and I don't know how to add some kind of loading bar to it. Any help would be appreciated. Link to comment Share on other sites More sharing options...
ptdnet Posted February 17, 2015 Share Posted February 17, 2015 It's not exactly a "loading bar" but you could always throw up a "LOADING..." graphic, draw your map, then show it (and hide the LOADING).// off the top of my head, not promising beauty hereMyAwesomeGame.prototype.Update = function() { if (buildingMap == false) { // show "PLEASE STAND BY..." buildingMap = true; return; } else { // build my map // take down "PLEASE STAND BY" // show map // all done here, so change update function to point somewhere else.. like }};MyAwesomeGame.prototype.AnotherUpdate = function() { // cool gameplay here}; Link to comment Share on other sites More sharing options...
Recommended Posts