Dead End

I have encountered a bit of a dead with progress. I have been flooded with issues with the framework and have been required to step back and rethink my current integration of features which has halted a lot if not all progress on the framework.

TLDR: Navigation is a pain. Everything is broken.

The first issue I have encountered is my current rendering setup does not allow easy texture integration. This will probably require a overhaul to integrate texturing. The second as probably seen I did implement a procedural generation in the previous post however a unforeseen issue has occurred with integrating AI with navigation in particular. The first issue I stumbled across was getting the walk able area to use when generating the area this required me to iterate over each vertex to get the nodes to put in a navigation graph. The issue I found with this was memory usage was huge up to 500MB in some situations and navigating the graph was slow due to the density over the graph. The next attempt was to try and compress the graph canceling out nodes for rarely used paths. This shrunk the memory usage down by a huge amount however trying to navigate to a barely populated area required extra processing when generating the path. Afterwards I got frustrated and moved over to a Navigation mesh. The first issue I encountered was converting the walk able area into a poly and had to create a algorithm that would run over the vertices and create a edge on the ones that had no connection and put them into a array. I would then run over the array and connect all the edges to create a poly. I would then go over again to put any breaks into separate arrays. I then had to then convert the poly to a triangle to reduce the cost when smoothing the path and calculating the node of positions problem is the libraries I found to do this are either broken had strict rules that I had no way to abide by when generating the triangles or as slow as slow can be. When I tried to find resources on the matter of converting the poly to triangles. After a while I found a library that appeared to work however I was wrong. I implemented the “Pulling the string” to smooth the path after it was generated from the nodes to discover that if 2 vertices that are in the same position and have a different memory address the polygon to triangle library will have a null triangle and crash. If the two vertices share the same memory address the library assert a error about there being a duplicate vertices. This occurs when punching hole on the Navigation mesh when two polygons are sharing a vertex and I had run out of solutions.

I hope I will eventually find a way to have navigation in a procedurally generated environment. Until then I need to scrap the implementation and hope I can find a tool that can generate a navigation mesh for me. Worst case I have to create a navigation mesh by hand until I figure it out.

And it would seem the time from the last post has been a while hopefully all goes well and I can post a update soon.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s