New answers tagged


I see several issues and missing things in your approach. Foremost problem is that you are not issuing any actual OpenGL draw call, i.e. you are never telling OpenGL to render anything. In your loop function you do: glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glfwSwapBuffers(this.window); This clears the back buffer (to yellow in your case)...


If the ParticleEffect owns the texture you need to call dispose, and it owns it only if the texture is loaded using a FileHandle, so if it comes from TextureAtlas it doesn't own it and you don't need to call dispose. But, the dispose method of ParticleEffect is aware of this so it's safe to call dispose even if it is not the owner of the texture. ...


The same way you do for a 2D world (or flat 3D world). The only differences would be the cost calculation and movement possible to get to neighbors.


What A* needs to work is the following: Given the current node, get the list of possible nodes it can move to, with their costs. The ability to evaluate the heuristic function. Please notice I've said nothing of a grid. A* will work with any graph, with nodes and links. If you could have the graph pre-made, you would just execute on the graph. But you don'...


It looks like your pixel lookup is backwards: int pixel = rawPixels[x*width+y]; Should be int pixel = rawPixels[x+width*y];

Top 50 recent answers are included