06-09-2020, 05:27 PM
(This post was last modified: 06-09-2020, 05:30 PM by DerVVulfman.)
ANOTHER
ADAPTIVE BUMP!
to version 1.5
Well, I have another update related to Zeriab's Anti-Lag system, one that is pretty crucial. This one fixes an issue where Zeriab's system places sprites within the map before Big Maps creates its compiled array of events from all the maps.
Wait. What? What do you mean????
When the system runs, both Big Maps and Zeriab's Anti-Lag run their own setup code.
Zeriab's code quickly and cleanly grabs all of the events and compiles them into a nifty event_map array and then draws them on the Spriteset... the field map that you see. So you have a map and a bunch of events already set up for display.
But right after Zeriab's setup code, Big Map's setup code then runs, compiling the events from every map that is part of the so-called 'big map' into a new 'events' array and starts fresh. After that, it then works on putting all its events in the same Spriteset / field map.
There in lay the dilemma. Zeriab's code draws sprites from the very first map in the list before Big Maps can get to compiling all the sprites. When Big Maps takes over, all the Zeriab sprites are already drawn. However, Big Maps also eliminates the old events array... detaching the Zeriab sprites from their events. The old sprite graphics remain pasted in the field map right before the Big Maps sprites appear.
This effect could be considered 'static sprite cloning'. If a 'Hilda' sprite was in a big map and was supposed to be walking back and forth, you would see a very active witch in blue going left to right on the map. But you would also see a blue-robed witch standing still where Hilda was originally drawn, the static clone.
This only happened with the first map of the Big Maps array. Even if I were to teleport to the right-most map in a grid, only the top-left most one was affected. Weird, but Big Maps compiles maps left/right top/down.
Yeah, Zeriab's system to draw the sprites... good! Drawing them before Big Maps finishes compiling all the sprites... bad!
So this new Adaptive update adds a new map condition, one to determine when the map begins to load if it is a Big Map or not, and turns itself off when it is either NOT a big map or the map is finally done setting up.
And it attaches some code to Zeriab's AntiLag to stop it from drawing the sprites ... IF it is a big map and isn't ready with all the events.
Oh, don't worry if you're not using Zeriab's AntiLag. I added conditions so it only tries to add the code to Zeriab's work if it is detected. Otherwise... you're good to go.