by date
RTS Kit A* Pathfinding
RTS Kit A* Pathfinding
| Name: | Robert Stewart | |
|---|---|---|
| Date Posted: | Feb 11, 2006 | |
| Rating: | 5.0 out of 5 | |
| Public: | YES | |
| Comments: | YES | |
| RSS Feed: | or Subscribe with . | |
| Profile Page: | View profile page for Robert Stewart |
Blog post
Ok so I keep hearing how everyone wants Pathfinding in the RTS kit, so I decided this morning I would start working on it. I have a few different ideas on how it would be done, the one I'm currently working with takes very few resources.
Anyway I'll try and finish it today, I should have some sort of video of it in action tonight. Just letting you all know that pathfinding is in the works.
Also I have enabled a few debugging features for Pathfinding, so if debug enabled it will draw the path and nodes using OpenGL like the RTS Kit selection stuff. Oh and right now everything is done in script, I will change that to C++ maybe tomorrow or when ever I have it working nicely in script.
Anyway I'll try and finish it today, I should have some sort of video of it in action tonight. Just letting you all know that pathfinding is in the works.
Also I have enabled a few debugging features for Pathfinding, so if debug enabled it will draw the path and nodes using OpenGL like the RTS Kit selection stuff. Oh and right now everything is done in script, I will change that to C++ maybe tomorrow or when ever I have it working nicely in script.
Recent Blog Posts
| List: | 06/14/06 - My game 02/16/06 - RTS Kit A* Pathfinding Cont. 02/11/06 - RTS Kit A* Pathfinding 01/21/06 - I'm Back 10/17/05 - Plan for Robert Stewart |
|---|
Submit your own resources!| Todd Pickens (Feb 11, 2006 at 00:36 GMT) Resource Rating: 5 |
You will be my hero if you make this happen.
Can't wait to see more on this.
| Ian \"Xest\" Winter (Feb 11, 2006 at 01:40 GMT) |
I don't mean to start a flame war but I feel that the RTS kit is the weakest GG product I've bought, it seems almost totally unsupported and does seem to be very, very feature lacking, whilst I can understand GG's argument that they want to keep the kit generic I think most amateur developers would be in a much better position if there was at least some pathfinding routine implemented - it's easier for a good developer to remove and replace an existing pathfinding scheme that doesn't fit their needs than it is for a new developer to implement a pathfinding scheme from scratch.
I think if some form of pathfinding was available at least as a resource that it would open up so so many doors for new developers to start from and get their foot in the door. As I say, the keep it generic argument is all very well, but again - it's much easier for an experienced developer to remove and replace than it is for an amateur developer to build from scratch.
So thank you Rob, for adding something the RTS SK is so sorely missing ;)
| Steven Chiu (Feb 11, 2006 at 03:20 GMT) |
| Robert Stewart (Feb 11, 2006 at 05:44 GMT) |
I couldent get a movie done up yet, so here is a pic. Please click on link for image.
http://img86.imageshack.us/img86/7818/path2uf.jpg
Basically the white line is where the unit want's to go, the path is blocked so it find's the closest corner and moves to it, then it moves to the next corner, then it moves to the clicked position been the X. Green line showing the path the unit takes.
Edited on Feb 11, 2006 05:45 GMT
| Todd Pickens (Feb 11, 2006 at 06:00 GMT) Resource Rating: 5 |
The Pirate game I was working on www.surrenderyerbooty.com/ is basically in need of the ability to have ships path around a limited number of simple shapes (islands) and around other ships. Because of the turn based nature of the game nothing is moving when this occurs except for the couple of ships the player is in control of.
It appears from the image that you have a unit recognizing a collision volume and then moving around it to a designated point determined by a mouse click, is that correct?
| Todd Pickens (Feb 11, 2006 at 06:16 GMT) Resource Rating: 5 |
Not trying to hijack your thread Robert, just trying to pool the collective RTS developments of the day. Let's keep this ball rolling
And here is the link to Geom's post www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=9750
@ Ian, Thats a lot of RTS dev support for one day, hope that gets you smiling :O)
| Ian \"Xest\" Winter (Feb 11, 2006 at 15:24 GMT) |
Edited on Feb 11, 2006 15:24 GMT
| Todd Pickens (Feb 11, 2006 at 16:45 GMT) Resource Rating: 5 |
| Robert Stewart (Feb 11, 2006 at 17:38 GMT) |
http://img395.imageshack.us/img395/8145/path15vt.jpg
Blue is the obstacle and has to be the shape of a rectangle/square.
Cyan is the unit.
Black is the Clicked Position.
Brown are the corner's to the obstacle.
Pink is a raycast, sent from the unit to the clicked position, to find out if any obstacles are in the way.
Green is the direction the unit takes, following the closet corner to the clicked position.
I choose to use this very simple and resource cheap way of doing things,
first because it was my first attempt at pathfinding,
second because it only needs to use pathmanager when an obstacle is in the way.
There are many way's this could be done, one way I want to try is more of a resource hog, however it works really nicely around different shapes.
| Todd Pickens (Feb 11, 2006 at 18:33 GMT) Resource Rating: 5 |
for example

With regards to the other method you mention that is more of a resource hog, what about circular collision, of pentagonal or octagonal complexity?
I could make a square work for the islands in my pirate game, and that would also work for most building structures in any RTS game, but circular shapes would be a little more elegant.
| Robert Stewart (Feb 11, 2006 at 20:55 GMT) |
| Todd Pickens (Feb 12, 2006 at 01:10 GMT) Resource Rating: 5 |
In the Pirate game, the islands are relatively small, a box would work. The collision volume would be used for detecting the path around the island, and also interactions with the island, like dropping anchor near it to search for or burry treasure, that sort of thing. Precise collision wouldn't be necessary, as is true in most RTS games.
| Robert Stewart (Feb 22, 2006 at 18:31 GMT) |
| Nick Wallace (May 02, 2006 at 15:39 GMT) |
You must be a member and be logged in to either append comments or rate this resource.


5.0 out of 5


