Switch release lag... but what's the cause?

are you trailing the player behind a boat?
you may have a workaround by using the followers object, if you make "a" boat the player proper, and trail someone else behind it.
to the purpose of showing a boat and "the player" (not!) behind it, it should suffice.
it does create lag even on PC, the PC just has a higher reserve of processing power.
but add enough of these events and even the PC will slow down.

But the wait tells "skip this event for x frames before processing it again", with sixty frames per second the default speed per parallel
So eventually I would have experianced lag during playtest even on pc it seems, if left unchecked.
are you trailing the player behind a boat?
you may have a workaround by using the followers object, if you make "a" boat the player proper, and trail someone else behind it.
to the purpose of showing a boat and "the player" (not!) behind it, it should suffice.
when i use get on/off vehicle all characters get on the boat, so i don't think there were any followers.
when i use get on/off vehicle all characters get on the boat, so i don't think there were any followers.
I mean, what's the "surf" part for? all that repositioning events to me looks like you're towing the player with the boat.
if that's the case, mask it by rearranging the party to sell the effect.
if not, then you're always "surfing" after you've entered the state of "surfing", and out of it once you've touched the shore... you don't need to constantly check if you're at it.
That appears to have fixed the Switch's lag problem.
I mean, what's the "surf" part for? all that repositioning events to me looks like you're towing the player with the boat.
if that's the case, mask it by rearranging the party to sell the effect.
if not, then you're always "surfing" after you've entered the state of "surfing", and out of it once you've touched the shore... you don't need to constantly check if you're at it.
the surf part summons the boat and the characters automatically get on the boat. The repositioning (i think) is to check which way the character is facing, and moves that way to get on the boat.

Think of it like how it is in gen 1 pokemon (which is what I'm attempting to model this after), Characters (in my game) either (if the skill is usable in the party) summon a "boat character" with a skill (kinda like the "seal" or what ever the surfing pokemon is), or have an item to do the same thing (similar to gen 7s surfing mechanic) so if the party is split up, the other party will have a way to traverse water.
Here's how it works:
Think of it like how it is in gen 1 pokemon
I am.
you don't need all of this to do that.
you just need to check for proximity to water and shore, one to get IN the water, and one to get OUT of water... no need to check if you're in water AS you are in water.
how would you code it? Like i said in an earlier post, I followed a youtube tutorial to create it.
well, it's all about going from one medium to the other.
going into the water, you do manually... going out of the water, if going by Pokemon standards, was automatic: you just walk forward.
if you must have the boat, keep the grouping and boarding, and the movement on water.
for going from water to shore, either mark the shore with a region ID, or deploy events set to player touch, and redirect to a common event.
THAT common event will handle the reset.
all events set to player touch indirectly have their own parallel check for proximity to the player.
you only need to activate the moving forward and restoring the party *at the point you make land*, not everywhere else.

if you have a huge area of shore to cover, I think I have a proximity detector that I made for myself... I can show you how to make one.
that's why Pokemon is limited when it comes to going in and out of water: you can't just "go into water" wherever there's water, there are shores and there are cliff faces.

(I seem to remember that *going into the boat* was already handled by the engine when actually going into the boat... so, having that in the sequence would be redundant as well)
I do use region ids, is there a way to set it to touch at the edge instead of having to interact with land?

Granted, I'm happy with keeping it the way it currently is, as even the ledge jump script is set to jump by command instead of automatic (currently).

I'm not trying to completely 1-1 pokemon, because chances are that'd nuke any chance of publishing the game and potentially making my own "gold". Just trying to make a game with a few inspirations from various games, with pokemon being the (currently) most prominent. There are likely going to be other referances to other rpgs I enjoyed in my youth as well, such as Quest 64 (the wings item essentially being a key item that warps you to a town the item is set to.)
you may have to make some adjustments, but put this as a plugin, and call it from the events' move routes.

Code:
Number.prototype.between = function(a, b) {
  var min = Math.min(a, b);
  var max = Math.max(a, b);
  return this >= min && this <= max;
};

Game_CharacterBase.prototype.inRect = function(x1, y1, x2, y2){
    return this._x.between(x1, x2) && this._y.between(y1, y2);
};

on a straight shore line, put down an event with a custom move route, with a script call:

Code:
$gameSelfSwitches.value([$gameMap.mapId, this._eventId, "A"]) = $gamePlayer.inRect(A1,B1,A2,B2)
where A and B are the corners defining the rectangle to watch.
you want this to be 1 tile wide, as long as the coast strip.

and in a new page on that event, call the common event dealing with the movement, and after it restore the self switch and exit the event.
you may want to set the event proper to spawn only when "surfing" is ON.
set the route refresh rate to slow and priority to high.
set the sprite to invisible.... or set a sprite to identify it in the editor, and then add a sprite removal block to the move route.
copy this event, with the call to the common event, wherever you want to transfer mediums, and change the coordinates.

this is adapted from my fix in Ace, so there might be syntax mistakes.
this is *a proximity detector*... the actual movement will have to be done through the common event: hide the boat, step forward, deploy party, etc.
you'll still have to put down actual events to deal with corners.
I'm not trying to completely 1-1 pokemon, because chances are that'd nuke any chance of publishing the game
That's not how anything works.

Your gameplay can be as identical as you want, so long as you don't violate any copyright or trademarks (e.g. intellectual property laws). You may want to look up some explanations of those to gain a basic understanding.

Whether anyone would buy/play your game if it's directly a rip-off of Pokémon is a separate question that doesn't affect your ability to publish it. (and Pokémon is hardly the only game that had vehicles you could ride over water tiles)
You can copy every Pokemon mechanic you want: catching monsters with balls, 6 member party, 4 moves, storing monsters in a computer, whatever. What you can't copy is the actual Pokemon (or human character) designs or their names (probably some of the item and place names too).
Lol, and I said this community doesn't support the Switch version :LZSlol:
Well, glad the folks are kind enough to offer their support anyways.
Well, given pretty much all my work is already on pc (and it's easier to share on pc) I've made the decision to continue forward with the pc version. The only downside is trying to find all the dlc on the switch version (because i purchased it) and get it for pc. Granted, the dlc i currently have on pc will suffice, but if I want all the images, sv characters, music, etc I'll have to find a website that compares the console and pc dlc.

Though the help here >DID< seem to remove the intense lag on the Switch, unless it was slowing down from how long the software was running, both on and during sleep mode. And i have to consider the downside of not being able to use plugins on console, unless I can somehow manufacture them through thorough event scripting.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/switch-release-lag-but-whats-the-cause.162746/