241
Creative Projects / Re: Lunkheads Zero - Work In Progress - Suggestions Wanted
« on: February 08, 2014, 12:26:00 am »A* just operates on nodes, which can be anything at all (that's why it even works for cool things like GOAP). Did you discover this on your own?! Pre-calculating goes a long way towards speeding everything up...
That was the idea, yeah. I might have had some distant inspiration on the precalculated map thing from Wolfenstein 3D of all games. In that, actors would move toward you if they were in the same room, but it also used the rooms as a sound map. If there was an open door, any sound you made could be heard in that adjacent room, and actors would path towards the door because they couldn't reliably path around the walls.
But really, this precalculation idea came to me as the only viable option. Having every actor do a proper sweep of the map every time they wanted to move would have been too much processing. And I felt like it would be a good project when I had the idea.
...the AI will naturally path through teleporters if it will get them somewhere quicker, because stepping through one to another point on the map is just another move.
Funny you'd mention that, I was just thinking about teleporters. And how they might reveal a critical weakness in my movement process.
I haven't worked out the cost function of movement, but I'm not sure I'll really need to. My engine doesn't have a concept of "speed" so all actions cycle at the rate of input (the player cycles one action, everything else processes one cycle, etc.). Functionally, there's only three types of movement in this engine: walking, falling, and flying. Jumping is just a kind of falling, after all. The pathing system considers every action equal. Walking onto a ladder from a platform costs the same movement (one turn for one cell) as jumping (one turn for a few cells), and 99% of the time jumping/falling will be faster anyway so it all works out.
I do foresee some issues like making sure actors don't take falling paths that will kill them, and making sure the precalculator doesn't draw a million jumping paths so actors bunnyhop everywhere (at least making sure transitions never connect to the same block). Right now my biggest concern is getting actors to reliably understand what block they're in (especially if blocks overlap), and recognizing whether or not a movement was successful (since deciding what to do and actually doing it are separate processes).
What IDE do you use?
Visual Studio 2010. I used to use SharpDevelop, but I have a real job with C# now so I just use the same tools I have at the office (or the free versions anyway).


