Altimit Pixel Movement [0.50β]

Discussion in 'JS Plugin Releases (RMMV)' started by xilefian, Oct 9, 2017.

  1. Nines

    Nines Villager Member

    Messages:
    5
    Likes Received:
    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.
     
    #41
  2. xilefian

    xilefian Veteran Veteran

    Messages:
    120
    Likes Received:
    183
    First Language:
    English
    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: Nov 2, 2017
    #42
    vico and Kyuukon like this.
  3. vico

    vico Veteran Veteran

    Messages:
    160
    Likes Received:
    18
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    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.
     
    #43
  4. Nines

    Nines Villager Member

    Messages:
    5
    Likes Received:
    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.
     
    #44
  5. xilefian

    xilefian Veteran Veteran

    Messages:
    120
    Likes Received:
    183
    First Language:
    English
    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: Nov 2, 2017
    #45
    Applesaws and Nines like this.
  6. Nines

    Nines Villager Member

    Messages:
    5
    Likes Received:
    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: Nov 2, 2017
    #46
  7. xilefian

    xilefian Veteran Veteran

    Messages:
    120
    Likes Received:
    183
    First Language:
    English
    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: Nov 3, 2017
    #47
    Nines likes this.
  8. Nines

    Nines Villager Member

    Messages:
    5
    Likes Received:
    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!
     
    #48
  9. Rishi Raj Jain

    Rishi Raj Jain Pokemon MV Maker Veteran

    Messages:
    204
    Likes Received:
    47
    Location:
    India
    First Language:
    English
    Primarily Uses:
    RMMV
    Good, Just Update it so, the plugin would be compatible with popular plugins like Yanfly, SumRndmDde, etc.
     
    #49
  10. vico

    vico Veteran Veteran

    Messages:
    160
    Likes Received:
    18
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    I think nope because @xilefian said most plugins use hacks to render its features
     
    #50
  11. ∊η∊ηra

    ∊η∊ηra Smoke and Mirrors Veteran

    Messages:
    258
    Likes Received:
    115
    Location:
    Manhattan
    First Language:
    English
    Primarily Uses:
    RMMV
    In a future release, would you be able to add an option for a collision sound effect, Xilefian?
     
    #51
  12. xilefian

    xilefian Veteran Veteran

    Messages:
    120
    Likes Received:
    183
    First Language:
    English
    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.

    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.
     
    #52
    ∊η∊ηra likes this.
  13. Rishi Raj Jain

    Rishi Raj Jain Pokemon MV Maker Veteran

    Messages:
    204
    Likes Received:
    47
    Location:
    India
    First Language:
    English
    Primarily Uses:
    RMMV
    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: Nov 5, 2017
    #53
  14. ∊η∊ηra

    ∊η∊ηra Smoke and Mirrors Veteran

    Messages:
    258
    Likes Received:
    115
    Location:
    Manhattan
    First Language:
    English
    Primarily Uses:
    RMMV
    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: Nov 5, 2017
    #54
  15. Nines

    Nines Villager Member

    Messages:
    5
    Likes Received:
    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.
     
    #55
  16. Applesaws

    Applesaws Apple Veteran

    Messages:
    46
    Likes Received:
    58
    First Language:
    English
    Primarily Uses:
    RMMV
    Great plugin! Looking forward to the more animation frames and step sound features.
     
    #56
    Rishi Raj Jain likes this.
  17. Tome571

    Tome571 Veteran Veteran

    Messages:
    113
    Likes Received:
    91
    Location:
    Michigan
    First Language:
    English
    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!
     
    #57
  18. Doktor_Q

    Doktor_Q I'm not a real doktor, but I am a real Q Veteran

    Messages:
    600
    Likes Received:
    334
    Location:
    Denial
    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: Nov 12, 2017
    #58
  19. xilefian

    xilefian Veteran Veteran

    Messages:
    120
    Likes Received:
    183
    First Language:
    English
    You can give specific event pages colliders by writing the XML data in a comment, here's an example:
    [​IMG]
    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: Nov 12, 2017
    #59
  20. Doktor_Q

    Doktor_Q I'm not a real doktor, but I am a real Q Veteran

    Messages:
    600
    Likes Received:
    334
    Location:
    Denial
    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!
     
    #60

Share This Page