irrAI 0.50 - AI module for Irrlicht [Updated 28/11/09]
I don't know if anyone mentioned this, but in the demo (V 0.1 from MegaUpload, which I think has not been updated to the newest because thre is no field of view stuff or another NPC), the NPC does not always take the shortest route in terms of distance. I can see that its probably deciding on the smallest amount of waypoints, but this for example leads to going around the outside instead of taking the best diagonal route through the middle when traversing from one corner to the other. The waypoint system should take into account what the actual distant of each route is in units, and pick based on that.
Cheers
Cheers
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Are you saying the current megaupload link is still v0.1? For me it's the second one now... irrAIFOVExample.zip
And what you say is correct, it treats all links between waypoints as being the same distance, i pointed it out in the original post and it's something i'll of course be working on when i get a chance!
And what you say is correct, it treats all links between waypoints as being the same distance, i pointed it out in the original post and it's something i'll of course be working on when i get a chance!
Jp, i have uploaded your work to my irrlicht archive anyway, I don't want to see good projects lost, also its another access point I can give you a ftp if you want if you have any other interesting projects.. But if you go to http://irrlicht.dejaigames.com/downloads/
Then goto projects you will see jp. in there you will find your completed project.
Then goto projects you will see jp. in there you will find your completed project.
Programming Blog: http://www.uberwolf.com
Yeah I agree, JP will get to it when he gets to it.
Geez, a person drops a few crumbs, and everyone comes for the whole loaf of bread.
Anyways, great work JP, you never cease to amaze me. That would be sweet if you could switch between either weighted distance, or weighted waypoints. Either way, I would still use this. Certainly a gem of the Irrlicht community.
<offtopic>
Btw, did you make that Battleheart cover, and is it really going to be a PS3 game?
</offtopic>
Geez, a person drops a few crumbs, and everyone comes for the whole loaf of bread.
Anyways, great work JP, you never cease to amaze me. That would be sweet if you could switch between either weighted distance, or weighted waypoints. Either way, I would still use this. Certainly a gem of the Irrlicht community.
<offtopic>
Btw, did you make that Battleheart cover, and is it really going to be a PS3 game?
</offtopic>
TheQuestion = 2B || !2B
Cheers guys,
Dejai, i don't have ftp currently but i'm happy for you to mirror all my latest uploads, maybe that will save me having to upload it 3 times myself!
Halifax, i was thinking originally of either distance/user-defined weights but thought well why bother as distance is the important thing and is the only real reason for a difference in the weights but now i think of it maybe it could be good to define them yourselves as you may want to restrict the NPC from going a certain route unless they really had to maybe... like it could lead right through the enemy base or something which may be somewhere they don't want to go unless the other way it blocked!
The Battleheart banner is just a little advert thing i made up myself. I'm currently developing it for PS3 (raw OpenGL now, not Irrlicht i'm afraid) all on my own at work in my spare time (taking forever but it's going to be much better than the PC version i did last year with irrlicht!). I've got to go and talk to the people in charge of PlayStation Network and see if they think it'll be good enough to release on there as a download game, that would be really cool and would put a published game to my name which would be great for my CV. If they don't like it for PSN then i'll just stick it on the Official PS3 Mag's Demo Disc (which my department makes so we can easily slip it on ). But to be honest there's some fairly poor games on PSN so i reckon i've got a good chance of getting on there!
Dejai, i don't have ftp currently but i'm happy for you to mirror all my latest uploads, maybe that will save me having to upload it 3 times myself!
Halifax, i was thinking originally of either distance/user-defined weights but thought well why bother as distance is the important thing and is the only real reason for a difference in the weights but now i think of it maybe it could be good to define them yourselves as you may want to restrict the NPC from going a certain route unless they really had to maybe... like it could lead right through the enemy base or something which may be somewhere they don't want to go unless the other way it blocked!
The Battleheart banner is just a little advert thing i made up myself. I'm currently developing it for PS3 (raw OpenGL now, not Irrlicht i'm afraid) all on my own at work in my spare time (taking forever but it's going to be much better than the PC version i did last year with irrlicht!). I've got to go and talk to the people in charge of PlayStation Network and see if they think it'll be good enough to release on there as a download game, that would be really cool and would put a published game to my name which would be great for my CV. If they don't like it for PSN then i'll just stick it on the Official PS3 Mag's Demo Disc (which my department makes so we can easily slip it on ). But to be honest there's some fairly poor games on PSN so i reckon i've got a good chance of getting on there!
Ok, got myself into a bit of a mess here trying to seperate out things which shouldn't be in irrAI and should rather be in the application using irrAI and it's gonna take longer than i'd expected and i've not got the time right now... not sure when i'll get the time either... I might get a chance over xmas if i can get access to a PC, which is possible.
And unfortunately i don't have time to post any snippets or explanations other than what's already in the first post, so sorry about that but it will arrive eventually!
And unfortunately i don't have time to post any snippets or explanations other than what's already in the first post, so sorry about that but it will arrive eventually!
I was looking at AI recently and found this...
http://www.cgf-ai.com/docs/straatman_re ... one_ai.pdf
each way point has a line of sight, in polar coordinates, in a lookup table... might be worth a look
http://www.cgf-ai.com/docs/straatman_re ... one_ai.pdf
each way point has a line of sight, in polar coordinates, in a lookup table... might be worth a look
pushpork
Hey JP, I don't know if you were planning this, or if it's possible with how you have it setup, but I am pretty sure it won't be too much.
It would be cool if their was a class like CPathFollower, or something where you could enter a list of waypoints to be followed in order, and if you could also make an irrEdit plugin to create those paths.
That could lead to the creation of car paths like in Tony Hawk's Pro Skater: Underground, if anyone has ever played that. And also you could just add general "life" to small projects where you at least want it to look like a town or something.
Sorry if that is asking too much, but it would be cool for my Summertime project to have cars driving around the street, and people walking around the school.
EDIT:
Also JP, since it seems like you are into AI and stuff like that, I would like to talk to you about the possible implementation of a simple racing game AI. Do you have anyway we could talk in real-time like AIM, IRC, etc.?
It would be cool if their was a class like CPathFollower, or something where you could enter a list of waypoints to be followed in order, and if you could also make an irrEdit plugin to create those paths.
That could lead to the creation of car paths like in Tony Hawk's Pro Skater: Underground, if anyone has ever played that. And also you could just add general "life" to small projects where you at least want it to look like a town or something.
Sorry if that is asking too much, but it would be cool for my Summertime project to have cars driving around the street, and people walking around the school.
EDIT:
Also JP, since it seems like you are into AI and stuff like that, I would like to talk to you about the possible implementation of a simple racing game AI. Do you have anyway we could talk in real-time like AIM, IRC, etc.?
TheQuestion = 2B || !2B
JPulham, I'm on dial-up (what?? does that still exist?? Well yes.. it does unfortunately...) at my grandparents house at the moment so that pdf might be a bit much to handle right now but i'll certainly check it out when i'm back on a better connection!
Halifax, I don't really go on instant messengers anymore as i can't use them at work and have very little time online at home in the evenings or weekends. We can certainly talk over emails or pms though.
Your suggestion is a good one and basically the sort of thing which needs to be covered and was planned for. Christian wants his enemy AI to be able to patrol, which is basically the same thing cars would be doing i suppose so we will have support for this is some shape or form!
Anyone can chip in their suggestions for features to implement as this is going to a tool for your projects and we therefore need to know what things you'd like. As i've got limited time i can't promise these things to get done quickly, or in some cases at all but hopefully when the project comes to its first release it may be easy for other people to contribute to the project a bit maybe, who knows!
Halifax, I don't really go on instant messengers anymore as i can't use them at work and have very little time online at home in the evenings or weekends. We can certainly talk over emails or pms though.
Your suggestion is a good one and basically the sort of thing which needs to be covered and was planned for. Christian wants his enemy AI to be able to patrol, which is basically the same thing cars would be doing i suppose so we will have support for this is some shape or form!
Anyone can chip in their suggestions for features to implement as this is going to a tool for your projects and we therefore need to know what things you'd like. As i've got limited time i can't promise these things to get done quickly, or in some cases at all but hopefully when the project comes to its first release it may be easy for other people to contribute to the project a bit maybe, who knows!
I should be able to release the source by then yes... I've got teething problems at the moment which i will focus my time on to sort out so that i can get the source out rather than adding in new things.
Halifax and i have been talking about irrAI a bit and he made some good suggestions which has put me on the path of having some more examples of how to use irrAI. I'm working on an RPG example, already have the FPS sort of example, as above, and will probably have a little demo of how to get some cars driving around a town.
I'm trying to keep irrAI much like Irrlicht, abstracted away from anything in particular... So it will probably leave a fair bit of work to the user of irrAI but hopefully the examples will get you started and show you the basics. It has to be this way as there are lots of different uses and it can't be tightly integrated with one way of doing things otherwise it would make it fairly impossible to use for a lot of people!
I've managed to get my girlfriend to allow me more time to work on this so hopefully some more progress should be seen fairly soon. (i'm not under the thumb... honest! )
Halifax and i have been talking about irrAI a bit and he made some good suggestions which has put me on the path of having some more examples of how to use irrAI. I'm working on an RPG example, already have the FPS sort of example, as above, and will probably have a little demo of how to get some cars driving around a town.
I'm trying to keep irrAI much like Irrlicht, abstracted away from anything in particular... So it will probably leave a fair bit of work to the user of irrAI but hopefully the examples will get you started and show you the basics. It has to be this way as there are lots of different uses and it can't be tightly integrated with one way of doing things otherwise it would make it fairly impossible to use for a lot of people!
I've managed to get my girlfriend to allow me more time to work on this so hopefully some more progress should be seen fairly soon. (i'm not under the thumb... honest! )