In my dissertation project at Uni i used (a java based version of) irrlicht to do a simple FPS framework to implement AI agents in and i made them have a limited field of view which was impeded by the walls of the environment and they would weigh their odds of beating an opponent when they spotted them and flee if they didn't fancy their chances or make a fight, aim nicely, collect resources by searching the environment, have different skill levels, turn to find enemies if they were hit by one they couldn't see etc.christianclavet wrote:Hi.
JP: I've checked the IRRwizard. The last release seem to be dated june. And seem inactive right now. But there seem to be some basic AI in there. They are using "MicroPather" for path tracing. I could try to study the code and perhaps do something.
I was able to compile the full framework and try it. The ennemy seem to be invicible, by seeing us(the player) from everywhere (they see thru everything) and their bullets goes thru wall. So not sure they have implemented the AI for "seeing" and a basic collision for their bullet. I've also tried it in DirectX and the AI code seem disabled.
I was able to make one flee and that worked well.(So path tracing seem to work in there) So learning the framework code is a good idea. But it's sure I cannot use the framework as it is now (That was the author intend in the beginning). I need IRRScenes in there (They are using meshes directly) and would also need to use IRRKlang.
Perhaps with deep modifications. It's well structured. Could have some benefit of using it in the long term.
The AI, I would like for ennemy. Is that the ennemy character is seeing (about 45-50 degree wide) and when the chararter will be really visible (It will not see it if the player is behind a wall). The attack state will start. This is already there but the "see" code is not working. (see thru walls).
Also if the player is firing; the ennemy could heard the sound and will go and search the source of it (Then attack when it see the player). So it's basicaly a path trace from the ennemy to the source of the sound.
As i say, that's all in java so not all that useful for you but if you like i'll certainly give you a hand with any AI questions you have and if you wanted to see the source code then i could offer that up to you. Maybe i could even help out with coding some of it if you wanted the help, i understand if you want to do the whole project alone though of course!