Jump to content
  • Advertisement

Oger-Lord

Member
  • Content Count

    5
  • Joined

  • Last visited

Community Reputation

100 Neutral

About Oger-Lord

  • Rank
    Newbie
  1. Oger-Lord

    RTS Pathingmap

    Okay, I will use the map like in the clearance example: Every field gets the value by checking how large we could expand the rectangle. This is useful because it is easy to change blocking fields and to recalculate the size for the units. I can simply start at the bottom right position I want to change and than always determine the new value by looking at the right/bottom/diagonal neighbour of this field. (if it exists) Therefore I have a larger if construct but I dont need to visit some field "twice". I already tested it and it works fine. (+ should be fast)
  2. Oger-Lord

    RTS Pathingmap

    I found some nice articles and it will take me some time to read and think about them: http://aigamedev.com/open/tutorial/clearance-based-pathfinding/ http://aigamedev.com/open/tutorial/symmetry-in-pathfinding/ http://www.moddb.com/games/0-ad/news/the-pathfinding-saga-continues
  3. Oger-Lord

    RTS Pathingmap

    your 1-4 aren't meant to represent costs at all, they're just a way of determining how big the impassible area should be for later A* pathfinding. So if you were pathfinding for a unit of size 3, you would turn cells marked 1 and 2 into red cells, correct?[/quote] Yep. The only costs of terrain I could imagin are hills but for this I would use the heightmap of the terrain. I'm still not seeing the point of the quadmaps unless perhaps it's for a steering behaviour?[/quote] Youre right that is not useful for the grid but the quadtree for Obstacles is a better way than creating one obstacle for every blocked cell.
  4. Oger-Lord

    RTS Pathingmap

    I was a little bit surprised that you chose the values that you did.[/quote] I found this thread here: http://www.gamedev.net/topic/511923-pathfindinga-with-variable-unit-size-in-rts/ and I think your maps is maybe useful for other strategy games but in my case I dont have hilly grounds nore I want to save the HP of a building in the map. Are you thinking of using steering behaviours for path smoothing, or for flying units where obstacles aren't really a problem?[/quote] I think in a rts game an A* is used to find the way arround buildings and trees and the steering behaviours to smooth the path and avoid other units.
  5. Oger-Lord

    RTS Pathingmap

    Hi, i have some question how to structure my pathingmaps. I want to create a RTS game like Warcraft 3/Starcraft 2. For the pathfinding I want to use a modified A*Star and steering behaviours. There are 4 different pathingmaps for ground-,air-,water-units and for buildings and all these pathingmaps should be grids. Each of this submaps should contain one Grid for the detailed pathing information and one quad tree which contains the Obstacles for the steering behaviors. Here is one example how the grid could look like: The negative values represent fields which are blocked (red) and arround these blocked fields there is an information how large the units can be which can pass these fields. (for the A*Star) Besides I could use different negative numbers for different layers. (Example:A building blocks a path, than a trigger says that the area where the building stand is blocked for units and after this the building is killed.) I am not sure if a QuadTree would be useful in this case because there a many different values. Here is an image how the obstacles could look like: I think the obstacle tree is okay but the other map has some problems. For example every time a pathing blocker is deleted I would need to check all field arround and recalculate the value by searching the nearby blocked fields. This would mean that about 25*25 fields must be checked -> high costs... The only way to fix this would be to support only 3 unit sizes and than i would only need to check about 9*9 fields. Or the A*Star needs to check for the size every time but I cant imagine that this could be better. But maybe this could be a tip that i generaly made some mistakes in my structure. So I am intrested in the opinion of some experts.Is everything alright? (Atm I would implement the simlple version but maybe there exists a solution with a good performance and many different unit sizes?)
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!