Altimit Pixel Movement [0.50β]

Nines

Villager
Member
Joined
Oct 20, 2017
Messages
5
Reaction score
0
First Language
English
Primarily Uses
RMMV
Hi. Thank you for the plugin.

I don't know if this would help but I ended up doing some minor changes to the plugin for my project.

https://www.diffchecker.com/ENYupIas

The context is I'm using the TileD plugin with half-tile movement enabled. The smaller tile sizes along with Javascript's precision issues created a situation where the player could dash through collision boxes. I can send you a project to demonstrate the issue.

Feel free to let me know if you have any questions.
 

xilefian

Veteran
Veteran
Joined
Nov 26, 2014
Messages
121
Reaction score
189
First Language
English
Primarily Uses
Updated to beta 0.30, this update adds Plugin commands for fine-move route control (small steps, alignment, etc).

The syntax of the commands is: AltMovement move *subject* *verb* *params*

Numpad directions are supported, as are compass directions.

Here are some examples:
  • AltMovement move this north 1.5 wait skip (Move current event up 1.5 tiles, wait for completion and skip if cannot move)
  • AltMovement move player upper_l 0.25 skip (Move player upper-left 0.25 tiles and skip if cannot move)
  • AltMovement move follower0 6 edge wait skip (Move follower 0 right to the tile edge, wait for completion and skip if cannot move)
  • AltMovement move "billy" towards player 0.25 skip (Move event named "billy" towards the player 0.25 tiles and skip if cannot move)
  • AltMovement move 2 2 2 (Move event ID 2 down 2 tiles)
  • AltMovement move boat west edge (Move boat left to the tile edge)
  • AltMovement move follower1 away follower2 1.0 skip (Move follower 1 away from follower 2 1 tile and skip if cannot move)
  • AltMovement move "guy" random 1 (Move event named "guy" randomly 1 tile)
In the future I'll add some scripting command versions of these so they can be used easily "script calls" within event move-routes.

I will also add the old (very old) "align to grid" command I used to have way back in the early days of this Plugin's development. That command proves useful for choreographing event movement.


The adjacent tile alignment is now configurable and can be disabled/enabled with the Plugin command:
AltMovement move_align set false
AltMovement move_align set true

Adjacent alignment is hard to describe, but it basically makes it so the vanilla move-route commands will always result in the character standing in the middle of a tile, even if they are offset slightly.


I'm also going to add a way to disable specific followers from following, which would help with choreographing their movement for cut-scenes.

The other thing I want to add is a way to set move targets, so I can say "move towards location x/y" and the character will move there. I'm not going to add path-finding AI for this (plans for that in the future) but that would help with aligning during complex cut-scenes.

EDIT: @Nines interopability with the TileD Plugin is something I want to have eventually. If you send a project then I can take a look at official integration (I'm having trouble just setting up a project with TileD!).
 
Last edited:

vico

Veteran
Veteran
Joined
Dec 13, 2015
Messages
161
Reaction score
19
First Language
Portuguese
Primarily Uses
RMXP
Well, sorry if i'm annoying you, but i dropped a RFC-esque proposal for organize a possible advanced frame control (aka extra frames) module in your plugin in your Github repository..
I didnt try to implement this myself due to, even i understand what is JSON, i have zero knowledge to how do this in JavaScript.
 

Nines

Villager
Member
Joined
Oct 20, 2017
Messages
5
Reaction score
0
First Language
English
Primarily Uses
RMMV
Demo project link.

Includes original+copy of your plugin with the fixes. If you dash either using the touch input (mouse) or holding shift and moving, you will end up passing through the collision boxes. Disable original and enable the modded version to see the difference.

Diff compare of changes made.

Aside from the collision box issue, your plugin works well with the TileD plugin and the collision box issue can be resolved with some minor changes.
 

xilefian

Veteran
Veteran
Joined
Nov 26, 2014
Messages
121
Reaction score
189
First Language
English
Primarily Uses
Demo project link.

Includes original+copy of your plugin with the fixes. If you dash either using the touch input (mouse) or holding shift and moving, you will end up passing through the collision boxes. Disable original and enable the modded version to see the difference.

Diff compare of changes made.

Aside from the collision box issue, your plugin works well with the TileD plugin and the collision box issue can be resolved with some minor changes.
I'm investigating this demo now.

I was surprised when you said it's a precision error with half-tiles, because the default Plugin definitely works with small colliders, after-all the wall colliders are 0-sized. At a quick look at the demo and checking your diff (thank you very much), I can see that it is not a precision error, the bug is something else (the player's collider is broken, I can see that immediately).

I will investigate what the true source of the issue is and write a new fix. Thanks again for all the help.

EDIT: The issue is related to the smaller player hit-box with the half-tile width, this is an issue that is under the "won't fix" category as it's related to the step-distance being larger than the magnitude of the player hit-box.

I'm wondering if your changes beyond precision are accounting for this?

EDIT2: I am confident now that this is an issue related to small-collider lerping. If you want to see this still break for your modifications set the player collider to be even smaller and you'll see it still happens.

If you have small tiles, you need to adjust your colliders as well. If anything what I might do is change the shape of the wall colliders, that may have a performance hit, but it will stop colliders lerping over the 0-thickness walls (by adding thickness to them).

Another solution is to temporarily give infinite thickness to walls, this is something I might actually do as this solution can be done at the wall projection logic.

I'm happy that TileD compatibility exists, that's really awesome as that was something I wanted from the start. One of the things I want to support is TileD collision meshes.
 
Last edited:

Nines

Villager
Member
Joined
Oct 20, 2017
Messages
5
Reaction score
0
First Language
English
Primarily Uses
RMMV
You're welcome. Thank you for looking into this.

I had pegged it as JS precision errors since the gap < absDistance check in moveCirclePolygon would end up off by around ~10^-14 which would end up adding the vector in the wrong direction. The cause of which would be because JS tends to do stuff like 0.000001+0.000004=0.0000049999999999999996 which would muck up the distance values after all of the calculations.

A reliable way I was able to test whether the issue was fixed was use the mouse and try to move into the collider through a corner.

EDIT: Just saw your message. I'll look into this.

EDIT2: Was able to reproduce. Please change "const PRECISION = Math.pow( 10, 7 );" to "const PRECISION = Math.pow( 10, 6 );" in Collider.move (line 3221). It should resolve that issue. Tested with several smaller values. Please let me know if it still happens.

EDIT3: Nevermind. I thought I had changed the radius in the plugin settings. Didn't notice it was defaulting to 0.25. I'll look into this.
 
Last edited:

xilefian

Veteran
Veteran
Joined
Nov 26, 2014
Messages
121
Reaction score
189
First Language
English
Primarily Uses
It's not a precision issue, it's a lerping issue, this is 100% for certain. Notice how far the character "jumps" each frame when they move; if they jump far enough to leave a gap between their previous location and current location then they can jump over the 0-thickness walls.

The true-fix is to add thickness to lines, a good way of doing this would be infinite thickness in the direction away from the player, the fix for now is to change the colliders for your characters to match your tile-sizes, which is something I expect people using half-tile sizes will do anyway.
 
Last edited:

Nines

Villager
Member
Joined
Oct 20, 2017
Messages
5
Reaction score
0
First Language
English
Primarily Uses
RMMV
You're right. My tests were bad. Thank you for letting me know the primary cause.

I increased the player collider size and all is well. Thank you again!
 

Rishi Raj Jain

Pokemon MV Maker
Veteran
Joined
Jul 2, 2017
Messages
204
Reaction score
49
First Language
English
Primarily Uses
RMMV
Good, Just Update it so, the plugin would be compatible with popular plugins like Yanfly, SumRndmDde, etc.
 

vico

Veteran
Veteran
Joined
Dec 13, 2015
Messages
161
Reaction score
19
First Language
Portuguese
Primarily Uses
RMXP

HalcyonDaze

Smoke and Mirrors
Veteran
Joined
Feb 6, 2013
Messages
300
Reaction score
183
First Language
English
Primarily Uses
RMMV
In a future release, would you be able to add an option for a collision sound effect, Xilefian?
 

xilefian

Veteran
Veteran
Joined
Nov 26, 2014
Messages
121
Reaction score
189
First Language
English
Primarily Uses
I think nope because @xilefian said most plugins use hacks to render its features
No I said to add compatibility for specific Plugins there'd need to be hacks added to Altimit Movement, something I'm not willing to do as that ends up playing-chase with various Plugins as they are updated, making sure the hacks still work (and haven't broken anything). Not an ideal situation.

In a future release, would you be able to add an option for a collision sound effect, Xilefian?
This sounds like a reasonable request. What I'm going to do is add some API calls for detecting collisions, adding sound effects when two objects collide can then be done in events or in an extension Plugin.

At the moment we've been planning the extra-character animation frames extension, a second "sounds" extension after that would probably be a good idea - add footstep sound effects, collision sound effects, brush step sounds, ladder step sounds, vehicle move sounds, etc.
 

Rishi Raj Jain

Pokemon MV Maker
Veteran
Joined
Jul 2, 2017
Messages
204
Reaction score
49
First Language
English
Primarily Uses
RMMV
No I said to add compatibility for specific Plugins there'd need to be hacks added to Altimit Movement, something I'm not willing to do as that ends up playing-chase with various Plugins as they are updated, making sure the hacks still work (and haven't broken anything). Not an ideal situation.
If that's the case I don't think your Your Plugin is good enough that People would sacrifice using Popular plugins of Yanfly, SumRndmDde, etc.
If your plugin is incompatible in running alongside them.

Don't Mind I'm just making you aware, that if your plugin gives Compatibility issues with Popular Plugins, People will simply – Dump it.
The Hard Truth.
 
Last edited:

HalcyonDaze

Smoke and Mirrors
Veteran
Joined
Feb 6, 2013
Messages
300
Reaction score
183
First Language
English
Primarily Uses
RMMV
At the moment we've been planning the extra-character animation frames extension, a second "sounds" extension after that would probably be a good idea - add footstep sound effects, collision sound effects, brush step sounds, ladder step sounds, vehicle move sounds, etc.
That sounds fantastic. I've already added your plugin to my project, but I think I'm going to stick with it. Sounds promising.

And by the way, I have several popular plugins from Yanfly, Moghunter, and Sumrndmdude and they all work great, except for Galv's Collision SE, and that is to be expected.
 
Last edited:

Nines

Villager
Member
Joined
Oct 20, 2017
Messages
5
Reaction score
0
First Language
English
Primarily Uses
RMMV
People won't dump it, they'll write their own fixes for plugin incompatibilities. The plugin is open source and the developer has been really good about helping people diagnose issues.

Have you tested yourself whether Altimit is incompatible with Yanfly or the other plugins you mentioned? It has been working well with the other plugins I've tried and any issues I came across only needed minor fixes to bridge functionality.
 

Applesaws

Apple
Veteran
Joined
Nov 8, 2017
Messages
46
Reaction score
59
First Language
English
Primarily Uses
RMMV
Great plugin! Looking forward to the more animation frames and step sound features.
 

Tome571

Veteran
Veteran
Joined
Oct 3, 2015
Messages
126
Reaction score
127
First Language
English
Primarily Uses
Fantastic work so far. I'll run through some testing as well to see how it does. Thanks for all of the work on this so far!
 

Doktor_Q

I'm not a real doktor, but I am a real Q
Veteran
Joined
Aug 1, 2016
Messages
811
Reaction score
495
First Language
English
Primarily Uses
RMMV
It looks like there might be an issue with the "move backward" move command not resetting Direction Fix correctly at the end. Not sure if it's just not storing the value correctly, not restoring it at the end, or if something's overwriting it.

[EDIT] Also, followers don't inherit the player's 'through' status, so an event that moves the leader through a solid leaves the followers stranded on the other side.

[EDIT 2: THE LEGEND OF CURLY'S GOLD] Is there a tag to give a specific event a different collider, or do I have to specifically call the plugin command on each one?
 
Last edited:

xilefian

Veteran
Veteran
Joined
Nov 26, 2014
Messages
121
Reaction score
189
First Language
English
Primarily Uses
Is there a tag to give a specific event a different collider, or do I have to specifically call the plugin command on each one?
You can give specific event pages colliders by writing the XML data in a comment, here's an example:

EDIT: I posted example XML colliders here. You can have multiple colliders within the <collider> tags to stack them together (useful if you want to may a complex shape).

You can also set an event to use a collider preset (defined in the Plugin parameters) with <collider:"my preset"> in the event note tag. Id can be a preset name (in quotes) or an index in the preset list (array index starts at 1) like <collider:2>.

You can also use the <preset>my preset</preset> tag in the XML comments to select a preset. XML presets don't stack with collider lists at the moment. I personally find the event comments system to be easier than using the event note area.

Thank you very much for reporting these bugs, I'll investigate them in the coming week.

~ Plugin development news ~

In-case anyone didn't hear; I've added support for TileD polygon colliders, which means those using TileD for their maps can design their map's collision mesh in the TileD editor itself.

We've also been having in-depth discussion for the extra-animation-frames feature, particularly the API for such a feature. There is a project in planning that will use Altimit Movement that requires extra-frames, so this feature may jump up in the priority list (along with foot-step sounds/graphics) and end up in the core-Plugin.

I'm also testing out analogue game-pad input. My rough implementation has proven really interesting. I might use the second analogue stick as a way to override facing-direction, will look better with extra-frames' 8-direction facing. Would be very useful for ABS Plugins (aim direction).
 
Last edited:

Doktor_Q

I'm not a real doktor, but I am a real Q
Veteran
Joined
Aug 1, 2016
Messages
811
Reaction score
495
First Language
English
Primarily Uses
RMMV
@xilefian Oh! I feel like I saw that before, but couldn't find the tag instructions in the help file. Thanks!
 

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

  • Latest Threads

    Latest Profile Posts

    What does your project folder look like?
    I was told that an iPhone can provide a personal internet hotspot...You learn something new everyday!
    Will probably never use MZ. Buys it anyway
    Been playing Star Ocean: The Last Hope, the remastered version on PS4. I like it. Seems others think it's garbage, but I like these cutesy, silly, and tropey characters. Having waaaay more fun with it than SO: Integrity and Faithlessness.

    Forum statistics

    Threads
    100,458
    Messages
    976,161
    Members
    132,082
    Latest member
    nwr
    Top