Jump to content

Tutorial: A* pathfinding with C#


AggrorJorn
 Share

Recommended Posts

Allways wondered how to create pathfinding for your game? Check out this in depth tutorial about the A* pathfinding in Leadwerks using LE.NET.

 

This tutorial covers all points of setting up a basic program using the A* algorithm. The tutorial uses LE.NET and Visual Studio 2010.

 

This tutorial covers:

  • Pathfinding in general
  • Dijkstra algorithm
  • Setting up a grid with tiles
  • A* algorithm
  • Getting the path
  • How to improve

Download Available!

  • Start project
  • Finished project
  • Powerpoint used in the video

http://www.leadwerks.com/werkspace/files/file/321-a-star-a-pathfinding/

 

 

post-45-0-04704600-1329050417_thumb.png

  • Upvote 1
Link to comment
Share on other sites

Excellent introduction to A Star path finding Aggror. Although you mention it I have to emphasis the importance of using the diagonals too, to get not only a shorter but a more realistic path, but this serves as a good introduction to the subject for anyone coming to this for the first time.

 

Path smoothing techniques can then be introduced to smooth out the direction changes and make the paths (movement) look a little more natural and less mechanical.

Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++

Link to comment
Share on other sites

Thanks everyone.

 

Excellent introduction to A Star path finding Aggror. Although you mention it I have to emphasis the importance of using the diagonals too, to get not only a shorter but a more realistic path, but this serves as a good introduction to the subject for anyone coming to this for the first time.

Yes it is very important. I want to make a tutorial with the A* and a terrain created in Leadwerks. From there on I will add the diagonal heuristic and even a special heuristic for different terrein height. After that I will make some characters walk with steering behaviour. Should be a nice tutorial I think.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...