Skip to content

jamieabw/AStarVisualiser

Repository files navigation

A* Pathfinding Program using LibGDX

This Java program implements an A* pathfinding algorithm using LibGDX, allowing users to place walls on a grid with left-click, reset the grid with right-click, and run the pathfinding algorithm with the space bar.

Features

  • Interactive grid-based environment for pathfinding visualization.
  • Left-click to place walls on the grid.
  • Right-click to reset the grid.
  • Space bar to run the A* pathfinding algorithm and visualize the shortest path.
  • Visual feedback for pathfinding process and results.

Requirements

  • Java Development Kit (JDK) 8 or higher
  • LibGDX library

Installation and Setup

  1. Clone or download the repository to your local machine.
  2. Open the project in your preferred Java IDE (e.g., IntelliJ IDEA, Eclipse).
  3. Make sure to configure the project to use LibGDX libraries.
  4. Build the project to ensure all dependencies are resolved.

Usage

  1. Run the program using your IDE or compile it into a runnable JAR file.
  2. Upon running, you'll see an interactive grid display.
  3. Use the following controls:
    • Left-click: Place walls on the grid.
    • Right-click: Reset the grid (clear walls and start over).
    • Space bar: Run the A* pathfinding algorithm and visualize the shortest path.

Example

Here's a brief example of how to use the program:

  1. Run the program.
  2. Left-click on the grid to place walls where obstacles are present.
  3. Right-click to reset the grid if needed.
  4. Press the space bar to execute the A* pathfinding algorithm.
  5. Observe the visualization of the algorithm's process and the shortest path found.

About

A* pathfinding visualiser program in LibGDX

Topics

Resources

License

Stars

Watchers

Forks

Languages