Galv's Diagonal Movement

Galv

Veteran
Veteran
Joined
Oct 1, 2012
Messages
1,235
Reaction score
1,428
First Language
English
Primarily Uses
RMMZ

Diagonal Movement - Version 1.3
RPG Maker MV Plugin
Galv



Introduction
I know there are other diagonal movement plugins, but here's another one.


Screenshot


Spoiler






Features
Quite simple - enables player to move diagonally.
- Optional diagonal mouse movement
- Optionally use diagonal charset


How to Use
- Copy the "GALV_DiagonalMovement.js" file into your project's /js/plugins/ folder.
- Activate plugin using the 'Plugin Manager'
- Read the help file to see how it works. Examine the demo if you don't understand.


Plugin
Get it here


Credit and Thanks
- Galv


Terms
Free to use in any RPG Maker MV project including commercial. Please credit "Galv". :)


Updates


2016-08-27 - Version 1.3 - fixed issue with charset facing in a move route when turning after moving a diagonal


2016-05-17 - Version 1.2 - added ability to disable diagonal movement and option to disallow walking diagonally past any impassable tiles.


2016-02-04 - Version 1.1 - added ability to slow movement speed


2015-12-12 - Version 1.0 - Release
 
Last edited by a moderator:
Joined
Mar 9, 2013
Messages
336
Reaction score
83
First Language
Spanish
Primarily Uses
N/A
Can you add a plugin command for disable and enable the diagonal movement? I want to use it just on certain parts of my game.

I tested already the plugin and works very good even with the mouse and with the map zoomed using MBS_MapZoom.

Thank you in advance.
 
Last edited by a moderator:

Haydeos

The Dragon
Veteran
Joined
Apr 6, 2014
Messages
513
Reaction score
969
First Language
English
Nice one! :D

I just had to edit my characters to properly test it out! Took about...half an hour for 1 guy.

 
Last edited by a moderator:

mistFAWKES

Veteran
Veteran
Joined
Feb 8, 2016
Messages
50
Reaction score
13
First Language
elngish
Primarily Uses
N/A
hey dude! eivl was going to pass on a bug report to you, but i wanted to make sure you got it. when one uses mouse input and clicks an unpassable tile(including an event on top of a passable tile), intense lag occurs as the plugin recalculates the best route every successful step. i get that we do this to check to see if the path has opened up, but in instances where, say, one wants to pick up some gold on the ground, clicking the gold will cause a stutter effect that renders the plugin more painful than effective.


if you could fix this, i would be SUPER appreciative!!! i love this plugin, it makes the map scroll really smooth w controllers, but w mouse input it's pretty brutal.


thanks in advance!
 

Galv

Veteran
Veteran
Joined
Oct 1, 2012
Messages
1,235
Reaction score
1,428
First Language
English
Primarily Uses
RMMZ
Unfortunately I cannot replicate this lag issue. Does it happen in default rpgmaker for you without the diagonal movement plugin? Does it happen for you in the demo for this plugin?
 

KaYsEr

Koruldia
Veteran
Joined
Mar 14, 2014
Messages
264
Reaction score
481
First Language
French
Primarily Uses
RMMV
I tried to replicate the issue, I'm afraid I have to confirm it.


It was here from the beginning but due to the "custom way" I usually create maps it was hard to spot.


Simply create a map like the one attached, and click on 1 of the 3 blocks, you will see a pretty big frame drop.


fgukjtyktyik.jpg


Edit: it could be caused by the autotiles and/or animated tiles (since I never had this issue myself with real maps from Koruldia, but it's true I can see it if I create a test-map with RTPs like that one, so yeah... Strange thing)
 
Last edited by a moderator:

Galv

Veteran
Veteran
Joined
Oct 1, 2012
Messages
1,235
Reaction score
1,428
First Language
English
Primarily Uses
RMMZ
Could you please confirm that it happens in a new project with only the diagonal plugin installed (no other plugins).


If so, could you please create a blank project with the map and player starting position in a location that will definitely replicate the lag issue.
 

KaYsEr

Koruldia
Veteran
Joined
Mar 14, 2014
Messages
264
Reaction score
481
First Language
French
Primarily Uses
RMMV
Hey Galv, I think I found the problem.


It has something to do with the official fix (that is still a plugin for now) >> TDDP_FluidTimestep


When I turn that OFF, it behaves like in your demo.


Now that I really tried to stress it, I managed to find an easy way to go under 5-10fps, I simply have to hold the mouse button on an obstacle (like a rock or whatever) if I do that it's really bad, but if I only do "single reasonable clicks" it's fine on my personnal maps (so far).


But not on the one I posted in my previous post, this kind of map slows down when you click on the beach for example, but when I turn TDDP_FluidTimestep OFF it's way better.


Because tbh it still goes from 60fps to 50-55fps (on a powerful machine), it's hard to notice then (but with a scrolling fog it's easy ^^).
 

Galv

Veteran
Veteran
Joined
Oct 1, 2012
Messages
1,235
Reaction score
1,428
First Language
English
Primarily Uses
RMMZ
Does the lag happen with FluidTimestep ON and no other plugins active? (This plugin OFF)


If so then this issue could be related to the default pathfinding and FluidTimestep
 

KaYsEr

Koruldia
Veteran
Joined
Mar 14, 2014
Messages
264
Reaction score
481
First Language
French
Primarily Uses
RMMV
Does the lag happen with FluidTimestep ON and no other plugins active? (This plugin OFF)
Sure, I tried to turn everything OFF and did many combinaisons until this "conclusion". At some point I only had your plugin and that one.

The strange thing is that even with only your diagonal plugin on the list, a micro-lag still exist and it's way too small to be a problem on recent machines, but it shows us that maybe something isn't 100% right.


A solution (if not fixable) could be to simply deactivate diagonal movement (or give the option) when mouse/touch is used, even if that would be sad. I hope FluidTimestep will be improved because there are some problems with it depending on the screen you use. (like some lag coming from nowhere at random time, for several seconds... But of course it's still better than having a broken game on +120hz screens when you don't have it)


I heard it's something that will eventually be added in a real big MV future update, so I guess we need to make sure everything is fine with it.


Good luck whatever you chose to do Galv. See you!
 

Galv

Veteran
Veteran
Joined
Oct 1, 2012
Messages
1,235
Reaction score
1,428
First Language
English
Primarily Uses
RMMZ
Unfortunately I don't have the ability to re-write the default pathfinding to be less processor intensive and I don't have anything to do with the FluidTimestep changes, so the current plan is to wait and see what MV updates bring us.
 

gizzmito

Villager
Member
Joined
Jan 4, 2016
Messages
20
Reaction score
14
First Language
spanish
Hello, thanks for this cool plugin.


As someone requested before is it possible to implement a way to disable the diagonal movement in game? Maybe with a plugin command?


I'm using Shaz smart pathfinding for some particular events in my game and it doesn't work well when your plugin is active.


Or maybe is there a way to use both plugins at the same time?
 

Galv

Veteran
Veteran
Joined
Oct 1, 2012
Messages
1,235
Reaction score
1,428
First Language
English
Primarily Uses
RMMZ
Disable the diagonal mouse movement in the plugin settings. Unfortunately the diagonal mouse movement overwrites the pathfinding code, so you can't use both
 

gizzmito

Villager
Member
Joined
Jan 4, 2016
Messages
20
Reaction score
14
First Language
spanish
Ok, I understand. But in my case that I only use pathfinding in some particular moments, can I disable the diagonal movement with an event, use the pathfinding and then activate the diagonal movement again? Or is it impossible because the overwriting of the code? I ask because I don't know much about scripts and code.
 

Galv

Veteran
Veteran
Joined
Oct 1, 2012
Messages
1,235
Reaction score
1,428
First Language
English
Primarily Uses
RMMZ
I'll add to my to-do list to look into this.
 

Galv

Veteran
Veteran
Joined
Oct 1, 2012
Messages
1,235
Reaction score
1,428
First Language
English
Primarily Uses
RMMZ
Updated to v.1.2


- can now disable diagonal movement during game


- added option to disallow moving diagonally past tiles the player could not normally walk on
 

KaYsEr

Koruldia
Veteran
Joined
Mar 14, 2014
Messages
264
Reaction score
481
First Language
French
Primarily Uses
RMMV
added option to disallow moving diagonally past tiles the player could not normally walk on


Very useful to prevent some "upper layer glitches", it's possible to go around this problem by using parallaxes (takes a lot of work) but this could be very helpful to save time on some tileset-based maps. Thank you! (and maybe with PIXI4 we'll be able to use diagonal movement with mouse/touch again without the huge performance drop when we click obstacles, fingers crossed)
 

Scubidubi

Villager
Member
Joined
Jun 27, 2016
Messages
10
Reaction score
1
First Language
German
Primarily Uses
Hello alv. Do you think you could make the scrip limit movement to diagonal? I am not a big fan of the standard 4  way movement and think in the likes of breath of fire3. That has you only walk diagonally. of course that is done because of the isometric view. but as we all know there is no cure yet to the iso incompatibility by tiles.
 

Galv

Veteran
Veteran
Joined
Oct 1, 2012
Messages
1,235
Reaction score
1,428
First Language
English
Primarily Uses
RMMZ
I'll add to my to-do list
 

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

Latest Threads

Latest Posts

Latest Profile Posts

The Ace attorney series are so great games... But at the same time such a travesty.
Made a video showcasing a plugin (by Lanza) that adds 5 more weather effects to our MV games. :LZYsmile: Namely:
Ash-dust,
bloodrain,
Cherry Blossom Petals,
Hail,
and bubbles.

I just like this website:
lol

Forum statistics

Threads
103,238
Messages
998,291
Members
134,728
Latest member
ripleydx
Top