Tag Info

New answers tagged

1

for (int i = 0; i < vertices.length / 3; i++) { vertexList[indices[i]] = new Vector3f(vertices[i], vertices[i + 1], vertices[i + 2]); } In your first run, you're taking vertices[0], vertices[1] and vertices[2], in your second run you're taking vertices[1], vertices[2] and vertices[3], see where the problem is? And i don't get why you're using ...


0

The simplest solution is to use the Relative Neighbourhood graph which provides a nice balance between the Delaunay Triangulation and MST.


4

Given only the sparse information you've supplied, and assuming that when creating a red edge, you wish to avoid collisions against both other edges and rects (which I assume are rooms)... What you are trying to avoid are crossings. What you want (red + green loops) are cycles in graph theory. Minimum Spanning Trees are tree-graphs - that means no cycles to ...


0

Plese don't consider it as an anwser yet, for good or bad, I just need some place to tell about half of the problem (duplication) I think you need to choose one of them to be the central point, either actor or client (I don't know how to use RPC to tell you how the API would work). Suppose you choose that an Actors have many clients foreach(var client in ...


0

If you want to aim for a real class, I would recommend C++ if that's how you want to organize your project. However C is still totally appropriate for OpenGL. If I'm not mistaken a totally appropriate C way of doing something class-like would be: // Shader.h struct Shader{ GLuint id; } Shader* createShader(char* vertexSource, char* pixelSource); void ...


2

At 4096 nodes, it's probably not an issue. The pathfinding should be fast, and the resulting paths will be pretty small. The simplest approach to reduce the number of nodes on the paths is to first find the path on the grid, and then use "string pulling" to eliminate most of the nodes from the resulting path. If you're working with a large grid you might ...


0

You could develop a bytecode language for this. Take a look at this: http://gameprogrammingpatterns.com/bytecode.html Instead of spells as in that example, see the commands as 'walk to' and 'display message' and so on.


1

Use an influence map for target searching. Have a grid and on each node, reserve a spot in a collection of units for each team. For each unit, generate a collection of coordinates within range and offset these coordinates as the unit moves. When a unit searches for a new target, enumerate over its coordinates within range. If another unit is on one of ...



Top 50 recent answers are included