• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
slicer4ever

A* and quick invalid path determination.

6 posts in this topic

hello everyone, i'm working with a large tile map, and need to determine if a path is simply unreachable without exhausting alot of time.

i've come up with a few ideas on this, and would like some opinions:

A. for large area culling, i can do geometric id's for determining if the target tile is in the same area as the start tile, i expect i'll automate this process, but i suspect it'll give me a great boost when i select a target that is another land mass away.

B. for local area culling(i.e. several static objects are in a circle around my target(or even dynamic), making it unreachable), I was toying with the idea of taking the distance of the currently closest tile to the destination, after a certain point, i'll go in a circle around all the tiles at this radius, as such, if all tiles are in the closed list, then i can determine that the destination is unreachable, without having to do an exhaustive search.

my problem is implementing B quickly, my pathfinding system is already configured that it'll only take several tick's before breaking out, and allowing other things to be processed, but i'm simply not certain how and when i should trigger the radius search for unreachable determination.

any tips on the subject, or even better, better methods of pathing determination are very much welcome. Edited by slicer4ever
0

Share this post


Link to post
Share on other sites
Is your map static or dynamic? For a static map you could just segment the map using floodfills. You'd end up with x different areas. Then at runtime just check if the destination in the same area as the source. Another approach which may be more amenable for dynamic maps is recursive pathfinding. You could do it quickly (with crappy paths, just for connectivity checking). For a grid cell determine which of the 4 edges can be pathed between. Then treat each cell as a black box, and make bigger cells out of them, repeat. For connectivity checking then just path up to the next biggest level that doesn't overlap the destination, then back down levels until the destination is reached. For a dynamic map a limited subset of the pathing info could be recalculated as required.
0

Share this post


Link to post
Share on other sites
[quote name='jefferytitan' timestamp='1341657029' post='4956610']
Is your map static or dynamic?
[/quote]
both, their's alot of static objects, but also a number of dynamic objects, so i'd ideally want to make sure any pathing system that's developed can handle dynamic objects.

[quote name='jefferytitan' timestamp='1341657029' post='4956610']
For a static map you could just segment the map using floodfills.
You'd end up with x different areas. Then at runtime just check if the destination in the same area as the source.
[/quote]

this sounds like essentially what i was going to do with part A of path detection.

[quote name='jefferytitan' timestamp='1341657029' post='4956610']
Another approach which may be more amenable for dynamic maps is recursive pathfinding. You could do it quickly (with crappy paths, just for connectivity checking). For a grid cell determine which of the 4 edges can be pathed between. Then treat each cell as a black box, and make bigger cells out of them, repeat. For connectivity checking then just path up to the next biggest level that doesn't overlap the destination, then back down levels until the destination is reached. For a dynamic map a limited subset of the pathing info could be recalculated as required.
[/quote]

this kindof sounds like network programming and routing tables, but essentially it's be a routing table between a number of grouped nodes. It's an idea i had seldomly toyed with before, it's an interesting idea to approaching pathing, but the shear amount of memory required is way too much for my liking.
0

Share this post


Link to post
Share on other sites
Hierarchical pathfinding is probably the best straight-out-of-the-tin solution, and done right isn't particularly memory intensive. Generally you would want to be a bit more granular than jeffereytitan described. Group perhaps 10x10 grid cells at a time, and make probably a total of 3 layers at most, and you should be good.
0

Share this post


Link to post
Share on other sites
[quote name='ApochPiQ' timestamp='1341754348' post='4956927']
Hierarchical pathfinding is probably the best straight-out-of-the-tin solution, and done right isn't particularly memory intensive. Generally you would want to be a bit more granular than jeffereytitan described. Group perhaps 10x10 grid cells at a time, and make probably a total of 3 layers at most, and you should be good.
[/quote]
hmm, a 3 layer map might be interesting, i think i'll try to implement it.

also, i've come up with potetionally another approach to quickly determine if a tile is not reachable, essentially, instead of marching in a circle at a certain point, i'll keep track of the closest tile, if i have tested, say another 100 tiles, and none of them get me closer, than i probably can't reach the destination tile, it's not full proof, but my maps shouldn't really require going around something 100 tiles in diameter. i might also be able to dynamically determine the number of tiles i need to test before i can break, by calculating the number of tiles which would be in a circle to the destination. Edited by slicer4ever
0

Share this post


Link to post
Share on other sites
Try Bi-Directional, and find the intersection between paths, If the goal is unreachable one of the sides will stop.
0

Share this post


Link to post
Share on other sites
[quote name='hdlopesrocha' timestamp='1342188520' post='4958798']
Try Bi-Directional, and find the intersection between paths, If the goal is unreachable one of the sides will stop.
[/quote]

their are key flaws in that design, in theory it can potentially be == to normal pathfinding, at best, it does correctly identify blocked paths quickly, however, the worse(and in my opinion most potentially possible), is that the two path's bening searched in both directions well take radically diffrent paths, for example if we have:
[code]
[_][_][_]
[_][X][_]
[_][_][_]
[/code]
where X is blocked, and we start/end in both corners like so:
[code]
[S][_][_]
[_][X][_]
[_][_][D]
[/code]
then what's to stop something like so from occuring:
[code]
[S][_][_]
[S][X][D]
[_][_][D]

[S][_][D]
[S][X][D]
[S][_][D]

[S][D][D]
[S][X][D]
[S][S][D]
[/code]

such that we've done twice the work.
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0