Awesome thread that you just have to read!
As promised, here's that pathfinding thread.
I've uploaded a demo you can play with.
Controls:
wasd - move end of path
ijkl - move start of path
r - swap start and end
t - toggle triangle display (and their nav points)
left click - add triangle by point (hold to display)
right click - add triangle by connection (hold to display)
ctrl - hold control when releasing a mouse button to place the new triangle.
The editing isn't fantastic, but it was an after thought to be able to improve testing. Modifying the nav mesh is slow because it isn't really intended to happen often, but it works. Also, it's possible to make ridiculous connections to the mesh. I'd suggest you don't
Don't add to the inside of the mesh, overlap other parts of the mesh, or add triangles that overlap another triangle's edge point on their edge. Things will get interesting if you do
Anyways, the main purpose of this thread to to get some insight. Despite my best efforts, the pathfinding is still slow. On a large nav mesh short paths can still be created quickly, but most of those paths are direct or involve one corner. If implemented in a game multiple AI would need to process the code, and likely every frame. (The expectation is that the target point constantly moves) Is this just not achievable in AppGameKit?
Edit: Alright in retrospect, I shouldn't have posted this in the showcase section. There's way less traffic than in product chat and it would have applied just as well since this isn't really a complete product and I'm asking a question about the usage of AppGameKit itself. The download is cooler than it looks. I mean it's got
cool blue lazer things and the
endless possibilities of sandbox style things with
a mysterious retro atmosphere not to mention the
vivid love story.
That green dot wants to find the red dot sooo badly, but will the red dot accept the green one back into it's life
? Oh my gosh I just have to download this thing I can't wait!
But seriously, I'd appreciate the advice. If there's enough interest I can share some code and maybe that can take someone somewhere.