Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (AndrewAMD, ozgur, AbrahamR, wdlmaster), 849 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
A-Star in Lite-C #172608
12/13/07 04:19
12/13/07 04:19
Joined: Oct 2006
Posts: 175
G
Gumby22don Offline OP
Member
Gumby22don  Offline OP
Member
G

Joined: Oct 2006
Posts: 175
Ok, so having just gotten my first lite-c project setup for a-star pathfinding, on a grid system of my own design (each grid square can be divided into 4 quarter, so that a closestnode(x,y) returns the smallest valid node to any point within the "terrain") I'm essentially wondering what other people have come up with in 3DGS for A-Star? Anyone else got a working prototype converted to Lite-C for A7, and do people think having a binary heap for a terrain of my type is worthwhile?

Anyway, as I'm on holidays, I'm just playing with code and avoiding in-laws (all 3 females of the scary strong type) and I think I'll set up a clean version of my code for contributing once I get back (Jan 1 ish)

Don
Have a great day

Re: A-Star in Lite-C [Re: Gumby22don] #172609
12/13/07 09:12
12/13/07 09:12
Joined: Aug 2006
Posts: 652
Netherlands
bstudio Offline
User
bstudio  Offline
User

Joined: Aug 2006
Posts: 652
Netherlands
Basically I have written some form of A* in Lite-C, which does this:
- Divide the surface in grids of a definable size
- Check which nodes are walkable by scanning for models or blocks on that node
- Let the user select a node to walk to
- Using a from of a A* algorithm to select the shortest path towards the node
- Let the NPC walk the path

It features some nasty (not to mention buggy) code, so I need to clean it up. It isn't pure A*, because I wanted to go with a (hopefully) faster approach. But implementing it should be easy.


BASIC programmers never die, they GOSUB and don't RETURN.
Re: A-Star in Lite-C [Re: bstudio] #172610
12/14/07 02:38
12/14/07 02:38
Joined: Oct 2006
Posts: 175
G
Gumby22don Offline OP
Member
Gumby22don  Offline OP
Member
G

Joined: Oct 2006
Posts: 175
gotta love messy code I sure do, but I did actually almost enjoy going through reading it for cleanness and taking out all the superceded comments yesterday.

Is there any shared lite-c / c-script pathfinding code in the user contributions that people would like to make a linking thread to be stickied in here?

Don
have a great day

Re: A-Star in Lite-C [Re: Gumby22don] #172611
12/14/07 10:17
12/14/07 10:17
Joined: Dec 2000
Posts: 4,608
mk_1 Offline

Expert
mk_1  Offline

Expert

Joined: Dec 2000
Posts: 4,608
Binary heap is always useful!
And it's really easy to implement.


Follow me on twitter
Re: A-Star in Lite-C [Re: Gumby22don] #172612
12/15/07 08:53
12/15/07 08:53

A
Anonymous
Unregistered
Anonymous
Unregistered
A



http://www.coniserver.net/ubbthreads/showflat.php/Cat/0/Number/773829/an/0/page/0#Post773829
direct link to game (if still available)

Win the little game of this post (the game is in english) and you get a 2D grid related A* pathfinding (as well as a maze generator)...

mercuryus

Re: A-Star in Lite-C [Re: ] #172613
12/15/07 10:07
12/15/07 10:07

A
Anonymous
Unregistered
Anonymous
Unregistered
A



ok i won


Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1