{"id":13530909,"url":"https://github.com/albert-dang/A-Star-Pathing","last_synced_at":"2025-04-01T19:30:50.931Z","repository":{"id":55481149,"uuid":"301384105","full_name":"albert-dang/A-Star-Pathing","owner":"albert-dang","description":"A library for A* pathfinding. Written for easy integration and plug-and-play","archived":false,"fork":false,"pushed_at":"2021-02-06T05:23:09.000Z","size":58,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-05-21T13:40:31.751Z","etag":null,"topics":["algorithms","artificial-intelligence","engine","graph","pathfinding","pathfinding-algorithm"],"latest_commit_sha":null,"homepage":"","language":"Game Maker Language","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/albert-dang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-10-05T11:25:33.000Z","updated_at":"2024-04-07T15:04:15.000Z","dependencies_parsed_at":"2022-08-15T01:20:24.733Z","dependency_job_id":null,"html_url":"https://github.com/albert-dang/A-Star-Pathing","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/albert-dang%2FA-Star-Pathing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/albert-dang%2FA-Star-Pathing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/albert-dang%2FA-Star-Pathing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/albert-dang%2FA-Star-Pathing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/albert-dang","download_url":"https://codeload.github.com/albert-dang/A-Star-Pathing/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246700106,"owners_count":20819825,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithms","artificial-intelligence","engine","graph","pathfinding","pathfinding-algorithm"],"created_at":"2024-08-01T07:00:57.494Z","updated_at":"2025-04-01T19:30:47.355Z","avatar_url":"https://github.com/albert-dang.png","language":"Game Maker Language","funding_links":[],"categories":["Pathing"],"sub_categories":["Recommendations"],"readme":"# Quickstart\nThe algorithm is designed for 2.5 dimensional games where obstacles are mapped to rectangular cells. Your smallest collidable object will occupy one cell. Movement is 4-directional for quick implementation but is easily converted to n-directional by expanding on `moveStack_neighbours()`. The purpose of this format is to allow us to respect the orthogonal (graphic) representation of the game while facilitating movement and dynamic pathfinding on different planes.\n\nWith `get_moveStack()`, we can assign a stack of waypoints to a given instance. We only need to figure out:  \n- When we want to read in the next waypoint  \n- How we're getting to the x and y stored in that waypoint  \n  \nOnce we're ready to read in a waypoint, simply pop the moveStack assigned to a given instance:  \n- `waypoint = ds_stack_pop(moveStack)`  \n\nThen access the x and y keys:  \n- `xNext = waypoint[? moveX]`  \n- `yNext = waypoint[? moveY]`  \n\n## `get_moveStack()`  \nInitializes the pathfinding algorithm and assigns a stack of waypoints to a given instance.  \n  \n### Arguments:  \n- col (int)  \n  - The relative starting column of the instance we're moving. `col = 0` would mean starting in the leftmost column of our moving grid. We can use `get_grid(instance.x)` to quickly get a relative column.\n  \n- row (int)  \n  - The relative starting row of the instance we're moving. `row = 0` would mean starting in the topmost row of our moving grid. We can use `get_grid(instance.y)` to quickly get a relative row.  \n  \n- colGoto (int)  \n  - The relative row of the distination. `colGoto = 0` would be the leftmost column considered by the pathfinder. We can use `get_grid(x)` from this library to convert any x to a relative column. For example, we can easily assign a column with the mouse simply using `get_grid(mouse_x)` to figure out the relative column for us.  \n  \n- rowGoto (int)  \n   - The relative row of the distination. `rowGoto = 0` would be the topmost row considered by the pathfinder. We can use `get_grid(y)` from this library to convert any y to a relative row. For example, we can easily assign a row for following another instance simply using `get_grid(ally.y)` to figure out the relative row for us.  \n  \n- grid (mp_grid)  \n  - ID of some mp_grid  \n    \n- grid_originX = absolute x coordinate of origin of the grid  \n- grid_originY = absolute y coordinate of origin of the grid  \n    - Allows for dynamic pathfinding and optimizing memory  \n- grid_cellWidth = width of columns in the grid  \n- grid_cellHeight = height of rows in the grid  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falbert-dang%2FA-Star-Pathing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falbert-dang%2FA-Star-Pathing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falbert-dang%2FA-Star-Pathing/lists"}