3d Pacman AI Problem
Posted: Tue May 23, 2006 10:04 pm
Greetings,
I'm working on a project just to learn more about game design in general, but I'm having a couple problems with the scripting portions. My game is basically a 3d Pacman game (yes, i know its been done before) that basically sets the original Pacman game in 3d, with similar AI.
So as far as the AI goes, I want my game to follow the basic logic that is used in the original pacman game. Such as defined below:
-There are four ghosts that can kill the player by colliding with Pacman.
-Ghosts travel in straight paths, and change direction each time they hit a wall.
-They are able to find their way through the turns of the level to get to Pacman.
Now, my question is, how would I go about implementing this into my level as far as scripting it goes?
I've thought about setting ScriptPoints throughout the intersections of the level and make a pawns somehow "choose" the next point based on were Pacman is currently in the level (maybe put some triggers with an updatePosition attribute associated with them so the ghosts can know where Pacman has been last). But I'm having trouble with this since the scripting language used within RF (simkin I think it's called) doesn't support any data structures or while/for loops like I am familiar with in other programming languages. My original plan was going to use the A* AI strategy (or rather, having the ghosts choose the shortest path to get to Pacman's current position).
Does anything out there have a better idea on how to implement the AI for the ghosts? Thanks, hope to hear back from you guys soon.
I'm working on a project just to learn more about game design in general, but I'm having a couple problems with the scripting portions. My game is basically a 3d Pacman game (yes, i know its been done before) that basically sets the original Pacman game in 3d, with similar AI.
So as far as the AI goes, I want my game to follow the basic logic that is used in the original pacman game. Such as defined below:
-There are four ghosts that can kill the player by colliding with Pacman.
-Ghosts travel in straight paths, and change direction each time they hit a wall.
-They are able to find their way through the turns of the level to get to Pacman.
Now, my question is, how would I go about implementing this into my level as far as scripting it goes?
I've thought about setting ScriptPoints throughout the intersections of the level and make a pawns somehow "choose" the next point based on were Pacman is currently in the level (maybe put some triggers with an updatePosition attribute associated with them so the ghosts can know where Pacman has been last). But I'm having trouble with this since the scripting language used within RF (simkin I think it's called) doesn't support any data structures or while/for loops like I am familiar with in other programming languages. My original plan was going to use the A* AI strategy (or rather, having the ghosts choose the shortest path to get to Pacman's current position).
Does anything out there have a better idea on how to implement the AI for the ghosts? Thanks, hope to hear back from you guys soon.