Original Post
Hey all, Im real new to EVERYTHING involved with 3d game programming, so please bare with me if I say something real ignorant. So I have been messing around with a program called DX Studio which is pritty sweet, and I have come to a point where I want to start doing more advanced things with 3d objects, such as AI and pathfinding, inventory, all that stuff. Perhaps do some SMALL multi player options. (like group missions) I have been reading everything I can find about pathfinding, and the way it works and the EXACT math equation that is used, etc. Although I have read a ton of stuff on the subject, it is still only a vague idea, which I understand, but its still out there, like a dream your just waking up from. Ok to get to my point. I was thinking of creating a system where I list all my 'nodes' via a database with their different weights, and directions, etc listed as rows in a sql database. I then would setup my pathfinding A* code to first check the destination node and the 'home' node against the database and if there isn't a path listed, it would go through the A* script as normal. The catch here is that once it determines the correct path, I would then make it save A)the destination node, b)the home node and c)the path determined, to the monsters 'memory database' Now if it does find that 'destination node' and 'home node' are in the table, it just loads the path that was saved the last time and uses it. A couple ideas I had to optimize this would be maybe just use it for node regions. Instead of scanning every single node, just have a region check, so check the region im in, check the region the target is in, load the path in the database to that node regeion, and then in the background I could be calculationg what the monster should do once it gets to that region... Another idea would be to only have the 6 most frequently visisted paths in my database. This way if the player enters a room, the monster knows exactly where the door is so it doesn't have to think about how to get to it. It goes to the door, then from there it will have to kick into the pathfinding script. You could also code in other things, but the general idea is rather then use graphical representation of the nodes in the 3d engine, why not just use a sql database, or a table or some other non-3d form? Would the time it took to look up this information be a ton slower then just calculating a path?