Best optimized way to implement huge parallax map animations?

Hello all!

My game features a level in which the entire map is animated. The character is pretty much in a fleshy dungeon/cave and the walls and floors themselves are alive and sorta twitching. The good news is that these animations are pretty much limited to 2 or 3 frame loops. The bad news is that the maps are huge and since the walls and floors themselves are moving, the entire map image pretty much needs to be swapped out/modified constantly.

The entire map is parallax. No tiles whatsoever. The map is also for an HD (1920x1080) game and some of these maps will be several thousand pixels large. So I'm wanting to think about optimization early.

Flesh Room.png


This is an example of a very very small room where the walls and floor will need to sorta twitch on a loop. But however I do this needs to be upscale-able to much much larger maps (like I said, thousands of pixels wide).

One method I'm considering is using Yanfly's Grid-free-doodads where pretty much the entire floor is a Doodad and all the walls are Doodads which will allow me to have them play on a constant loop using the plugin's animated Doodad's function. I've also heard great things about the plugin's optimization so this is a pretty enticing option to me.

Are there any other solutions that would serve me better (i.e. be better performance-wise) that would allow me to have my entire map be animated?

Thanks!
I would advise breaking this into smaller bits, whether that means tiles or doodads is up to you, though.

First, it'll make the file size and loading times almost certainly less. You can reuse assets, after all. Goopy Wall A and Goopy Wall B can just be the same image repeated, unlike in a parallax where it's all one giant image.

Secondly, and perhaps more importantly, it's so much easier to edit if it's broken into smaller chunks. I know with my map design, I constantly fiddle and playtests maps until they feel right. And, that's very easy to do when you have an easy to use tileset ready to go. Simply lay down new tiles! But, if the entire map is one image... you can't do that without redrawing the whole thing.

If you want your entire game to be like this, I advise looking into the TileD plugin. That plugin lets you use an outside program, called TileD, to make maps. It's very powerful once you get use to it. Much stronger than MV's base map editor.

Whether you're working in TileD, or you're using doodads, though, you'll need to break this image into smaller, placeable chunks. I would advise looking at some complex tilesets from other games, to see how they do it. Axiom Verge has some real good high res and complex tilesets.

You'll save a ton of headache by making this into tiles or smaller objects. It'll load better, and it'll be easier to edit.
you can use EVENT to animate things... for example event that become a chimney at the roof which will blow smokes... or event that become a grass that sway with with the wind... or a spinning weather vane on top of the roof... or a wall that have moving insect on it... your event basically could become anything with any image... you can then set it to 'below character'... and match it with the parallax below so it blend with the background... i think it will be lighter than using doodad plugin...

just create the spriteset for the event 'character' and have it have walking animation for 'cheap' trick animation... you can even utilize custom move route if you want more frame in your animation...
you could also add shadows or little gemstone lights that are moving..

for example in my current project i use this water event and stepping animations to make the effect shown in the video..



-just to be safe this is made with following source:
(with little edits to fit in my project)
I would advise breaking this into smaller bits, whether that means tiles or doodads is up to you, though.

First, it'll make the file size and loading times almost certainly less. You can reuse assets, after all. Goopy Wall A and Goopy Wall B can just be the same image repeated, unlike in a parallax where it's all one giant image.

Secondly, and perhaps more importantly, it's so much easier to edit if it's broken into smaller chunks. I know with my map design, I constantly fiddle and playtests maps until they feel right. And, that's very easy to do when you have an easy to use tileset ready to go. Simply lay down new tiles! But, if the entire map is one image... you can't do that without redrawing the whole thing.

If you want your entire game to be like this, I advise looking into the TileD plugin. That plugin lets you use an outside program, called TileD, to make maps. It's very powerful once you get use to it. Much stronger than MV's base map editor.

Whether you're working in TileD, or you're using doodads, though, you'll need to break this image into smaller, placeable chunks. I would advise looking at some complex tilesets from other games, to see how they do it. Axiom Verge has some real good high res and complex tilesets.

You'll save a ton of headache by making this into tiles or smaller objects. It'll load better, and it'll be easier to edit.

Very much appreciate the response! I'll probably stick to full parallax maps unless it runs unplayably slow simply because I don't like the aesthetic of tiles/re-used assets. I'm also using QMovement which gives my players pixel-based movement so having things locked to the grid is a pretty big no-no for my game.
The map itself is several layers in photoshop so it's not like it's one image. It's just the way I'm comfortable with working and produces the most organic maps for my style.

I'm not quite understanding what you mean by breaking it into chunks. Wouldn't loading two 500x500 images be slower than loading a single 1000x500 image? Why would making the same map in several small chunks load better than a single image of the entire map?

Thank you once again for the response!

you can use EVENT to animate things... for example event that become a chimney at the roof which will blow smokes... or event that become a grass that sway with with the wind... or a spinning weather vane on top of the roof... or a wall that have moving insect on it... your event basically could become anything with any image... you can then set it to 'below character'... and match it with the parallax below so it blend with the background... i think it will be lighter than using doodad plugin...

just create the spriteset for the event 'character' and have it have walking animation for 'cheap' trick animation... you can even utilize custom move route if you want more frame in your animation...

I already need to use the Doodads plugins for other stuff so that's why I found it appealing to just sorta expand its usage to the map animations.

Could I ask why eventing would be more optimized than plugins? I thought it was usually the reverse - that plugins normally run much better than a series of complex events?

Very much appreciate the response - I might try messing around with some custom move routes and see how that pans out!


you could also add shadows or little gemstone lights that are moving..

for example in my current project i use this water event and stepping animations to make the effect shown in the video..



-just to be safe this is made with following source:
(with little edits to fit in my project)


Thanks for the tip! The animations on my map are quite a bit more substantial though (just in terms of size and degree of motion) which is why I was looking for some potential other routes. But I'll keep that in mind. Your game looks awesome btw!
Very much appreciate the response! I'll probably stick to full parallax maps unless it runs unplayably slow simply because I don't like the aesthetic of tiles/re-used assets. I'm also using QMovement which gives my players pixel-based movement so having things locked to the grid is a pretty big no-no for my game.
The map itself is several layers in photoshop so it's not like it's one image. It's just the way I'm comfortable with working and produces the most organic maps for my style.

I'm not quite understanding what you mean by breaking it into chunks. Wouldn't loading two 500x500 images be slower than loading a single 1000x500 image? Why would making the same map in several small chunks load better than a single image of the entire map?

Thank you once again for the response!

If you're using an image only once, I think (key word think, I'm no expert) it should be the same whether you subdivide or not. Like, loading a 10x10 image should be the same as loading two 10x5 images. Both are loading 100 pixels.

The reason that splitting a map into tiles (or doodads) is that it allows you to reuse assets. This isn't a lazy thing to do! Even massive, high budget games reuse assets all the time. It's a pretty smart way of designing things, as it makes things run and load better, and it makes it easier to edit down the line.

As a simple example, if the map that you're on is on board an alien spaceship, and these aliens have green tables... and down the line, you say "you know what, I wish the aliens had BLUE tables" it's really easy to fix that if the table is a single asset. Change it once, and all instances are updated. If, however, each and every map on this alien spaceship was one giant parallax, you'd need to edit each of those parallaxes individually to change those tables. It can be done, but, it's a real headache as projects get bigger and bigger.

This is one of the reasons I try to work with common events, and Yanfly's event copier, so much. It makes managing a giant game project easier. You, as the designer, aren't locked into older choices, as everything is easy to edit. I have rewritten the eventing of my Save Points several times, and because it's all running through a single copied event, I only need to update one thing and the entire game refreshes. If each save point was placed manually, though, then I'd need to hunt down and search for each of them, and there's a good chance I'd miss one. It's the same logic as using tiles or doodads, it makes housekeeping your game much much easier, which is key to large projects.

The choice is yours to make. Just be aware of these issues when going into parallax mapping.
Why would making the same map in several small chunks load better than a single image of the entire map?
the problem isn't the load times - it's the RAM requirement.

To work on a map all its picture components need to be store in RAM without compression. And a parallax map needs several thousand times the RAM compared to a tiled map.
If you use a large map with a 3-frame animation, that means either the RAM is large enough to hold the parallax picture three times (one for each animation frame) in memory, or it would have to be reloaded every time the animation frame switches.

Obviously reloading the map picture with every animation will create a lot of lag, so the RAM of the computer will have to be large enough to hold the map three times (or more if you have more animation frames).

and now for the trick to see that RAM-size: store your pictures as BMP.
BMP has no compression, so the filesize is exactly the RAM-requirement of keeping that picture in memory. And that is a lot larger than the compressed filesize of a PNG, but the compression only reduces the load time not the RAM-Requirement while working on the map.

Please keep in mind that the computer needs RAM for other purposes as well, you can't completely block it with parallax pictures.
As a general rule of tumb a good high-end computer is needed to handle a roughly 100x100 tiles (4800x4800 pixel) static parallax map. A really top-line current computer might be able to handle 150x150 tiles parallax maps but I wouldn't bet on that.
When exporting to mobile devices the much lower hardware of those means that static parallaxes above 25x25 tiles (1200x1200 pixel) are already lagging there.

Animating the parallax will make the requirements worse as explained above, because you can't be constantly loading the next animation frame without lag.
So what you want to do is much easier if you split the map into smaller parts.
the problem isn't the load times - it's the RAM requirement.

To work on a map all its picture components need to be store in RAM without compression. And a parallax map needs several thousand times the RAM compared to a tiled map.
If you use a large map with a 3-frame animation, that means either the RAM is large enough to hold the parallax picture three times (one for each animation frame) in memory, or it would have to be reloaded every time the animation frame switches.

Obviously reloading the map picture with every animation will create a lot of lag, so the RAM of the computer will have to be large enough to hold the map three times (or more if you have more animation frames).

and now for the trick to see that RAM-size: store your pictures as BMP.
BMP has no compression, so the filesize is exactly the RAM-requirement of keeping that picture in memory. And that is a lot larger than the compressed filesize of a PNG, but the compression only reduces the load time not the RAM-Requirement while working on the map.

Please keep in mind that the computer needs RAM for other purposes as well, you can't completely block it with parallax pictures.
As a general rule of tumb a good high-end computer is needed to handle a roughly 100x100 tiles (4800x4800 pixel) static parallax map. A really top-line current computer might be able to handle 150x150 tiles parallax maps but I wouldn't bet on that.
When exporting to mobile devices the much lower hardware of those means that static parallaxes above 25x25 tiles (1200x1200 pixel) are already lagging there.

Animating the parallax will make the requirements worse as explained above, because you can't be constantly loading the next animation frame without lag.
So what you want to do is much easier if you split the map into smaller parts.

I see! That makes a ton of sense. Really appreciate you breaking it down for me like that.

So if I have a 10,000 x 10,000 map (for example), I'd pretty much need to only load what the player is currently seeing (which would be a 1920x1080 window that moves around as the player moves around).

Do you know of any plugins or solutions to achieve this dynamic loading of different chunks of the map while the player moves around?

Thank you once again!
I already need to use the Doodads plugins for other stuff so that's why I found it appealing to just sorta expand its usage to the map animations.

Could I ask why eventing would be more optimized than plugins? I thought it was usually the reverse - that plugins normally run much better than a series of complex events?

Very much appreciate the response - I might try messing around with some custom move routes and see how that pans out!
it's not complex eventing... it's only utilizing the event spriteset image...
and since you only 'animate' the part that needed to animate only instead of whole map... it will be lighter than having whole animated parallax map which take lot more memory...

i don't know about doodads though... does event technique also lighter than doodads... since i never use that plugin before... but i assume event might potentially still be lighter... because event above certain tile range will not update... so it will make the idea even lighter than using plugin... of course if that behavior disturb your animation you might use doodads instead...
I'd pretty much need to only load what the player is currently seeing
the problem here is that you can't load partial pictures.
If you go the parallax map route, then you always have to load the entire map - which is why it was suggested to cut the map up into several smaller maps.

the other route is what the editor does - tiles of the map. Bevcause that way you only need to load the tileset, and can construct almost any size of a map from those tiles.
The MV editor uses 48x48 pixel tiles as the basic element for creating maps.

anything between (like constructing the map from larger parts) will require a plugin to really change the engine - the existing plugins for changing grid size are limited to a maximum tilesize of about 100x100 pixel, anything larger will require a lot more changes to be able to work.

Original thread: https://forums.rpgmakerweb.com/threads/best-optimized-way-to-implement-huge-parallax-map-animations.132823/