Parallax Mapping maps, file size

Hi, I just learned how to make a Parallax Mapping. I am new in RPG Maker MV development. Before the development process is too far, I want to plan stuffs as much as possible, so it may reduce problems in the future. When creating this parallax map, it produced six files, they are:
room1-base.png (484 kb) > floor, wall, and objects
room1-overlay.png (13.9 kb)
room1-shadow.png (268 kb)
room1-shading.png (255 kb)
room1-shading-lamp.png (212 kb) > used when the lamp is turned on
room1-light.png (24.2 kb)
Total size: 1257.1 kb (1,2571 mb)

We know that parallax mapping usage will increase the game size in overall and may cause lag in potato computers. 1.2 mb size for a map, 100 map will be around 120 mb. What I want to know is, is that any guide to follow, the best practice, thus we will not go beyond the 'goodness'?
Like how much size will be good for one parallax map? How to optimize it?
How much size will be good for an overall game? I know it depends on the game itself whether use nice graphics, a lot of scripts, or the lenght of the game. But maybe there is a guide for this.

After:
1682144327722.png


Before:
1682145531617.png
Do you need to have all your shadows, shadings and lightings on separate images? What would happen if you did them all in separate layers and then merged down? Would that save you size and work the way you want?

The thing is, though, for the basic map - do you actually need to have that as a parallax? I see nothing there which could not easily be done in the editor at a fraction of the size, even though MV lacks the mapping layers of MZ. For example in the original image you have the carpet stopping at the bottom wall. In the enhanced version you correctly have it going 'behind' that wall. Done in the editor in moments with shift+click mapping.

Oh, just spotted an error on one of your walls.

1682147065865.png
In the middle you have the edging on the top half, but not the bottom.
Do you need to have all your shadows, shadings and lightings on separate images? What would happen if you did them all in separate layers and then merged down? Would that save you size and work the way you want?

The thing is, though, for the basic map - do you actually need to have that as a parallax? I see nothing there which could not easily be done in the editor at a fraction of the size, even though MV lacks the mapping layers of MZ. For example in the original image you have the carpet stopping at the bottom wall. In the enhanced version you correctly have it going 'behind' that wall. Done in the editor in moments with shift+click mapping.

Oh, just spotted an error on one of your walls.

View attachment 259641 In the middle you have the edging on the top half, but not the bottom.
Hi, thank you very much for your thought. I like your comment!

I made them separated so I can manage them easier. Maybe I can merge the light file (light of window) to shading file. For turning lamp on and off, I need 2 shading files in order to achieve that (shading and shading-lamp). The shadow file, I made them separated because it is the shadows of the objects, it will be below character while shading is above. But yes, I can make the shadow of objects merge on base file. With this, I can reduce around 300 kb. But the overall file is still around 1 mb. Is that ok?

I made a parallax in order to make the map/scene looks interesting and can attract the players, also for emotion/feeling. I want to make it pretty. The inspiration came from The Mirror Lied from one of Kan Gao's games. Can we achieve this kind of graphic without parallax mapping? What do you think the method Kan Gao uses for his games, like To the Moon series?
Even it's a basic map, the player will spent around 5 minutes there to solve boxes puzzle (push and pull) as well as grab key on top of the cabinet. The Before version feels lack of something from what I think, doesn't it?

Woah I just know that we can do that by shift + click mapping. Thanks.

Yeah, the error you spotted because I share an old screenshot, but actually I had fixed that.
and it seems that you missed a more important size number in your calculations.

What you have above are the file sizes for storage on the harddrive. Those never affect the game speed (not until they are large enough to cause many other problems as well), but only download size.
and most current players and computers have no problems downloading GB-sized games.

What is really important for parallaxing is not the storage size, but the RAM-Size. To work and use any picture it needs to be uncompressed in RAM, and pictures without compression are much larger than the compressed storage size on your harddrive.

On the other hand, for a working map only the pictures on that map need to be loaded, so the number of files for other maps does not matter.
But the size of the map matters, because uncompressed the larger the map the larger the pictures are. That is why we usually suggest that maps for mobile deployment should be a maximum of 50x50 tiles equivalent, and for full computers a maximum of 150x150 tile equivalent for good computers.

To really understand what numbers the RAM needs, make a test and store the pictures of your biggest map as BMP. The game can't use BMP, but BMP has no compression so the filesize of a BMP picture tells you how much RAM it needs to be loaded.
From my own experience with parallax mapping, RAM consumption from my own testing is usually negligible. Even for a big map (103x56, equal to 4944x2688) where each layer can range from 2mb (lighting) to 13mb (base layer), while also having a layer of animated water with 12 frames and several 32 frame doodads, which does seem extensive but the only difference between that map and an empty map that use the world tileset is the load time. It takes a bit of time to load for me but it's only a few seconds nothing too crazy running off my HDD. My RAM usage in my testing goes from 6.5 GB to 7.1 GB regardless of whether I'm on an empty map or I'm on a parallax map.
So as long as you optimize your png file a bit the only concern with parallax mapping regarding performance is load time and overall file size of the project. As for mobile parallax mapping is usually a pain in the head trying to get it to work, but then again porting anything RPG Makern to mobile will usually be a nightmare to deal with anyway regardless if you even use parallax mapping or not.
@Andar Thank you for the detailed answer! I just don't want people playing my game with big size file and need big RAM, it doesn't make sense. RPG Maker games are light games. I want my game works like old games (2000s and 2010s) where computers with 1 GB can play, or if it is possible 512 mb RAM(Kan Gao's games require only 512 mb RAM). And I don't want my game to be more than 700 mb in size or even GB. This is not a game with HD graphics right.
For reference:
This is a game ends in 1 hour playtime, the size 627mb: https://catowo.itch.io/hana
While this game's size is less (100 mb) and playtime around 5+ hours, and I think this game use parallax maps a lot:
600 mb:
I have questions:
So, should we compress our parallax map pictures?
Is the maximum of 50x50 tiles and 150x150 tiles for one map?

@Puffer Thank you for the detailed answer! 6.5 - 7.1 GB, it means around 600 mb RAM consumed, it's not bad. So what can we do in term of optimizing those load time and overall size?

@Andar and @Puffer do you have any references/link maybe of RPG Games optimization? Like not only the game size but also other aspects.
Keep in mind it's ~600 MB regardless of whether parallax mapping is being used or not. That's like for the entire game running not just parallax map.
As for optimization like I said before you shouldn't worry too much about size. Even for a big map, it's only like 50mb total and that was quite extensive. Most maps won't even go for that much even if you have 100 maps your game file size is still likely to be less than 2GB, like Pocket Mirror it's only 1.7GB and the entire game is mostly parallax mapping.
But if file size really worries you, here is something you can do:
  1. Take a hybrid approach, To The Moon actually mostly used the map editor for their game, with only the lighting part being parallax, which does make it less heavy, but you will be bounded by the limitation of the editor.
  2. Lower the grid size of your project, making maps for a 16x16 grid is obviously going to be less heavy in file size, but it will also come with its own quirk you will need to adapt.
  3. If you want to go fully parallax mapping, being aware of the file type you can use will help a lot. For example, png will support transparency, but it's lossless and usually the heaviest in size and best in quality. You can compress it, but it will still be quite chunky. JPG however is significantly lighter, it can be compressed even further, but the quality will suffer because of it. You can make the decision for each map based on if you need quality, transparent, or a light file size because it's a map that players will load in often. You can also base your game design around that. Like if your game has a particularly big map that takes a while to load in, you can try to make the quest, the story revolves more around that map, avoiding having the player constantly teleport in and out of it, creating a lot of loading and downtime.
Hard drives are very cheap these days, so I suspect that most people probably don't care that much about how much storage space your game uses. But as Andar stated, RAM consumption can get pretty high if you're using large parallax maps.

Regardless of how big the image file is on your hard drive, or what file type you use, it will be converted into a bitmap when MV loads it into memory, and it will use 4 bytes of memory per pixel. This means that a 150 x 150 (tiles) parallax map would use about 50 MB of ram, per layer. So if you're using 6 layers like in your example, that means the map would use a total of 300 MB.

One thing that can be problematic about using such large maps is the fact that MV is written in JavaScript, and JavaScript doesn't have a way for a programmer to explicitly free unneeded things from memory--it stays in memory until the garbage collector gets around to cleaning it up.

This means that there could be situations where multiple maps are loaded into memory at the same time. In fact, even the same map can actually be loaded into memory multiple times. Every time you open and close the main menu, it actually reloads the current map. Supposing you've got a 300 MB map, if the player were to continuously open and close the menu in rapid succession, the RAM usage would climb to crazy levels really fast.

But all that being said, if you keep the size of the maps reasonable, and you keep the number of layers reasonable (i.e. merge them when plausible to do so), you shouldn't really have too much to worry about.

Original thread: https://forums.rpgmakerweb.com/threads/parallax-mapping-maps-file-size.156884/