The mystery maze of A-Star!
by Ricky Taylor · 06/01/2006 (4:01 pm) · 12 comments
Well... Some time ago now I bought the RTS starter kit.
To begin with I was amazed, there seemed to be everything I needed, moving units, buildings, a lobby... All laid out ready for an RTS to be made...
It was then I made the first observation... What? That unit just walked through a building...
OK, there is no collision, its still good! But enabling collision made things worse!
Sigh... This needs some work...
After upgrading the RTS-SK to TGE 1.4, I decided to learn the magic of A-Star....
2 weeks, 14 cups of tea, and 28 peices of toast later...
We have some kind of a red line thing...

This is all very nice you may think, but it was the start of the magic of A-Star...
A few hours later, we were ready for a race/test/maze thing:
Here are the units at the starting line:

Here they are navigating the corner, some lagging behind!

They've found the exit!


And they're done! Well most of them!

And here we are, fully assembled, at the finishing line!

Once I've tidied the code I'm sure it'll make its way into the hands of the GarageGames folk...
To begin with I was amazed, there seemed to be everything I needed, moving units, buildings, a lobby... All laid out ready for an RTS to be made...
It was then I made the first observation... What? That unit just walked through a building...
OK, there is no collision, its still good! But enabling collision made things worse!
Sigh... This needs some work...
After upgrading the RTS-SK to TGE 1.4, I decided to learn the magic of A-Star....
2 weeks, 14 cups of tea, and 28 peices of toast later...
We have some kind of a red line thing...

This is all very nice you may think, but it was the start of the magic of A-Star...
A few hours later, we were ready for a race/test/maze thing:
Here are the units at the starting line:

Here they are navigating the corner, some lagging behind!

They've found the exit!


And they're done! Well most of them!

And here we are, fully assembled, at the finishing line!

Once I've tidied the code I'm sure it'll make its way into the hands of the GarageGames folk...
#2
06/01/2006 (4:22 pm)
Hmmmm hopefully this can be released and not require the RTS kit. I haven't the need for that but i do need decent pathfinding. BTW looks good. i added in some A* designed for 2d games and it works, but i'm restricted to 45 degrees turns and i had some strict positioning rules i had to follow.
#3
Instant pathfinding... Ill start the resource now.. =)
06/01/2006 (4:27 pm)
Sure, Ill release it seperatly... Just two files: aiPathfinding.cc and aiPathfinding.h.Instant pathfinding... Ill start the resource now.. =)
#4
06/01/2006 (5:32 pm)
how does it in regards to players? does it do raycasts to determine if they're in the way? how will it work for large units overlap the "lines"
#5
06/01/2006 (7:42 pm)
Cool. Beans.
#7
06/02/2006 (1:37 am)
This is an extremely needed feature. Great work!
#8
Yes, it does raycasts... =)
I have done it kind of hacky, It just checks the classname.
But there is a script callback: isNodeBlocked, where you can do your own collision detection. ;)
I dont have the units "collide", I think that its OK for the units to walk through each other... But hey, thats why it'll be a resource. ;P
Others:
Ive posted the resource, give it a coupla days.
06/02/2006 (3:56 am)
Ramen:Yes, it does raycasts... =)
I have done it kind of hacky, It just checks the classname.
But there is a script callback: isNodeBlocked, where you can do your own collision detection. ;)
I dont have the units "collide", I think that its OK for the units to walk through each other... But hey, thats why it'll be a resource. ;P
Others:
Ive posted the resource, give it a coupla days.
#9
-Jase
06/02/2006 (4:57 am)
Thats awsome that you are releasing the pathfinding into a resource; theres A LOT of people who could make use of pathfinding. Very cool!-Jase
#10
06/02/2006 (6:42 am)
Ahh, the power of tea and toast. :)
#11
06/02/2006 (6:58 am)
You sir, are a fine and generous fellow! Thanks!
#12
I don't know it's legal o not, here is link to your resource, hope this could help someone.
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=10603
06/06/2006 (10:50 pm)
Awsome work! Ricky.I don't know it's legal o not, here is link to your resource, hope this could help someone.
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=10603
Torque Owner Trenton Shaffer