Cool, I looked at your source and generally the idea is the same, obviously not quite the same implementation, but it has the same features like open/closed list (or variable in the object itself in your case) and checking to see if we have already found the node and if we do have a lower cost to that node then making ourself the parent node.
One big difference is that as I say in the description I have an object on each grid square that stores it's cost (*1 for ver/hoz movement and *sqrt(2) for diagonal) and it stores object references to each of the neighbouring nodes whereas yours just relies on counting grid positions to find it's neighbouring nodes..
As for the text, I made each grid tile 32x32 pixels so I had to make the font height 9px to fit it in, I guess I could have made the grid tiles a bit bigger instead...
Anyway, all will be revealed when I release the source code soon, I just need to neaten things up a bit and add a couple extra comments :) (Oh yeah, yours was the first source code I've read in the gallery that has comments in it!)
Cool! So did you just write that whole scripting engine thing yourself? Could you write it to read XML files instead of plain text files if you wanted?
It seems to me that your method for seeing, as far as zombies are concerned, is that you just test various points in the world (disregarding non map objects) is to test a few points along the line of sight between the zombie and the person using the solid() function in the world, is that correct?
Awesome game!!!
I've been designing a top down game as well for a while now, I've had a brief look at your code, but can you tell me how you do the collision detection (and how if you hold space when moving into someone you actually shove them out of the way) and in the beginning when you follow the doctor to the lift I'm guessing that's just a series of way points he's following? What is the part of code that controls the doctors movement?
My collision detection at the moment relies on creating correctly sized rectangles in the direction of desired travel to check if there is something in the way in that particular direction.
2011/11/29
A* Waypoint Pathfining
2011/11/27
Factory
2011/9/29
A* Pathfinding
2011/9/14
Nightmare: Emergence
2011/9/8
A* Pathfinding
2011/9/8
A* Pathfinding
2011/9/8
A* Pathfinding
2011/8/24
Nightmare: Emergence
2011/8/22
Nightmare: Emergence