Least cycle/manual-work intensive way of map edge transfer?

I'm starting the tedious process of painstakingly knitting each map to the next one over and over and over with events, and feel like there really ought to be a better way. 😛  I've seen people running parallel processes that say if the toon is at x=1 or x=(maxX-1), or y=1 or y=(maxY-1), to teleport, but that seems like it would be very system-expensive to have a process running like that to constantly check your coordinates. I figure there must be at least a few open-worlds people (or at least Zelda 1 afficianados) that someone would have done the math. Any thoughts?
Shaz got a MapEdgeTransfer plugin.
That is useful if the from/to maps have the same width (when transferring up or down) or height (when transferring left or right).  I had a 'large event collision' script in Ace that lets you use one event rather than several when you have an exit that spans a number of tiles.  I haven't ported this to MV yet, but I will be doing it soon.  I think someone else has already written something similar though.
i believe the least processor intensive and manually easiest way to do it is by the if x> or if x< method.


imagine how much processing and extra memory goes into the individual event on every space.  everytime the game redraws the screen it also "redraws" the events.  that is a lot of wasted work for you and the game.  at 60fps it is redrawing the events 60 times.  not calling on it to run, just noting the location.


also, there is the setting of regions option.  you create a region along the boarder.  as example region 1 from "E" tiles.  so you now have to put that region tile all along the border.  at that point you state that if the player touches region tile 1 then goto next map.  this again is more processing work.


Just declare your x and y variables to the player x and y and then run the if statement.  it is much easier on you and less work for the pc.


if you need a more specific example let me know and i can give you a more detailed explanation.


btw: keep in mind that a lot of people run clocks and weather systems which also run parallel without issues.  they contain a lot more commands then just checking map edges.
I can't tell you if this is the "Least" processor intensive way to do it but this should work for you

Create a parallel process and set this on it as a script

This will retain the players Y position when they move off the left and right of the map

This assumes the maps will be the same size.

Replace MapId with the ID of the map you want the player to transferred to. Right being the map when you walk off the right and left being the left.
Replace maxDistance with the rightmost x position on the map.

 


var rightMapID = 28;


var leftMapID = 26;


var maxDistance = 17;


if($gamePlayer.x == 0){


$gamePlayer.reserveTransfer(leftMapID, maxDistance, $gamePlayer.y, "right");


}


if($gamePlayer.x == maxDistance){


$gamePlayer.reserveTransfer(rightMapID, 0, $gamePlayer.y, "left");


}

It will only be 1 event per map as opposed to events lining the entire left and right side of it.
 

Original thread: https://forums.rpgmakerweb.com/threads/least-cycle-manual-work-intensive-way-of-map-edge-transfer.69557/