Jump to content

  • Log In with Google      Sign In   
  • Create Account


Silgen

Member Since 10 Sep 2012
Offline Last Active Dec 01 2012 07:22 PM
-----

Posts I've Made

In Topic: A* - Keeping track of nodes

01 December 2012 - 07:12 PM

Ultramailman - the white path overwrites the orange path, and the open list just outlines the orange block.

In Topic: A* - Keeping track of nodes

01 December 2012 - 07:08 PM

Ah I understand what you are saying - my mistake. I disabled that type of movement to prevent it going through walls that are only one block thick - guess I'll need to revise that then.

In Topic: A* - Keeping track of nodes

01 December 2012 - 06:58 PM

Surely it would have had to make the diagonal movement just before reaching the point though?

In Topic: A* - Keeping track of nodes

01 December 2012 - 06:43 PM

I've finished implementing what I believe to be an A* algorithm in some rather heinous code. I hope to try out binary heaps when I revisit this.

These are some images showing it in action. Blue representes an obstacle tile, orange a closed list square (explored) and the white line is the final path. Does this look correct? It moves towards the obstacle, then fills in back toward the starting point, until it can get around the obstacle, then resumes.

Posted Image

In Topic: A* - Keeping track of nodes

01 December 2012 - 04:51 PM

My code is pretty dirty at the moment - unsorted lists for open/closed, and a 2d array for the map. The path is just a singly linked list of nodes.

PARTNERS