? A* function? (Page 1) ● SmileBASIC Source Forums

Sign In

Register
*Usernames are case-sensitive
Forgot my password

Tell us how you'd like SBS to move forward: New SBS Status

A* function?

  • #1 ✎ 114 kitesinpowerlines Avatar Block I didn't change my avatar for 30 days. Website Avatar Embargo I didn't change my avatar for 90 days Website Avatar Taboo I didn't change my avatar for 180 days Website I have a tactical rpg game in the project pipeline and I’m thinking about AI movement. The best method I’ve come up with in research is the A* algorithm (calculating the shortest path between two points on a graph). However, I’m having a difficult time wrapping my head around how to write this algorithm in SB4. Has anyone attempted to write a similar function? Is there an easier way to determine the shortest path between two points while circumventing obstacles? Any advice or resources are appreciated. Posted
  • #2 ✎ 211 seggiepants I just reuploaded my A* implementation. The new key is: KNJXX3D. A* isn't cheap, so you will need to find a way to run it somewhat infrequently, unless this is turn based. Posted
  • #3 ✎ 114 kitesinpowerlines Avatar Block I didn't change my avatar for 30 days. Website Avatar Embargo I didn't change my avatar for 90 days Website Avatar Taboo I didn't change my avatar for 180 days Website
    I just reuploaded my A* implementation. The new key is: KNJXX3D. A* isn't cheap, so you will need to find a way to run it somewhat infrequently, unless this is turn based.
    Yeah, it will be turn based. I appreciate the help!
    Posted
  • #4 ✎ 1527 rando Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Second Year My account is over 2 years old Website Avatar Taboo I didn't change my avatar for 180 days Website
    A* isn't cheap, so you will need to find a way to run it somewhat infrequently, unless this is turn based.
    Just curious; is there a cheaper algorithm out there similar to A* that isn’t necessarily as good but runs faster with at least somewhat-good results?
    Posted Edited by rando