tackle Posted January 9, 2014 Share Posted January 9, 2014 Do you know any good ways to simulate/emulate slow downloads for your games so you can work out the Preloader thoroughly? Link to comment Share on other sites More sharing options...
owendeery Posted January 9, 2014 Share Posted January 9, 2014 It depends how you have your preloader setup, and it seems obvious, but I usually just decouple the preloader from any content loading and just update it manually. So for instance if your preloader updates based on a loader event, I would remove the event and update the preloader at a timed interval with a set progress amount. It won't simulate the 'chunkiness' of downloading but it works for getting the logic and design worked out. Link to comment Share on other sites More sharing options...
Ezelia Posted January 9, 2014 Share Posted January 9, 2014 create a server side page witch sleep() some time before responding, you can easily do that with php or nodejs. Link to comment Share on other sites More sharing options...
plicatibu Posted January 10, 2014 Share Posted January 10, 2014 Take a look into this article: www.whoopis.com/howtos/web-bandwidth-limit.htmlAnd this apache module probably will solve your problem: dembol.org/blog/mod_cband/ Link to comment Share on other sites More sharing options...
rich Posted January 10, 2014 Share Posted January 10, 2014 Host the game on a local machine on wifi. Now carry an ipad into your garden, or anywhere the wifi gets bad, and load it (heh, there are lots better suggestions above of course) Link to comment Share on other sites More sharing options...
Cameron Foale Posted January 10, 2014 Share Posted January 10, 2014 To avoid without mucking about with servers, try add something like this code at the top of your JS: Phaser.Loader.prototype.originalNextFile = Phaser.Loader.prototype.nextFile;Phaser.Loader.prototype.nextFile = function(previousIndex, success) { var self = this; window.setTimeout(function() { Phaser.Loader.prototype.originalNextFile.call(self, previousIndex, success); }, 100 /* milliseconds */);}; (note: totally untested) Link to comment Share on other sites More sharing options...
jerome Posted January 10, 2014 Share Posted January 10, 2014 It's somethinf different to have some latency in the server response (server waiting before responding, but then responding as fast as usual) and to have a poor bandwith (low speed). Maybe this difference doesn't make sense in the player experience, I don't know. If you are running an Apache 2.5 web server (even locally), you can set up the bandwith with the ratelimit module : https://httpd.apache.org/docs/trunk/mod/mod_ratelimit.html plicatibu 1 Link to comment Share on other sites More sharing options...
Tas Posted January 16, 2014 Share Posted January 16, 2014 I used Charles for Mac, where you can throttle the connection speed easily. http://www.charlesproxy.com/ 1-800-STAR-WARS 1 Link to comment Share on other sites More sharing options...
tackle Posted January 18, 2014 Author Share Posted January 18, 2014 I can fill in that besides Apache you can also limit very easily with nginx. I'm trying local development with WPN-XM and I prefer nginx over Apache. I remember trying limiting locally with Apache before but I never got it working - hopefully it should work now. With nginx it's as easy as setting a "limit_rate" directive. Very useful. Link to comment Share on other sites More sharing options...
VladiT Posted January 24, 2014 Share Posted January 24, 2014 I used a local server http://www.denwer.ru for host and slow proxy http://www.dallaway.com/sloppy for preload tested. Link to comment Share on other sites More sharing options...
Recommended Posts