Jump to content

Can Phaser manage large images like Leafletjs?


Andrezze94
 Share

Recommended Posts

Hello everyone,

So I've discovered this lib recently and I'm quickly becoming a great fan of it. But I need help with something.

I am working in a project that we use http://leafletjs.com/ to create something similar to a boardgame but with very large images (i.e 10000x6000), the good part of leaflet is that he uses the large image cropped in smaller tiles to make it more fast in the browser, very similar to what is used in Google Maps. It also have the possibility to zoom the image.

My question is, if it is possible to do something like that in Phaser? Or if Phaser has some kind of solution? Phaser has lots of stuff that we like to use in our project, our only problem is the images, because it might cause some performance issues in mobile devices and slow internet connections.

 

Thanks in advance, and keep the good work in this great lib, I am started to became in love with it :D

Link to comment
Share on other sites

Phaser doesn't have any native support for splitting a giant image into pieces - so you'd have to use an external app to do this. It could then load all of the pieces in. Personally I'd then assign one texture to a unique Sprite and position them such that they all line-up, creating the giant image.

 

Just loading that many textures in low-end mobiles will be a problem - but test it and see how far you get. If performance is horrendous on mobile then you may need to scale the textures down to keep memory low. Desktop should be fine though.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...