Taking some inspiration from Roguebasin, yes I'd love to say any of these mechanics are actually original and mine alone but no, they aren't, yet. It just seems a waste of time to figure out the most efficient way of doing things when people have already found them out, I've taken algorithm ideas from the web but programmed them myself apart from the ones that are included in the XNA platform.
Anyway I got a bit distracted, yes Dijkstra, he was the man who came up with a solution to finding the shortest path between two points on a graph. I've adapted this idea to produce an "AI map" which allows a monster to use the map to head towards it's goal, at the moment I have just implemented the player as a target, so the monsters can now navigate the terrain and find the player from anywhere on the map, hurrah!
At the moment though the combat system is in it's infancy and only one way so the poor little monsters don't stand a chance, boo!
Soon I'll put that right, oh yes, I will.
To keep to subject the idea of the AI map is quite powerful, one could for example make a map to flee from the player or to head towards an item and nab it or even head towards it's friends till there are enough of them that they think tackling the player is a good idea.
If I add a system where the monster is given a weighted chance of which map to follow, perhaps for a given number of turns or until another condition is met, then some quite interesting emergent behaviour could follow, that is until the player caves the poor little monster's head in.
Still to come - time/combat system...
No comments:
Post a Comment