Instantaneous Map Transfer

I would be very grateful if anybody could figure out a way to script a workaround for the way that MV transfers the player between maps, in order to make a transfer with the Fade set to None truly instantaneous and seamless, like it was in VX Ace. Currently, a no-fade transfer still hiccups for a second or two, which stops the action and is very noticeable to the player.


I'm porting a horror/adventure game I'm working on over from VX Ace onto MV, and I have previously made use of the no-fade map transfer in certain areas - in some cases to trick the player by shuffling around the environment (this is horror, so occasional disorientation is intentional). It can also be useful to create the illusion of semi-3D areas, with the player traveling through tunnels above or below other passages, without obnoxiously reminding the player (via loading pauses) that they are switching maps every single time.


I fear that this kind of instantaneous map transfer will be impossible given the focus on mobile gaming that RPG Maker MV has, and it's way beyond my scripting capabilities at this time, but if somebody out there who knows the technical aspects of the way the program functions has any ideas about how to do this, I'm all ears. As it stands, I'm facing the prospect of simply having to redesign those parts of my game that rely on a seamless transfer, but that's really not an ideal development strategy for me.
Seconded -- the jerky fadeless transfer is a real disappointment for so many reasons. It's essential for creating a seamless flow between maps, and for what you're using it for, it seems essential. 


I'm also looking for some fixes to this -- it's just not workable for every transition to have fades! Let me know if you come across a solution and I"ll do likewise.
I too have been looking into this and have tore the base code apart trying to figure out why it has been happening. I can honestly say I have spent 4-5 hours trying small edits here and there trying different things with no avail. This is very frustrating and almost all of my maps in my Ace project used instant transfer, so this problem in MV is really noticeable and absurdly annoying.
Thanks for looking into it, anyway. I was starting to think I was the only one who cared about or noticed this bug. The switch to MV has been frustrating on many counts. I guess for now the mystery remains.
No progress on solving the problem, but I did notice that if you transfer to an area on the same map with no fade the map loads a lot faster... like almost as fast as Ace did.


I am starting to think it may be something to do with the way that $dataManager.loadMapData works, cause if its on the same map it just requests a refresh instead of pulling all the data out again.


If only there were a way to cache all map data without it bogging down the system... say maybe have a plugin command(or something) when moving to a new map to force it to load the next areas maps. Say 'map A' has connections to 'map B' and 'map C' you would tell it to go ahead and load those 2 early into a cache, and lets say that 'map B' and 'map C' connect to 'Map D', so when moving onto those maps you would tell it to load both A and D since they would be connected.


Here is a fast and basic visual aid to my idea... xD   sloppy art at its finest Example Idea.png


This caching effect would need to happen after the current map is loaded, or the problem we are having would be the same or worse, sadly.  Make it run as a parallel process on the map so it wont hurt the initial loading or something like that would be my guess at a method.
haha if only my maps looked as nice as that diagram 🙂


i only just encountered this problem, so i haven't yet made any attempts with the Preload Manager plugin that currently exists. zharth, the original poster, apparently gave that the old college try and was not able to make any improvements on the situation.


obviously an idea like you're suggesting would be the ideal solution. i'm really rather astonished that no one else has found this map transfer issue to be a big enough nuisance to post about until now!


i feel like it ought to be considered a bug. that fadeless map transfer simply doesn't work properly and cannot be used in its current form. the role of plugins really should be limited to adding functionality, not fixing bugs and problems, though i realize they do often take on that role. with enough visibility and a persuasive enough bug report, i wonder if it might get noticed ...
i'm really rather astonished that no one else has found this map transfer issue to be a big enough nuisance to post about until now!



Exactly!

i feel like it ought to be considered a bug



I encountered a lot of attitude regarding the music delay issue (now thankfully solved by using the Preload Manager along with the WebAudio Cache plugins). People would insist that it's not a "bug", it's just the way the program works, given that it's been designed for the mobile platform, and thus can't handle caching large media files. But this is RPG Maker. It's designed for making games with background music (not just short, looping sound effects). The bottom line is that the program ships with background music that you're supposed to be able to use (as you have in previous versions of the program) but can't without very unprofessional pauses and time sync issues - solved only by user-designed plugins. This map fade transfer is a similar problem, and as yet, I hadn't even found a single other person who noticed, let alone tried to fix it.

I am starting to think it may be something to do with the way that $dataManager.loadMapData works, cause if its on the same map it just requests a refresh instead of pulling all the data out again.



Your algorithm there makes a lot of sense, and would be a brilliant solution to the problem, if you're right about where the problem is, and how it could be fixed. Thanks for taking a crack at it! When I do map transfers within the same map, however, I get the same loading pause as I do when transferring to a different map (occurs when testing a new project, with no plugins). So, I'm not sure why your results were different from mine...
The loading pause is still there, but its fewer frames than when moving from map A to map B. I also noticed that distance from point A to point B on a single map seems to increase the frame count before you can take action.


I have tried using a preload manager and it only stays at the "Loading..." screen, so something of mine is making it incompatible... and I let it try loading one day for over 20 minutes while I cooked, so I know its no trying to load THAT much.


I will keep thinking of ideas on this while working on my project, but as it stands I have already started swapping to the black fade option for transferals. -.-
I took the time and traced all the drawing commands from Scene_Map to dataManager and tested them for the number of frames it took for the map to load and every single process has a flat 9 frames with no variance to it. I am assuming that the coding is solid and something else is causing the slight load lag we are noticing, as 9 frames isn't a lot at all... maybe there is something in PIXI that *could* be causing it, but I wouldn't even begin to understand that coding really.


Other than that I have done everything possible to hunt down this bug and came up with a whole lot of nothing and a massive headache from the past few days. hopefully someone will fix it(if possible) or the RPG Maker peeps will take notice of this and let the pros handle the problem. :/


Sorry I wasn't much help in the end, but I still have hope it can be fixed eventually.
Really, really appreciate the work you put in towards this issue -- thank you ahuramazda!


It's sad that a seemingly small issue like this has such a huge effect on our games. I really have to go back to the drawing board to work around it.


I've posted in the support forum here in the hopes someone with either answers, or the developers' ear, happens to see it. It's clearly a bug, one which apparently no one else either has noticed, or else cares about (how is this possible 8 months after launch?). I know it isn't a high-profile issue like game audio or menu crashing, but boy, it sure has a serious effect  :stare:  
Call me crazy, but I think I may have figured out my problem at least, or at least part of it... My game was originally made when MV first came out, so when the 1.1/1.2 update hit I never updated the base scripts manually like I should have. Well I got the idea that maybe making a new project (which would have all the updated .js files) and moved all my plugins over and configuration data and the maps are loading instantly like you would expect, but now there is another problem xD


Now the transfer is actually way too fast... when the new area loads there is a large stutter where the player is able to move and then the map I guess has to redraw again to catch up. Comparing the new update method with the old one shows what they did to change it, but dear god the speed difference is insane!
now you have me interested in what your pre-1.2 issue actually looks like!


i started my project after 1.2, and the issue i have had is what it sounds like you're describing. i uploaded a quick test example to demonstrate here.


there's a short lag, then the player is transported and has movement, and the map stutters and redraws. is this similar to what you're experiencing? if so, i still find this player transfer totally unusable. i'm still really grumpy about it -- how could playtesters move between rooms, notice this stutter, and say "yup! that's okay." 
Thats the new problem Im having... the transfer happens too fast and then the map has to catch up XD


Before the transfer would happen as you would expect, but then the player couldn't continue moving for about 13-16 frames and it was a noticeable pause while the scene rendered.


If my Windows 10 will let me record today I'll make a vid showing them, lol


EDIT: Here are the links...


Before 1.2: http://www.mediafire.com/download/45r19lcgd01w9g2/Old_Transfer.mp4


After 1.2: http://www.mediafire.com/download/dtx5r22we84e4q3/New_Transfer.mp4


EDIT 2: Huh... seems Mediafire doesn't allow vid playback anymore, so you would have to download them >__<  that's a bit annoying


EDIT 3: After some toying with the code a bit I found a method that reduced the amount of stutter by a pretty large margin... there is still a minute amount of lag immediately after the transfer, but nothing like it was... maybe 1-2 frames. Its small enough that it doesn't bother me AS much and it might be to your liking...


This is an edit in "rpg_managers.js" (for MV 1.2 only) to replace the update scene, just search for the top line and replace the entire section. As always back up your work in case it doesn't like the changes for whatever reason.

Code:
SceneManager.updateMain = function() {

    var newTime = this._getTimeInMs();
    var fTime =  (newTime - this._currentTime) / 1000;
    if (fTime > 0.25) fTime = 0.25;
    this._currentTime = newTime;
    this._accumulator += fTime;
	
	// Begin Changes
	this.renderScene();
	this.updateScene();
	// End Changes
	
    while (this._accumulator >= this._deltaTime) {
        //this.updateInputData(); // Moved Down
        this.changeScene();
        //this.updateScene(); // Moved Up
        this._accumulator -= this._deltaTime;
    }
    //this.renderScene(); // Moved Up
  
	// Begin Changes
	this.updateInputData();
	// End Changes
  
    this.requestUpdate();
};
ahuramazda, I actually just got around to trying out your edit. It definitely helps a little bit, so thank you for taking the time to delve into it.


Just checking in otherwise, and wondering if by any chance you'd had any new epiphanies or made any other progress towards a true fix? A man can dream ...
To be honest I haven't had a lot of time (sadly) to be doing any RPG work since about late November, and I had plenty of other things on my plate I was working on before the break.


Glad it did help a bit, but alas, I have not touched this problem since my last posting... at least not with any form of noticeable progress.
About that same problem you had I'm experiencing because my game needs to connect a bunch of rooms and stairs... I needed a no faded transfer but at this time, if I try to connect player to another map it will keep the trigger of click... I mean, if you clicked on the top screen, player will be transferred to the second map, keep moving until that same spot you did at previous map!
I can only prevent that happening if fading is on but honestly, that does not works for a game I'm making.

@jbarros35 , please refrain from necro-posting in a thread. Necro-posting is posting in a thread that has not had posting activity in over 30 days. You can review our forum rules here. Thank you.


Please make a new thread if you have a problem.

Original thread: https://forums.rpgmakerweb.com/threads/instantaneous-map-transfer.62073/