Tag Info

Hot answers tagged

2

A* is for finding the shortest path from vert a to vert b. Its not a good fit for finding all verts x distance from vert a. A Depth First Search (DFS) should be suitable for your problem and very cheep on both memory and clock cycles. There is another basic search algorithm called the Breadth First Search (BFS) that would run at similar speeds but uses ...


1

You need to create polygons to check for collisions and check them every step in updating the position. I found example in the internet and try translate comments to English. You can download example. Other way is creating collision map, like this P.S. Sorry for Google-translate.


1

This is very much something that I would hard-code. If there were fewer tiles, I'd be tempted to simply hard-code the rectangles for each tile. But in this case, you can hard-code the regions and do a bit of maths to get the rectangles for individual tiles: public static class TilesetInfo { private static Rectangle TileInRegion(int regionX, int regionY, ...



Only top voted, non community-wiki answers of a minimum length are eligible