Quasi Movement

Kane Hart

Elmlor.com
Veteran
Joined
Jun 27, 2014
Messages
656
Reaction score
166
First Language
English
Hello. I was wondering how the performance was for the most basic function allowing the player freely move around. I know back in the day I used something like this on an older RPG Maker but the calculations caused a lot of lag in the engine if I recalled. 
 

Quxios

Veteran
Veteran
Joined
Jan 8, 2014
Messages
1,055
Reaction score
785
First Language
English
Primarily Uses
RMMV
@KOBE No problem, feel free to ask questions if you ever need to.

@Kane Hart If you mean freely move as in just basic pixel based movement. Then the performance would be very close as default movement  as the calculations are exactly the same except you're running them more frequently. In my plugin the most performant parts are collisions since I completely rewrote it to use colliders. Using colliders over the default collision checking was about 10x slower. But default collision checking is something very basic, while with colliders it has different shapes and more pixel precision. Now using the collision map is probably like 5x+ slower then my collider checking ( so like 50x slower then basic collision checking ) and that's because it has to check the pixel color surrounding the characters colliders edge.


( I did do some performance testing long ago, but I don't remember if the 10x, 5x, ect slower numbers are correct. But if i remember correctly those number should be close. )


@RedAkerston Sorry I completely missed your post!
Anyways, for the map edge events, can't you set them up something like this?

Map1:


Map 2

I used regions just to help show where I would put the touch events.

So region 8 on map 1 would transfer to the region 8 locations on map 2.
And region 9 on map 2 would transfer to region 9 on map 1.
So all you have to do is add some extra bleed area on the edges, you can even add a lot more to make it look like it's 1 single map, instead of 2.


As for the transfers, there is a plugin command you can use for a pixel based map transfer:


quasi transfer mapId pixelX pixelY retain? fade?


retain and fade can be left out.


possible retain values: 0, 2, 4, 6, 8 ( which direction to face when transfering, 0 to keep current direction, 0 is default )
fade values: 0, 1, 2 ( 0 is black (default), 1 is white, 2 is none )


@AurionMaverick Sorry I completely missed your post as well!
Well when a player gets in a vehicle, it doesn't change it's class. So checking if the constructor is a vehicle won't do anything. You want to check if the player is on a vehicle. You can check if the player is in a vehicle by using the function .isInVehicle() and you can check it's vehicle type by using the player property ._vehicleType
 
Last edited by a moderator:

RedAkerston

Veteran
Veteran
Joined
Oct 10, 2015
Messages
67
Reaction score
12
First Language
English
Ahhh, i missed that command. Thanks!


Just tried it out and i got it to work fine.


 ... though the issue of touch events triggering on every step is still there.


But it's a minor thing to have to be creative about a couple things *shrug*


I've seen you replied to someone else some time ago on your webpage that it would be pretty tricky to solve this.


(the person asking about something like a cooldown etc)


The plugin i referenced, 'Map Edge Transfer' is here by Shaz




I'm not sure if it's a very complicated plugin or not because i don't know javascript.


But it doesn't work with your plugin. 


Having a feature like it would be convenient if nothing else


In any case, thanks for all your efforts.
 

Iliketea

Tea lover
Veteran
Joined
Oct 28, 2015
Messages
848
Reaction score
944
First Language
German
Hi, I have a question!


This plugin seems to conflict slightly with Yanflys region lock plugin.


The region lock plugin allows the user to set region that , or example, events cant walk on.


Perfect for stopping NPC to go where they are not supposed to go.


However it does not work if Quasi Movement is turned on too.


This isnt that much of a problem, and there are alternatives, but do you know how I can make both plugins work at the same time?
 

RedAkerston

Veteran
Veteran
Joined
Oct 10, 2015
Messages
67
Reaction score
12
First Language
English
Hi, I have a question!


This plugin seems to conflict slightly with Yanflys region lock plugin.


The region lock plugin allows the user to set region that , or example, events cant walk on.


Perfect for stopping NPC to go where they are not supposed to go.


However it does not work if Quasi Movement is turned on too.


This isnt that much of a problem, and there are alternatives, but do you know how I can make both plugins work at the same time?


I had the same issue, then just used QuasiRegionLock instead.


Check it out if you haven't. It might do what you need it to.
 

Iliketea

Tea lover
Veteran
Joined
Oct 28, 2015
Messages
848
Reaction score
944
First Language
German
I did try it but I cant get it to work...


Everytime I try to move the player when the plugin is on I get this error :

 

Quxios

Veteran
Veteran
Joined
Jan 8, 2014
Messages
1,055
Reaction score
785
First Language
English
Primarily Uses
RMMV
@Iliketea Do you have the latest versions on both? If so try disabling other plugins to see if an outside plugin makes my region lock not work.
 

Iliketea

Tea lover
Veteran
Joined
Oct 28, 2015
Messages
848
Reaction score
944
First Language
German
Yes, I have the latest versions of both.


But I seem to have found the problem?


The error came up when I loaded a game, I tried to make a new game and it worked, even on the map that I had the problem on....
 

Quxios

Veteran
Veteran
Joined
Jan 8, 2014
Messages
1,055
Reaction score
785
First Language
English
Primarily Uses
RMMV
Ah yeah. Most of my plugins will most likely not work with save that existed before the plugin was installed. I tried to do some fixes for that, but I got no where with it.
 

Aesielle

Warper
Member
Joined
Jun 1, 2014
Messages
1
Reaction score
0
First Language
English
Primarily Uses
Hello Quasi,


First wanted to say thank you for the awesome movement script. :D


The collision maps don't seem to be working correctly. I have only been able to get them to work when I set the color to white. This was true for my own game along with your master demo. Downloading the demo and using it as is, the collision maps don't work. When I set the collision color to white, and recolor the image to white, it works as intended. Also, setting the color to black just makes it so I cannot move the character at all.


I've also tried different settings with the 'Collision Map Scan' yielding no discernible effect (in case this helps).
 

RedAkerston

Veteran
Veteran
Joined
Oct 10, 2015
Messages
67
Reaction score
12
First Language
English
Is there a way to move the character to a specific tile on the map? and be centred on that tile?


The trouble i'm running into is that because touch events activate as soon as the player steps anywhere on that tile, the landing location from a move player event can be very different depending on which part of the touch event the player hits at the start. @_@
 

Quxios

Veteran
Veteran
Joined
Jan 8, 2014
Messages
1,055
Reaction score
785
First Language
English
Primarily Uses
RMMV
@RedAkerston Not too sure what you mean. Doesn't the transfer player already center a player on the tile? It doesn't center based on their collider, but it centers based on the default centering. As for your issue, can't you just mess with the collider sizes? Like for those touch events, just make them very thin.


Something like <bbox:48, 6, 0, 0> for a collider on the left side of the map and something like <bbox:48, 6, 42, 0> for one on the right side of the map. Of course the actual size and width should depend on the size of your player collider and your tile size.


Why did I use 6 for my example? Well in my plugin, the players default collider width is 36, and an ox of 6 with a tile size of 48. That means the players collider has a spacing of 6 on each side if he's in the center of a tile.
 

RedAkerston

Veteran
Veteran
Joined
Oct 10, 2015
Messages
67
Reaction score
12
First Language
English
Ahh, yes, thank you. Awesome plugin, but it takes a while to learn all the particulars... even if the answer sometimes seems obvious.
 

Quxios

Veteran
Veteran
Joined
Jan 8, 2014
Messages
1,055
Reaction score
785
First Language
English
Primarily Uses
RMMV
No problem! And yeah most of my plugins require people to actually read through all the stuff and play around with different settings to use it to its potential. But either way they can always ask me any questions and I'll try to reply as soon as possible.
 

Kyuukon

主人公
Veteran
Joined
Aug 22, 2013
Messages
2,216
Reaction score
1,078
First Language
Spanish
Primarily Uses
RMMV
Quasy, sorry to bother you with this, but do you think it's possible for you to add this kind of behavior to map events by coding to your plugins? Just a suggestion xD I thought it may come in handy.
 
Last edited by a moderator:

Kanoonoo

Todd George Kelly
Member
Joined
Jun 10, 2016
Messages
18
Reaction score
2
First Language
English
Primarily Uses

Conflict between Galv's Character Frames and Quasi Movement(SOLVED)


 


My team and I are in the process of developing assets for a game and are using the following plugins:


Quasi Movement-To allow for non grid movement and collision mapping


Galv's Character Frames-To Allow as many frames as I wanted for each character's sheet


Gal's Character Animations- To allow separate animations for Walking, Standing, Running, and jumping


I found that each of these plugins fulfilled what I needed them to very well and I choose them because they are the best and easiest to use that I could find. 


However, I ran into a problem where when I had all three plugins active, it would only show the first 3 frames of my character's animations. Something was canceling out the Character Frames plugin. I had my coding guy take a look at each plugin and he was able to find the solution so I thought I was share it here.


The problem comes from the fact that two of these plugins are calling the same/similar function. Both plugins require this function to work, but it only needs to be called once, and in order for Character Frames to work, it must be the plugin to call the function.


So the solution is to comment out the section of code where Quasi Movement calls the function:


 (To comment out code, simply add /* before the section and */ after it)


Specifically this one:

Game_CharacterBase.prototype.updatePattern = function() {
    if (!this.hasStepAnime() && this.isStopping()) {
      this.resetPattern();
    } else {
      this._pattern = (this._pattern + 1) % this.maxPattern();
    }
  };


Remember, this function is likely something that both plugins require to be called, but it only needs to be called once, so if you disable this section of code in Quasi Movement remember that you must re-enable it if you plan on using Quasi Movement alone.


To put it simply, DO NOT do make this modification to Quasi's code, UNLESS you are using Galv's Character Frames also.


Be sure to put the Quasi Movement plugin beneath the Character Frames plugin.


Also, doing this seems to have solved the problem on the surface but may present other issues further down the line that I am unaware of. But hopefully this helps some of you that may not have a programmer on their development team.


Thanks!


Todd George Kelly


Also, I am aware that this problem might have been solved be simply using another plugin, but we chose these specific plugins for specific reasons, so that doesn't really have any relevance.
 
Last edited by a moderator:

Quxios

Veteran
Veteran
Joined
Jan 8, 2014
Messages
1,055
Reaction score
785
First Language
English
Primarily Uses
RMMV
@Kyuukon Does sound interesting, though I don't think I'd be up to creating it.


@Kanoonoo Thanks for that information! You should also include the plugin order. I'm assuming mine was on bottom and that function was overriding galv's which is why you're blocking it out.
 

RedAkerston

Veteran
Veteran
Joined
Oct 10, 2015
Messages
67
Reaction score
12
First Language
English
I have another question.  ._.


I'm putting birds in my zone. They are events which are above the player.


But i find that when the event box collides with the player box, the event stops in the middle of its movement cycle until the player moves out of the way.


... which i need to avoid from happening.


Probably there's something really obvious for how to set boxes to not collide that i'm missing.


Thanks again.
 

Quxios

Veteran
Veteran
Joined
Jan 8, 2014
Messages
1,055
Reaction score
785
First Language
English
Primarily Uses
RMMV
@RedAkerston Ah yeah I see, even though the priority is different they are still colliding. You can set the birds to through and that'll fix the problem.
 

RedAkerston

Veteran
Veteran
Joined
Oct 10, 2015
Messages
67
Reaction score
12
First Language
English
wow, that was embarrassingly obvious. *facepalm* thanks.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.
time for a new avatar :)

Forum statistics

Threads
106,015
Messages
1,018,351
Members
137,801
Latest member
topsan
Top