Orange Movement 3

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,545
Reaction score
3,715
First Language
Java's Crypt
Primarily Uses
RMMZ
Who wants another pixel movement script?

I had created this one for my game, but I decided to share it here.

Here's the link:

https://github.com/Hudell/scripts/blob/master/standalone/movement/orange_movement.rb

On the Pixel Movement part, there's just one configuration: Tile_Section.

This config determines on how many pieces a tile should be broken. The default is 4, which means the 32px tile is going to be broken on 4 pieces of 8px. If you set this config to 1, the game will continue using a tile based movement.

This script only affects the player. All other events will continue using the default tile based movement.

Besides that, there are some cool different features on this script:

1) Automatically jump over small obstacles

   There are many configs to determine when and how the player should jump over something. I recommend using a region to configure all jumpable tiles, though.

2) Let the player fall from high places.

  This one requires a region to work. You can use a different region for each direction

3) Automatically walk around objects that would otherwise block the player's route.

This one doesn't require any configuration, but there's one config that let's you define how far the character can walk automatically on a different direction than the button the player is pressing.

If you set that to a larger value, the character will even walk around whole buildings automatically!

4) Diagonal movement

There's no reason to walk on only 4 directions anymore.

5) Configure the player hitbox

You can now have larger or smaller sprites triggering collisions and events right.

6) Event hitboxes:

You can now move or resize the event hitboxes.

The default hitbox is x=0,y=0, width=1, height=1

If you want to use an event that has double height, you add a comment on it with those configurations:

hitbox_y=-1hitbox_height=27) Several new features were added to the script since this first post. Check the discussion on this thread.Here's an old video showing the results of different configurations on the very first version of the orange movement script:
 
Last edited by a moderator:

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
5,624
Reaction score
5,104
First Language
English
Primarily Uses
RMVXA
Nice stuff!  And your semi-custom map is beautiful, by the way (haven't played OS yet but it's definitely on my hit list).  Nice features with auto-jump and moving around things in the player's way!  Just a few things I'm wondering:

  • Have you considered 8-directional movement?  I think once you leave the "tile" mentality and start with pixel movement, it becomes almost expected to be able to move in at least eight directions, rather than being left with the 8-bit standby of four directions.
  • Any way way to set object hitboxes, or plans to do so?
  • How does your system handle the case where the player is, say, halfway between two adjacent Action Button event and presses the :C button?  One of the most obvious bugs in Viktor Sant's PM script was where both events would end up triggering.
  • Another problem I ran into with other PM scripts was an event "appearing" (because its page condition was met), or an Event Location change (using either the event command for Move Event Location or the moveto(x,y) script call), that cause two non-Through events to overlap with each other.  Often this will just completely freeze the events in place.  What happens in Orange Movement when this happens?
 

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,545
Reaction score
3,715
First Language
Java's Crypt
Primarily Uses
RMMZ
Nice stuff!  And your semi-custom map is beautiful, by the way (haven't played OS yet but it's definitely on my hit list).  Nice features with auto-jump and moving around things in the player's way!  Just a few things I'm wondering:

  • Have you considered 8-directional movement?  I think once you leave the "tile" mentality and start with pixel movement, it becomes almost expected to be able to move in at least eight directions, rather than being left with the 8-bit standby of four directions.
  • Any way way to set object hitboxes, or plans to do so?
  • How does your system handle the case where the player is, say, halfway between two adjacent Action Button event and presses the :C button?  One of the most obvious bugs in Viktor Sant's PM script was where both events would end up triggering.
  • Another problem I ran into with other PM scripts was an event "appearing" (because its page condition was met), or an Event Location change (using either the event command for Move Event Location or the moveto(x,y) script call), that cause two non-Through events to overlap with each other.  Often this will just completely freeze the events in place.  What happens in Orange Movement when this happens?
Hi, thanks for the reply :)

  • The script already works with 8 directions, I forgot to mention that.
  • I originally wanted to implement hitboxes, but once I started using the script, I didn't really miss them, so I haven't done anything like that yet.
  • If the player is between two events, the result should be the same as if you had two events on the same position and pressed :C on that. On the tests I did only one event triggered, but I'm not 100% sure that the same problem can't happen here. Such a problem shouldn't be hard to fix, though.
  • That last issue shouldn't be a problem with my script, because I only really changed the player class, all events should work exactly as they did before
I updated the script with two new configurations:
Auto_Avoid_Retain_Direction and Auto_Avoid_Offset_Only_When_Dashing


I realized that the Auto Avoid feature may become an issue if the player runs toward an event that they want to activate, if they get too close the character may automatically move around it, so I added those configs to help with that.
 

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,545
Reaction score
3,715
First Language
Java's Crypt
Primarily Uses
RMMZ
Updated the script with seven new config options, all related to the "Auto avoid" feature.


Auto_Avoid_Diagonally,


Auto_Avoid_Walking_Around,


Auto_Avoid_Diagonally_Only_When_Dashing,


Auto_Avoid_Events_Diagonally,


Auto_Avoid_Events_Walking_Around,


Auto_Avoid_Try_Jumping_First,


Auto_Avoid_Events_Max_Offset


This feature has two modes: Walk diagonally and walk around.


When only a single step diagonally is enough to avoid an obstacle, the script will try that first. If one step is not enough, then the script will walk around the object using only the 4 basic directions.


The order in which the script tries things is this:


1) Try walking diagonally


2) Try jumping over


3) Try walking around


the "Auto_Avoid_Try_Jumping_First" config lets you switch the order of the first two.


You can now disable each of the three separately.
 
Last edited by a moderator:

Ufolian

Warper
Member
Joined
May 9, 2015
Messages
3
Reaction score
3
First Language
English
Primarily Uses
Hey there! This script looks really great (and so does Orange Season!), but as is there are a few issues. I haven't changed any of the configurations from the default, but there seem to be some problems with moving down and to the right, as well as cliffs being two-way. 

The issue is when moving down or to the right (but never both, interestingly), you kind of clip into the obstacle. When it's a small obstacle, it looks really jarring, but when it's a wall it looks especially jarring. Typically you can't move like this, but if you sprint you can hop along walls.

For a better idea of what I'm talking about - http://a.pomf.se/wmccrz.webm

Hopefully these get ironed out, because your video demonstration looks very smooth! 
 

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,545
Reaction score
3,715
First Language
Java's Crypt
Primarily Uses
RMMZ
Hey there! This script looks really great (and so does Orange Season!), but as is there are a few issues. I haven't changed any of the configurations from the default, but there seem to be some problems with moving down and to the right, as well as cliffs being two-way. 


The issue is when moving down or to the right (but never both, interestingly), you kind of clip into the obstacle. When it's a small obstacle, it looks really jarring, but when it's a wall it looks especially jarring. Typically you can't move like this, but if you sprint you can hop along walls.


For a better idea of what I'm talking about - http://a.pomf.se/wmccrz.webm


Hopefully these get ironed out, because your video demonstration looks very smooth!
Thanks for pointing that out! I'll fix it right away.


The problem with the cliff you can fix with configuration: Use a region to define where the auto jump is availbale, because if you don't, the script will jump over any impassable tile.


To do that, you just need to set a region to the tiles where the player should be able to jump and then set the ID of that region to the Auto_Jump config.


Edit: Fixed it. You can get the updated version on that same link.
 
Last edited by a moderator:

Ufolian

Warper
Member
Joined
May 9, 2015
Messages
3
Reaction score
3
First Language
English
Primarily Uses
Hey, much better! It's very stable now - however, when jumping down from a cliff (for example, in your original post region 2) that is halfway between another cliff (region 6), you will get stuck in the cliff below where you are unable to move again. The only way I've found to fix this in your script is to set the tile sections to 2 or 1. 

You're almost there! This is still a really nice, intuitive movement script. 
 

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,545
Reaction score
3,715
First Language
Java's Crypt
Primarily Uses
RMMZ
Can I see a screenshot of the map?
 

Punisher699

Veteran
Veteran
Joined
Jul 3, 2014
Messages
85
Reaction score
18
First Language
French
Primarily Uses
Hello ,

I came here just to let you know that ur script is really awesome ! Thank you so much for sharing this to us.

Best pixel movement script made so far !

Congrats
 

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,545
Reaction score
3,715
First Language
Java's Crypt
Primarily Uses
RMMZ
Hello ,


I came here just to let you know that ur script is really awesome ! Thank you so much for sharing this to us.


Best pixel movement script made so far !


Congrats
Thanks! I'm glad you liked it :)
 
Joined
Apr 30, 2012
Messages
216
Reaction score
35
First Language
Spanish
Primarily Uses
I tested Orange Season yesterday,i love it.

I hope you finish it,i see a great future in your game.

Thanks you very much for sharing it and excuse me for my bad english.
 

Punisher699

Veteran
Veteran
Joined
Jul 3, 2014
Messages
85
Reaction score
18
First Language
French
Primarily Uses
Forgot to ask you something . Can we disable the diagonal movement ? if yes , it that affect the autoavoid part ?
 

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,545
Reaction score
3,715
First Language
Java's Crypt
Primarily Uses
RMMZ
Forgot to ask you something . Can we disable the diagonal movement ? if yes , it that affect the autoavoid part ?
 
I've updated it with a new setting to disable the diagonal movement. It won't affect the autoavoid part.


I can't really test it until tonight, but I only changed one line of code, so I don't think it broke anything.


Edit: Tested it now, no problem found.
 
Last edited by a moderator:

Punisher699

Veteran
Veteran
Joined
Jul 3, 2014
Messages
85
Reaction score
18
First Language
French
Primarily Uses
It still the same awesome script with an another great option !!  :D

works like a charm , thank you for this addon , I'm pretty sure that other people will appreciate it too .

If you want to share more scripts like this one , you're welcome  :p
 

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,545
Reaction score
3,715
First Language
Java's Crypt
Primarily Uses
RMMZ
I've updated it again with some fixes:


I changed it to ignore the pixel movement configuration when using forced move routes, so if you create a move route with just a single "move up" command, for example, the player will move a full tile regardless of the configurations.


I also fixed a problem that could cause the script to crash if you had disabled the auto jump but enabled the auto avoid.


Someone pointed out that the XAS battle system may sometimes break my script, putting the player on an impassable tile. I'll try to find a way around this without changing the XAS script.
 
Joined
Sep 22, 2013
Messages
23
Reaction score
6
First Language
english
Primarily Uses
What a fantastic script. I think it's the best movement script so far. Great job! Orange Season looks terrific as well, going to try it out. I have a couple of questions about the orange movement script. Is there a way to disable and enable the script at will? Is this script capable of supporting followers? 

Thanks for sharing your hard work! Cheers
 

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,545
Reaction score
3,715
First Language
Java's Crypt
Primarily Uses
RMMZ
What a fantastic script. I think it's the best movement script so far. Great job! Orange Season looks terrific as well, going to try it out. I have a couple of questions about the orange movement script. Is there a way to disable and enable the script at will? Is this script capable of supporting followers? 

Thanks for sharing your hard work! Cheers
Thanks :)

Right now, the only feature that can be enabled and disabled using switches is the Auto Jump, but I can add new settings to allow the other features to be enabled/disabled too.

I haven't tried to make the Auto Jump feature work with followers yet, but all other features should work with no problem. I'll do some tests later tonight and fix anything that shows up.
 
Last edited by a moderator:
Joined
Sep 22, 2013
Messages
23
Reaction score
6
First Language
english
Primarily Uses
Thanks Hudell, that would be great to disable and enable at will. Hopefully it is an easy addition. When i have more then one party member the other member/followers stays idle and do not move, i am not sure if i am missing something with the script. I thought it may of been other scripts i've been using and tried it in a fresh default project and still have the same thing happening. Appreciate your quick response. Thanks
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,047
Members
137,569
Latest member
Shtelsky
Top