Andrezze94

Can Phaser manage large images like Leafletjs?

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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.