Tag Info

New answers tagged

3

I would consider generating waypoint graphs instead. They're easy to work with, they give optimal paths, and are generally fast enough for reasonably small environments. The optimal path will be a series of line segments, and each vertex in the path will either be the origin, the destination, or a vertex of one of your obstacles. So although your ...


1

MeshParts in XNA, SubMesh in Ogre or other similar entities usually serve the main purpose of applying multiple materials to the same 3D model, yet still dealing with it as a single higher level entity (Mesh). You can't assign different materials to different parts of the same mesh, without having multiple draw calls, hence separating the model to different ...


2

Answer to your question can be found on Shawn Hargreaves Blog who was one of the XNA creators: Within a ModelMesh, each ModelMeshPart represents a single graphics card draw call. It contains a set of triangles that share the same material (stored in the ModelMeshPart.Effect property) and vertex declaration. For instance the ModelMesh for the body of our ...


4

new answer: In the real world, since this field is not densely populated, simply tell the characters to move in the desired direction and once they approach an obstacle, to go clockwise or counter-clockwise around it (depending on which way is shorter). To improve on this, you can walk the characters towards corners instead: In the general case, you ...


3

Various graph representations exist. Yours is an adjacency list with explicit vertices and implicit edges: Each vertex stores its adjacent vertices, each of which implies a directed edge to it. In the above, blue squares are vertex objects, arrows are references vertex A's list of vertices is [ B ] vertex B's list of vertices is [ A, C ] vertex C's list ...


-1

Have you tried to create your own class/struct to represent the nodes? You don't tell much about what your nodes are but with a Node class made by you you'd be able to stock anything you need inside and still use it as Dictionary key. That way, when you walk through your dictionary you can always know Nodes weight. But you can also save the list of ...



Top 50 recent answers are included