How are maps managed when battles are processed?

Twisted Crow

Villager
Member
Joined
May 16, 2016
Messages
24
Reaction score
8
First Language
English
Primarily Uses
RMMV
So, I have this theory brewing on managing lag in battles when you have various things going on in maps (looping animations, lots of events, maybe parallaxes, etc). But I want to ask how this works before getting too deep in this "Battle Manager" map idea/trick that I am experimenting with.

To my understanding, when a battle starts after the transistion effect... the battlebacks are loaded and pasted over the maps and the encounter's battlers are called onto the stage floor to "do their thing", so to speak.

While this is going on, events on a map are generally stopped but still being tracked and "remembered" while battle is taking place. Is this accurate?

I have a system I am testing that moves the player to a blank, black map with no events before a battle happens (via Common Event and some variables and switches). Once the battle is over, the player is taken back to the map they were on. The way this is evented in presentation is almost seemless and appears to help with lag when taken away from maps with a lot of stuff going on.

So... am I losing it? Or does this theory (along with my understanding of how battles work under the hood) actually hold up?

Thanks for your time!

-TC
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
It might work well actually. The game pauses it by taking a snapshot of the map before a battle, and that snapshot takes up more memory the bigger the map is. So it would stand to reason a bigger map would cause some battle lag too.
 

Twisted Crow

Villager
Member
Joined
May 16, 2016
Messages
24
Reaction score
8
First Language
English
Primarily Uses
RMMV
Ahhh... now that also makes more sense!

Thought about this more as I have been experimenting with this for a couple of days. Either making a quick tutorial on how to engineer this through eventing & scripting way or maybe working together a simple plugin so that games could manage this a bit better.

But I was not sure about this if it was just helping with my project or if it could be more helpful in general.
 

Twisted Crow

Villager
Member
Joined
May 16, 2016
Messages
24
Reaction score
8
First Language
English
Primarily Uses
RMMV
So... the snapshot is simply used for the game to remember stuff?

That plugin seems to make sense from a lot of things, actually.

Fallen Angel Olivia (at least, I think that is who this is?) has been rather brilliant in what creations I have seen thusfar. It's too bad I don't even have dimes to rub together to send her way on these little gems.

Anyway, I think I have a few ideas I might work on regarding this. I will probably start working on a "ghost map" tutorial of sorts if one doesn't beat me to the punch, already. :)

I get the feeling that a lot of other things contribute to battle lag but I think I am good to go. Thanks for your time!
 

Twisted Crow

Villager
Member
Joined
May 16, 2016
Messages
24
Reaction score
8
First Language
English
Primarily Uses
RMMV
Or Irina, rather? I was wrong. My bad.
 

lianderson

Veteran
Veteran
Joined
Dec 27, 2012
Messages
441
Reaction score
339
First Language
English
Primarily Uses
N/A
Watch out for that double posting yo!

Hmmmmmmm, reading what you're trying to do, I actually used that exact idea before. Long story short, the map was laggy and unstable due to an old script, and this allowed things to work better for the battle screen.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
The map is "lost" when the battle begins, in a sense that you're actually transported to Scene_Battle from Scene_Map (so no map processing of any kind happens at this point, its a completely new scene, not just painted above the map). As bg said though, the data for the map is still on memory which adds to the memory usage of the game. So yeah, having a map with very little in it might help alleviate some lag because it will help free some resources from memory before the battle.

Its actually the same for when you're opening the menu, you're transported from Scene_Map into Scene_Menu (or any other Scene actually) the game keeps the data of the map in memory so that when you close the menu they can return you to Scene_Map and everything will be like before you opened the menu.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,853
Messages
1,016,990
Members
137,562
Latest member
tamedeathman
Top