Previous Blog Next Blog
Prev/Next Blog
by date

The mystery maze of A-Star!

The mystery maze of A-Star!
Name:Ricky Taylor 
Date Posted:Jun 01, 2006
Rating:5.0 out of 5
Public:YES
Comments:YES
RSS Feed:GarageGames Blog feedor Subscribe with .
Profile Page:View profile page for Ricky Taylor

Blog post
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...

Submit ResourceSubmit your own resources!

Trenton Shaffer   (Jun 01, 2006 at 23:14 GMT)
Awesome! Nice work!

Ramen-sama   (Jun 01, 2006 at 23:22 GMT)
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.

Ricky Taylor   (Jun 01, 2006 at 23:27 GMT)
Sure, Ill release it seperatly... Just two files: aiPathfinding.cc and aiPathfinding.h.

Instant pathfinding... Ill start the resource now.. =)

Ramen-sama   (Jun 02, 2006 at 00:32 GMT)
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"

Paul /*Wedge*/ DElia   (Jun 02, 2006 at 02:42 GMT)   Resource Rating: 5
Cool. Beans.

Alexander "taualex" Gaevoy   (Jun 02, 2006 at 04:00 GMT)   Resource Rating: 5
Ricky, awsome work!
It will be really kind of you to post such resource.

Nick Zafiris   (Jun 02, 2006 at 08:37 GMT)   Resource Rating: 5
This is an extremely needed feature. Great work!

Ricky Taylor   (Jun 02, 2006 at 10:56 GMT)
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.
Edited on Jun 02, 2006 11:00 GMT

fireVein   (Jun 02, 2006 at 11:57 GMT)   Resource Rating: 5
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

Mark McCoy   (Jun 02, 2006 at 13:42 GMT)
Ahh, the power of tea and toast. :)

Don Hogan   (Jun 02, 2006 at 13:58 GMT)
You sir, are a fine and generous fellow! Thanks!

Justin Chiu   (Jun 07, 2006 at 05:50 GMT)
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

You must be a member and be logged in to either append comments or rate this resource.