GithubHelp home page GithubHelp logo

ajipsum / a-pathfinding-visualization Goto Github PK

View Code? Open in Web Editor NEW

This project forked from devoncrawford/a-pathfinding-visualization

0.0 1.0 0.0 58 KB

First attempt at an efficient pathfinding algorithm in Java. I made this visualization to show the beauty of pathfinding. You can modify all major features of my algorithm through the graphics interface.

Home Page: http://devoncrawford.io/software/pathfinding

License: MIT License

Java 100.00%

a-pathfinding-visualization's Introduction

A* Pathfinding Visualization

This is my first attempt at A* pathfinding. I made this visualization to show the beauty of pathfinding. You can modify all major features of my algorithm through the graphics interface. Here I will go through the major features of my program.

Basic Controls

You must create a map to start the pathfinding. The start node is blue, end node is red and the walls are black.

To create nodes:

  • Start: hold 's' + left click
  • End: hold 'e' + left click
  • Wall: left click

To delete nodes:

  • same as creation, except right click!

basic-controls

Diagonal

My algorithm supports both diagonal and non diagonal pathfinding.

Simply check the "diagonal" box at the bottom left of the screen.

diagonal-vs-non-diagonal

Variable Speed

You may change the speed of the visualization during runtime.

  • By default, speed is 50%.

Notice: speed only works when showSteps is true.

if showSteps is false, well, that leads into the next section..

Show Steps or Timed Efficiency

You may choose to view a step-by-step process of the algorithm by selecting "showSteps" box at the bottom left.

  • If showSteps is false, the algorithm will skip visuals until the end, and process as fast as possible.

This is useful for when you want to analyze the efficiency of my algorithm in different coniditons. The example below shows "showSteps" as false, where it times the algorithm and outputs "Completed in 4ms" at the bottom left.

showsteps

Complicated Stuff

Those are the basics! Now you can be free to make the map as complicated as you desire. (Not really, because making the map too large will overflow the stack). But go ahead!

complicated-drawings

Zoom

You can (kind of) zoom in and out. I wouldn't really advise it. It does not zoom into your mouse, only towards the top left corner, and making the map too big will crash the program. This needs some work. However, If you zoom in far enough you can view each nodes information. The top left is the "F cost", bottom left is "G cost" and bottom right is "H cost". I will work on properly implementing a zoom feature soon.

a project by Devon Crawford.

a-pathfinding-visualization's People

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.