How do I use huge images without making the game lag

0 favourites
  • 7 posts
From the Asset Store
Make your own platformer for both the web and mobile easy with this Santas Platformer Template, FULLY DOCUMENTED
  • So I'm making the game where you basically climb up through platforms and the higher you go the darker it gets. Once the player goes to space I could make it completely dark and use small images, but I really want the starting look really nice and to do so I need to use huge sizes like 9000x3000 which makes the game lag. Any tips ?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • So I'm making the game where you basically climb up through platforms and the higher you go the darker it gets. Once the player goes to space I could make it completely dark and use small images, but I really want the starting look really nice and to do so I need to use huge sizes like 9000x3000 which makes the game lag. Any tips ?

    Considering an image that size would use up approx. 108MB RAM I'd suggest not using something that size. Also, few GPUs would be able to render such a texture size.

    Have you tried splitting it up into smaller chunks?

  • [quote:2s1dq1d2]Considering an image that size would use up approx. 108MB RAM I'd suggest not using something that size. Also, few GPUs would be able to render such a texture size.

    Have you tried splitting it up into smaller chunks?

    The file size is like 2mb and yeah I considered doing that, but it would take me so much time and I don't even know if that would help

  • Hey deropke2 hi.

    Yes you can!

    By the way it is really simple even with more complex images than this one.

    3-5 minutes in construct 2 editor.

    http://www.filedropper.com/smallimage

    I think you get the idea.

    Cheers.

  • [quote:3b023uoe]Considering an image that size would use up approx. 108MB RAM I'd suggest not using something that size. Also, few GPUs would be able to render such a texture size.

    Have you tried splitting it up into smaller chunks?

    The file size is like 2mb and yeah I considered doing that, but it would take me so much time and I don't even know if that would help

    File size has nothing to do with memory size..

    In memory the image is unpacked..

    9000x3000x4= 108000000 bytes = 108MB would be the memory size if not placed on a power of 2 texture (which sometimes happens), in which case it would be bigger 16384x16384x4 = 1074MB..

    Sounds like a really bad idea to me..

    Making a much smaller sprite with a gradient and just stretching it should work just as good..

  • The information on filesizes and memory use has been extensively written about by Ashley in numerous posts and blogs. It takes very little effort to find them.

    A useful start would be THIS blog from Ashley.

  • [quote:am64jqvy]

    Making a much smaller sprite with a gradient and just stretching it should work just as good..

    This is a good idea, I'm going to try it

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)