Retro Lord Posted March 11, 2015 Share Posted March 11, 2015 I would love too make a maze game someday in the spirit of Wizard of Wor. I have 1 theory on how the A.I could be done. 1. Have a counter for each of the corners/openings so the monsters can wander about. Like: If player1x=80 && player1y=50 then a=(rand&1) if a=0 then player1x=player1x+1 if a=1 then player1y=player1y+1 And have a bunch of those. The downside would be that it would be pretty bloated, especially if there is more then 1 maze...And it would be impossible to do with a maze generator which in my book would be the ultimate thing. Any other theories out there on how to do maze A.I? Quote Link to comment Share on other sites More sharing options...
ZackAttack Posted March 12, 2015 Share Posted March 12, 2015 I'd start with a basic finite state machine (FSM) that has 2 states, traveling and navigate. In the traveling state the AI agent would continue to move in the same direction until it aligns with the PF, at which time it would transition to the navigate state. In the navigate state I would map the A.I. agent's location to the PF pixel/block that it is currently aligned with and then look at the surrounding pixels (top, bottom, left, right) to determine which directions it can go without colliding with a wall. Once a new course is chosen it would transition back into the traveling state and start the process all over again. The selection of available directions could be made at random or use an algorithm to chase/flee the player. Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted March 12, 2015 Share Posted March 12, 2015 Semi-related links:randomterrain.com/atari-2600-memories-batari-basic-commands.html#maze_32x23 randomterrain.com/atari-2600-memories-batari-basic-commands.html#maze_32x12 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.