digitalfruit / limejs

HTML5 game framework for web and iOS
http://www.limejs.com
Apache License 2.0
1.39k stars 280 forks source link

TMX example not working #115

Open yanickrochon opened 10 years ago

yanickrochon commented 10 years ago

I have resurrected an old project to find out that my map (TMX) layer was not showing anything. Going through forums and, even the tests folder, I realized that tiled3.js does not work either. Nothing shows up. No error.

Can anyone confirm this, or is there something that I am missing? Thank you.

tonistiigi commented 10 years ago

cc @funinvegas

yanickrochon commented 10 years ago

LIttle precision, using the DOM renderer works. Using CANVAS does not.

yanickrochon commented 10 years ago

I came back today and tried make the test work and wrapped the entire test inside a delayed function :

test.start = function(){
  setTimeout(function() {

      /* original test code here */

  }, 1);
}

And surely enough, it works. My guess is that some initialization takes place and code need to be delayed to work properly.

tonistiigi commented 10 years ago

Seems to be a caching issue. It doesn't work on full reload but works on page switching for me. So probably another solution would be to preload the graphics.