Parallax map works on PC/Mac but shows as black on mobile?

Discussion in 'RPG Maker MV' started by ddblue, Dec 10, 2018.

  1. ddblue

    ddblue 新人 Veteran

    Messages:
    120
    Likes Received:
    15
    Location:
    Japan
    First Language:
    English
    Hi guys.

    I have used parallax maps for my entire project. It looks great and I had not run into issues until recently. I use Orange Overlay for my parallax mapping.

    Anyway, a map I am using shows a black background on mobile (iOS in my case). In the editor and on PC it is not black and shows up normally.

    My map size is fairly large, but still well under the maximum.

    Any idea what might be causing this or how to fix it?

    Thanks.
     
    #1
  2. Eliaquim

    Eliaquim Raze: The Rakuen Zero's Guardian! Veteran

    Messages:
    735
    Likes Received:
    260
    Location:
    Brazil - Rio de Janeiro
    First Language:
    Portuguese - Br
    Primarily Uses:
    RMMV
    If i'm not wrong theres one person that has have this issue maybe can help you @JAD94.

    But in my case, i used to play a lot with parallax in pc and mobile. I tested several plugins and check performance and compability with all of them.
    This include orange overlay, Khas and many others...
    But the best i found is the Galv Layers. If you cannot resolve this, maybe change the plugin and see if can help you.
     
    #2
    JAD94 likes this.
  3. JAD94

    JAD94 The lunar knight Veteran

    Messages:
    664
    Likes Received:
    187
    Location:
    New York
    First Language:
    English
    Primarily Uses:
    RMMV
    Thank you for your suggestions I will try them out :)
     
    #3
  4. ddblue

    ddblue 新人 Veteran

    Messages:
    120
    Likes Received:
    15
    Location:
    Japan
    First Language:
    English

    Thank you for your reply.

    I took your advice and removed the plugin I was using and instead tried Galv's but unfortunately I run into the same problem. I confirmed it was working on PC / Mac, but on mobile it goes black and only the sprites are visible. The map size is 112 x 47, so pretty far under the max size, but still run into this problem.

    There must be some kind of unwritten rule about how big a parallax map can be on mobile, I'm just not sure how I could figure that out.
     
    #4
    Eliaquim likes this.
  5. Eliaquim

    Eliaquim Raze: The Rakuen Zero's Guardian! Veteran

    Messages:
    735
    Likes Received:
    260
    Location:
    Brazil - Rio de Janeiro
    First Language:
    Portuguese - Br
    Primarily Uses:
    RMMV
    Yeah... I never put a parallax map so big.
    Also, the ground i always make with tilesets. Its helps to make the parallax not so big in mb.
    But maybe this is due to the size. You tried with a small parallax to confirm?
     
    #5
  6. ddblue

    ddblue 新人 Veteran

    Messages:
    120
    Likes Received:
    15
    Location:
    Japan
    First Language:
    English
    So i tried changing various things, and eventually got to the point where all I changed on a map that was confirmed working was the png I used for the parallax and it still didn’t work.

    So the issue has to be with the png itself. I checked file size of ones that worked and ones that didn’t. The biggest working png in a parallax was 4mb. The one I’m having trouble with is 27mb, so that might be my issue. I’ll try to shrink it and report back.
     
    #6
    Eliaquim likes this.
  7. Eliaquim

    Eliaquim Raze: The Rakuen Zero's Guardian! Veteran

    Messages:
    735
    Likes Received:
    260
    Location:
    Brazil - Rio de Janeiro
    First Language:
    Portuguese - Br
    Primarily Uses:
    RMMV
    Have you tried to compress the png file?
     
    #7
  8. ddblue

    ddblue 新人 Veteran

    Messages:
    120
    Likes Received:
    15
    Location:
    Japan
    First Language:
    English
    Tonight I had a chance to try various compression methods. I got it down to 8mb, but I still get the same problem. I'm really bummed out, as I am not sure what to do and I worked really hard on this map.

    Edit: Pinpointed the issue after lots of grueling tests. The file size is NOT related. Even a 20mb file will work. The issue is the actual proportions of the image. If they are past a certain size, THAT will cause this problem! ... Which is sad, because there's no real way to fix that other than to cut up your maps...

    I wonder if there is a way to tell by looking at the code for the Orange Overlay or other parallax mapping plugins what the max image size can be?
     
    Last edited: Dec 11, 2018
    #8
  9. LTN Games

    LTN Games Veteran Veteran

    Messages:
    622
    Likes Received:
    475
    Location:
    Canada
    First Language:
    English
    Primarily Uses:
    RMMV
    If the file dimensions is over 2048x2048 then it won't work, it's an unwritten rule for MV but a very well known rule for all mobile game devs.
     
    #9
  10. ddblue

    ddblue 新人 Veteran

    Messages:
    120
    Likes Received:
    15
    Location:
    Japan
    First Language:
    English
    Thanks for the reply.

    After a few more tests, I was able to narrow it down further, but I've gotta call it a night here soon.

    So I can confirm that a parallax map of 4096 x 2112 will work exported from RPG Maker MV on iOS.
    I have also confirmed that a 5410 x 2255 map is too big, and causes the problem.

    I also found out that cutting the height in half doesn't help - so 5410 x 1125 still breaks it... which means that 5410 is too wide, but 4096 is not. I guess I'll need to test more to find out exactly what value is the max before this problem will happen. Or would anyone happen to know what determines that? Is it the memory of the phone or something?
     
    #10
  11. LTN Games

    LTN Games Veteran Veteran

    Messages:
    622
    Likes Received:
    475
    Location:
    Canada
    First Language:
    English
    Primarily Uses:
    RMMV
    Seems IOS allows 4096 x 4096 but I'm almost positive for android it won't work but times are changing and fast so maybe it does now. You will most likely have issues with older IOS and Android OS versions. My guess is 4096 is the new texture size but most likely will come with performance issues in the long run.
     
    #11
  12. Andar

    Andar Veteran Veteran

    Messages:
    28,437
    Likes Received:
    6,488
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    @ddblue
    there are two reasons for your problems, both related to RAM.

    For a parallax map to work, it needs to be completely loaded into memory. And memory size is NOT the same as file size.
    File size is a compressed data storage while RAM needs to be uncompressed. Store your parallax as a BMP (which has no compression) and you'll know how much RAM it will need to play on that map. A Map of 112x47 tiles is already beyond the maximum for a parallax map that most mobiles can handle, you probably only got that to work because Apple usually gives more RAM in its devices than other companies. Personally I would suggest to stay below 50x50 for parallax maps on mobiles (and below 100x100 if you want them to run on older desktop computers).

    Second, exactly because those RAM-Limits are known there is or was a fixed limit for picture size in the nw/pixi parts of the engine. Someone else stumbled over it as well when they tried to increase the gridsize with a plugin and the result made the tilesheets go beyond that number. That is what @LTN Games was referring to in his posts above.

    And just as an info and third point:
    On average, a parallaxed map need around 2000-3000 times the RAM compared to a tile-based map. And that is no joke - in a tileset you'll need one number to tell which tile to place. In a parallaxed map you need 3 Bytes (24 bit color) for each of the 48x48 pixels of the tile. The exact number depends on the number of layers and a few other points as well, but that is why the mobiles with their lower RAM have more problems with your maps.
     
    #12
  13. ddblue

    ddblue 新人 Veteran

    Messages:
    120
    Likes Received:
    15
    Location:
    Japan
    First Language:
    English
    Andar, thank you. This was very informative!

    In light of what Andar said, big parallax images are typically a no-no, but in case anyone runs into this problem and does want a solution, I will let you know what I just figured out thanks to a buddy of mine.

    Using Galv's plugin, you can have multiple layers at once. So what I did was leave the map size in-game the same, and cut the parallax image into 2 smaller pngs. I then used Galv's plugin to display one with 0x 0y offset, and to display the other right next to it with an appropriate x y offset that put the 2 images side by side. Since neither parallax image is 4096 x 4096, both are displayed seamlessly simultaneously - thus solving my problem.

    That said, Andar's comment stands. This is a heavy use of memory and will likely render your game unplayable on certain phones. You'll have to draw the line at the phones you are willing to support and decide for yourself if it's worth it for you or not.

    Thanks again, everyone.
     
    #13

Share This Page