irrAI 0.50 - AI module for Irrlicht [Updated 28/11/09]
@Ico: Good suggestions there! It would certainly be easier to make teams and then assign whether that team is friendly to another team or not.
@MasterGod: As Ico says try and make the project yourself, shouldn't be too hard, if i get some time i'll try and include a VC version in the future but it will add extra work for more throughout the whole project!
@MasterGod: As Ico says try and make the project yourself, shouldn't be too hard, if i get some time i'll try and include a VC version in the future but it will add extra work for more throughout the whole project!
Maybe a bit late, but you can download FireFTP, an FTP client built into FireFox from the Mozilla AddOns page. Its fairly convenient to use since you don't have to open up a seperate app.JP wrote: I guess i'll have to get some ftp software installed then.. Any suggestions?
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
Think I've found a bug - I know I made some mistake somewhere too but it shouldn't happen anyway:
I created a waypoint as root, added 2 children waypoints and set their IDs to 0 and 1.
Then I added a NPC starting at node 0 - while creating the NPC the program crashes.
The AI manager was able to read both waypoints out of the scene and each one has the other node as it's neighbour set. Now I get "NPC (0) Path from 0 to 0" which causes a crash inside NPC::getPath() within last iteration as it calls iter-- on the first (and only) waypoint inside the vector (_SCL_SECURE_VALIDATE_RANGE fails).
pseudo code:
I created a waypoint as root, added 2 children waypoints and set their IDs to 0 and 1.
Then I added a NPC starting at node 0 - while creating the NPC the program crashes.
The AI manager was able to read both waypoints out of the scene and each one has the other node as it's neighbour set. Now I get "NPC (0) Path from 0 to 0" which causes a crash inside NPC::getPath() within last iteration as it calls iter-- on the first (and only) waypoint inside the vector (_SCL_SECURE_VALIDATE_RANGE fails).
pseudo code:
Code: Select all
createaimanager();
wpr = addscenenode();
wpr->setname("WaypointRoot");
wp1 = addscenenode(wpr)
wp2 = addscenenode(wpr)
wp1->addneighbour(wp2)
wp2->addneighbour(wp1)
createwaypoints();
addnpc();
Hello Jp,
I was watching some videos on AI in large scale project games and I noticed that you were seeming to have problems with 40+ NPCs within your game. I have a simple solution for this problem, Its up to you completely if you want to implement it or not but, the amount of processing power in which the NPC uses should be directly influenced by the distance in which the player is from that entity.
Within large scale games such as Halo, they use this AI illusion if you will to create the feel that all the Npcs are running at full speed. Yet what is infact happening is the npcs in the background are getting less of the processor, exactly like rendering. So in the distance all the enemies are doing is shooting and moving from side to side, yet the enemies in the foreground are at 100% capacity.
Yet, the illusion can be further portrait by having the distance dynamic or relative to the position of all the opposing entities in relation to the player. By this I mean, if all the npcs are 300 meters away, the one closest to the player still takes up the larger processor, so that the Ai distances are not static but proportional to where the enemy is in relation to other enemies and the player.
Yet keeping in mind if a npc is 300 meters away, its probably still going to have a reduced processing need, so possibly a variety of functions to determine the level or preference of processor in which a enemy should take up. For example a boss should always have preference over its minions when it comes to processing power no matter this distance, within reason of course.
I am obviously not asking you to do this, it would be quite / very hard to implement, but I hope that this may have provided something interesting to read and to think about in upcoming releases. Keep up the great work JP.
I was watching some videos on AI in large scale project games and I noticed that you were seeming to have problems with 40+ NPCs within your game. I have a simple solution for this problem, Its up to you completely if you want to implement it or not but, the amount of processing power in which the NPC uses should be directly influenced by the distance in which the player is from that entity.
Within large scale games such as Halo, they use this AI illusion if you will to create the feel that all the Npcs are running at full speed. Yet what is infact happening is the npcs in the background are getting less of the processor, exactly like rendering. So in the distance all the enemies are doing is shooting and moving from side to side, yet the enemies in the foreground are at 100% capacity.
Yet, the illusion can be further portrait by having the distance dynamic or relative to the position of all the opposing entities in relation to the player. By this I mean, if all the npcs are 300 meters away, the one closest to the player still takes up the larger processor, so that the Ai distances are not static but proportional to where the enemy is in relation to other enemies and the player.
Yet keeping in mind if a npc is 300 meters away, its probably still going to have a reduced processing need, so possibly a variety of functions to determine the level or preference of processor in which a enemy should take up. For example a boss should always have preference over its minions when it comes to processing power no matter this distance, within reason of course.
I am obviously not asking you to do this, it would be quite / very hard to implement, but I hope that this may have provided something interesting to read and to think about in upcoming releases. Keep up the great work JP.
Programming Blog: http://www.uberwolf.com
It fully depends on the type of your game etc.
In a FPS distance based calculations might be useful but in a RTS/simulation you can't do that.
Just to name an example having a more or less bad implementation:
X³ uses accurate AI/simulation only in the area the player is in. Other areas are less accurate as you can't see them. That works very well until you use computer controlled ships to aid you. If you're in the same area as your AI ship it might happen that it crashes into other objects like ships, asteroids, etc. If you aren't there, such things will never happen which is something you can't notice without looking close but it's also more or less annoying as there are also other factors - not just collisions but fighting/attack/defense/etc. too.
In a FPS distance based calculations might be useful but in a RTS/simulation you can't do that.
Just to name an example having a more or less bad implementation:
X³ uses accurate AI/simulation only in the area the player is in. Other areas are less accurate as you can't see them. That works very well until you use computer controlled ships to aid you. If you're in the same area as your AI ship it might happen that it crashes into other objects like ships, asteroids, etc. If you aren't there, such things will never happen which is something you can't notice without looking close but it's also more or less annoying as there are also other factors - not just collisions but fighting/attack/defense/etc. too.
Ico: Is your root waypoint an actual waypoint? It should be an empty scene node as the root, that could cause problems, maybe. What i'll do, probably before the next release, is improve the waypoint loading because at the moment it requires you to have a specific root waypoint etc, just to make it easy for my code to find them all, but this isn't really necessary and was just me being lazy to get it working initially. So possibly the new version will solve the problem, if you can send me the test scene you made then i can look into it further.
Dejai: Thanks for the suggestion, i think some way of scaling how long an AI Entity is allowed to use the processor would definetly be something useful to include and could improve performance if you've got lots of NPCs spread out so i'll keep this idea in mind. But as Ico says, maybe it's not always a good thing but it could be turned on or off by the user of the library depending on whether it suits their game or not.
Dejai: Thanks for the suggestion, i think some way of scaling how long an AI Entity is allowed to use the processor would definetly be something useful to include and could improve performance if you've got lots of NPCs spread out so i'll keep this idea in mind. But as Ico says, maybe it's not always a good thing but it could be turned on or off by the user of the library depending on whether it suits their game or not.
-
- Posts: 20
- Joined: Mon Feb 26, 2007 8:45 am
- Contact:
@JP: G'day JP, I just gots a PM from christianclavet suggesting basically that maybe I should join this project. I just posted an AI pathfinding library here called miNav. It wasn't designed to be an ongoing project but I left it open to be updated if people requested.
Technical Specs: My library is a Generic AI pathfinding library that uses preprocessed solutions generated with the Dijkstra algorithm. It's a Map and Node based system that allows the user to create maps, add nodes, connect nodes and then calculate all pathfinding solutions for future use.
If you think that any of my code can be of use to you or if you want any help coding stuff just let me know. My coding skills are 'ok', not great. But if you need some coding done and I think I can handle it, then I'll do it... well I'll do my best.
Technical Specs: My library is a Generic AI pathfinding library that uses preprocessed solutions generated with the Dijkstra algorithm. It's a Map and Node based system that allows the user to create maps, add nodes, connect nodes and then calculate all pathfinding solutions for future use.
If you think that any of my code can be of use to you or if you want any help coding stuff just let me know. My coding skills are 'ok', not great. But if you need some coding done and I think I can handle it, then I'll do it... well I'll do my best.
I'm Australian... so be nice to me!
miNav Pathfinding Library
miNav Pathfinding Library
Pathfinding works, field of vision works but doesn't check for obstacles such as walls so the agents can see through objects but will only see things that are actually in the field of vision.
That's about it for now i think.
Progress on this will be very slow and it's not really a ready to use library at the moment i wouldn't say.
That's about it for now i think.
Progress on this will be very slow and it's not really a ready to use library at the moment i wouldn't say.