Could not reserve memory for image - Scene is too big - what's the best approach?

  • #1, by F_KalMonday, 20. February 2017, 02:24 7 years ago
    I was trying to recreate a vertically scrolling screen where the character is seen descending 4-5 screens down. Of course it could had been rendered in a movie file instead, but I tried doing it inside the engine:

    I created a 1920 × 5400 PNG file (it was 3 channels PNG, no alpha), and set it as scene background. It wouldn't load inside the mac editor though. At first I thought there was something wrong with this particular PNG (created by Affinity Designer) but I did the same in Photoshop and seems PS has the same issue.

    I found an older thread dating back in 2011 on the issue, but it was only tackling the problem in the player. Even back then, the editor wouldn't display it. I've increased the Sprite Cache Size to 80MBs but I still get the following error on the editor's log:
    Error: Could not reserve memory (40500 KB) for image 'Rooms/LivingRoom3/LivingRoom__0010_background-gradient.png'. Largest available memory block is 40000 KB. Please increase the memory size in the project settings (fields GamePreloadedPicBufferSize/GamePicBufferSize for max. image size of a preloaded animation or any other image respectively).

    What is the right approach in working with big scenes?

    Thank you!

    Forum Fan

    107 Posts

  • #2, by afrlmeMonday, 20. February 2017, 12:00 7 years ago
    Visionaire Studio just seems to have issues with large scenes on the y-axis for some reason. I think you can maybe go up to 2x 1080, but not 100% sure. Width wise at least 2-3x 1920, but again, not sure - it's more down to experimentation.

    I would advise against super massive scenes as they will be very system resource heavy. What you could do is chop it up into multiple scenes & use the show/scene menu or change to scene with immediate transition ticked so that it seamlessly changes from one scene to the next when you tell it to instead of fading. It probably won't look as nice, but it should do the trick in a pinch.

    P.S: what won't show up in the editor might display when you run the game, but there's no guarantee.

    P.P.S: If you really want to use a single scene then you could try using a transparent png/webp at width/height you need the scene to be & then chop up the actual background image into tiles & add them as scene objects.


    7278 Posts

  • #3, by F_KalMonday, 20. February 2017, 14:12 7 years ago
    ah! Once again @AFRLme, very helpful!
    Thank you so much!

    Forum Fan

    107 Posts