ForeverZer0's Pathfinding Advanced
#1
ForeverZer0's Pathfinding Advanced
Version: 1.0r


Introduction
This is an advanced an highly inteligent pathfinding system. It allows for the user to either, through script or script call, quickly and easily have events or the game player automatically walk a path to a given set of coordinates. The system is smart enough to quickly find paths through relalatively complex areas, and asjust on the fly for any obstacle that moves to block its path. I used the A* algorithm, basic search algorithm used often for robotics. More on this algorithm can be read about here:

http://en.wikipedia.org/wiki/A*_search_algorithm



Features
  • Fast and intelligent pathfinding
  • Easy to use script calls
  • Optional "range" parameter can have character find alternate locations if the preferred one is blocked and they are within the given range.
  • Optional Proc Class defined callbacks can be given to have something execute if when the character reaches its goal, or when it fails to do so.
  • Compatible Near Fantastica Pathfinding v1 methods included:
    • find_path(x, y)
    • clear_path



Screenshots
None. Its characters moving around the screen.



Demo
None.



Script
The Header and Instructions
The Engine Code



Instructions
Paste Below Scene_Debug and above Main. Likely, it will need be above other scripts or script-sets that utilize pathfinding codes or algorythms.



Compatibility

Designed for RPGMaker XP. Consistent with Ruby 2.7 Coding Standards.

Highly compatible. May experience issues with Custom Movement scripts, but even then, it is unlikely.



Credits and Thanks
  • ForeverZer0, for the original script
  • Special thanks to Jragyn for help making the big maze for the demo and help testing.
  • Credit goes to the Peter Hart, Nils Nilsson and Bertram Raphael for the original search algorithm that was implemented



Author's Notes
I was asked to look into the original work as it had issues with move routes that were blocked/impeded which brought up critical errors. It pretty much involved a couple lines of code added just to exit methods before the errors occurred.

Three of the original script calls have now been passed into the Interpreter class to make it cleaner from a user's perspective. And more safeguard measures and default options were added.

And a lot of the language within the Instruction/Header page is mostly the same as the original. Only that some instructions were made clearer.



Terms and Conditions
Free for use, even in commercial scripts. However, I require due credit for myself and all others listed in Credits/Thanks.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)

[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png]    [Image: liM4ikn.png]    [Image: fdzKgZA.png]    [Image: sj0H81z.png]
[Image: QL7oRau.png]    [Image: uSqjY09.png]    [Image: GAA3qE9.png]    [Image: 2Hmnx1G.png]    [Image: BwtNdKw.png%5B]
  Above are clickable links
Reply }


Possibly Related Threads…
Thread Author Replies Views Last Post
   ACBS FIX SCRIPT #2: Advanced Cry Correction DerVVulfman 1 5,035 08-09-2019, 03:42 PM
Last Post: aeliath
   GET STEPS FOR PATHFINDING DerVVulfman 0 4,315 08-24-2016, 04:56 AM
Last Post: DerVVulfman
   Map Scroll Advanced JayRay 0 4,419 05-16-2014, 10:51 AM
Last Post: JayRay
   Advanced Shop Status Window RPG Advocate 4 12,945 08-21-2011, 05:12 AM
Last Post: DerVVulfman
   Advanced Individual Battle Commands Trickster 6 16,436 01-29-2011, 04:30 AM
Last Post: DerVVulfman
   MultiSlots! Store Patch - Advanced Shop DerVVulfman 0 6,333 10-24-2010, 03:39 AM
Last Post: DerVVulfman
   MAWS - Modified Advanced Weather Script Agckuu_Coceg 26 42,898 05-27-2010, 04:43 PM
Last Post: sakhawat21
   Moghunter's Advanced Movement System Helel 1 8,594 12-08-2009, 11:52 PM
Last Post: explocion200
   AMS - Advanced Message Script - R4 (LegacyX Edit) Legacy 2 9,565 09-18-2009, 09:43 AM
Last Post: Legacy
   Dubealex's Advanced Message System R4 Dubealex 0 8,767 12-07-2008, 04:19 PM
Last Post: Dubealex



Users browsing this thread: 1 Guest(s)