VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Astrid

BigCalm  (10 Submissions)   Games   Visual Basic 3.0   Intermediate   Wed 3rd February 2021

A demo of the A* (A star) pathing algorithm used in many games to find a path across a varied map. This is merely a demo, but with optimisation it could be modified to be used in a game. Most tiled map games, board games (such as chess), and route finders all use the A* pathing algorithm as a quick an efficient method of finding a route from A to B.
The code also contains my implementation of a Heap or Binary Tree (which is sadly lacking from VB).

Assumes
A* is based on graph theory, and has many implementations. Numerous links are included in the code for the user to find out more

API Declarations
Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long
Public Const BLACKNESS = &H42
Public Const WHITENESS = &HFF0062
Declare Function timeGetTime Lib "winmm.dll" () As Long

Rate Astrid (11(11 Vote))

Download Astrid

Astrid Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters