Artificial Stupidity
Although I understand the logic behind A* how would you make it so a monster uses it but it still seems to be trying to find the path so it just doesn't go directly to the right spot but it simulates some ignorance?
Mostly theorical question no need for code only explanations
------ XYE - A new edition of the classic Kye
Let him walk the right path, but make him pause now and then facing another direction while playing a 'looking around'-animation, continue walking the right path.
A -> B (face wrong way + play 'looking around'-animation) -> C
To make it even more stupid, randomly pick a spot away from the right route and put that spot between the current and next point you need to walk to.
A -> wrong (play 'looking around'-animation) -> B
A -> B (face wrong way + play 'looking around'-animation) -> C
To make it even more stupid, randomly pick a spot away from the right route and put that spot between the current and next point you need to walk to.
A -> wrong (play 'looking around'-animation) -> B
Hi.
You can make 'checkpoints' on your map (f.e where corridors are or some similar 'important' points on your map), then make wander monsters around these points, checking points where something is 'wrong', points that he can see, (A to B, then B to C..) etc. This can be well done if monster see player entering a room or corridor, then monster move to that point, then if still see player, try to catch him and attack, and if don't see him (because player went deeper in labyrinth or similar) monster try to 'guess' where player has gone orienting himself by 'checkpoints'.
just some thougths, hope I helped
You can make 'checkpoints' on your map (f.e where corridors are or some similar 'important' points on your map), then make wander monsters around these points, checking points where something is 'wrong', points that he can see, (A to B, then B to C..) etc. This can be well done if monster see player entering a room or corridor, then monster move to that point, then if still see player, try to catch him and attack, and if don't see him (because player went deeper in labyrinth or similar) monster try to 'guess' where player has gone orienting himself by 'checkpoints'.
just some thougths, hope I helped
From this A* article:
I'm trying to implement something like this now; I have a set of waypoints that I use for my A* nodes, and every character has a list of nodes he's visited. When running the A*, the character will visit the "unknown" nodes first, hopefully giving the effect of learning the map as the game is being played.
Hope that helps.
Quote: 5. Handling Unexplored Areas: Have you ever played a PC game where the computer always knows exactly what path to take, even though the map hasn't been explored yet? Depending upon the game, pathfinding that is too good can be unrealistic. Fortunately, this is a problem that is can be handled fairly easily.
The answer is to create a separate "knownWalkability" array for each of the various players and computer opponents (each player, not each unit -- that would require a lot more computer memory). Each array would contain information about the areas that the player has explored, with the rest of the map assumed to be walkable until proven otherwise. Using this approach, units will wander down dead ends and make similar wrong choices until they have learned their way around. Once the map is explored, however, pathfinding would work normally.
I'm trying to implement something like this now; I have a set of waypoints that I use for my A* nodes, and every character has a list of nodes he's visited. When running the A*, the character will visit the "unknown" nodes first, hopefully giving the effect of learning the map as the game is being played.
Hope that helps.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement