1. Already implemented.
2. Planned to be implemented.
3. Not planned to be implemented.
If I recall correctly, JP wants to keep this library abstract just like Irrlicht isn't a game engine, but just a graphics engine. Some time ago I think I suggested two solutions to JP.aussiedude wrote:So JP, whats your thoughts on putting Race AI and Swarm AI in this? I've started the Swarm AI, it's about 40% done now. When I've got a working example I'll post the code or something.
Problem is I can only code these as a generic all-purpose type thing, I don't know much about the irrlicht engine to take advantage of it. But if make the maths of them you could modify it to take advantage of irrlichts engine right?
My line of thought is that AI is about logic and decisions, so this Race AI should be based around the idea of creating a 'driver' to make decisions on how to drive the car. Now in real life, a driver looks at the road, the cars around him, the corners ahead etc, and based on that information and the abilities of the car he makes decisions. He might decide to speed up, slow down, turn hard left, soft right, handbrake etc etc etc.... he makes a decision on what to instruct the car to do. What ACTUALLY happens though is based entirely on physics.Halifax wrote:If I recall correctly, JP wants to keep this library abstract just like Irrlicht isn't a game engine, but just a graphics engine. Some time ago I think I suggested two solutions to JP.aussiedude wrote:So JP, whats your thoughts on putting Race AI and Swarm AI in this? I've started the Swarm AI, it's about 40% done now. When I've got a working example I'll post the code or something.
Problem is I can only code these as a generic all-purpose type thing, I don't know much about the irrlicht engine to take advantage of it. But if make the maths of them you could modify it to take advantage of irrlichts engine right?
Either way, what solution were you looking at implementing for racing game AI?


Well maybe I can make this even more generic and make it a vehicle driving AI library. No race track or anything, just driving of vehicles of any form to a destination set by the user. Would that be more useful? I ask because it's most likely that I will be using the code I write myself when i make a game so I want it to be as useful as possible to everyone AND me too.Halifax is right, i do want to keep it abstracted away from specific AI types, but i think specific AI type supports can probably be added in, or at least included as an example/tutorial showing how it can be used or as a base project to start from.
As i've said i want to get the broad basics implemented for Christian's First King project first so i'll be focusing on getting the things necessary for an FPS first and then when that's done to a certain degree i can start branching out on other things.
But yes, if you (or anyone) implements some AI stuff, in a generic or irrlicht way then if i like it and think it should be included then, when the time comes, i'll stick it in.
does that mean that you're not using any of irrlichts built-in types (e.g. vectors)? if so, you'll be facing extra work.aussiedude wrote:Problem is I can only code these as a generic all-purpose type thing, I don't know much about the irrlicht engine to take advantage of it. But if make the maths of them you could modify it to take advantage of irrlichts engine right?
Well it's not especially for irrlicht, I want it to be more or less like my miNav library and be plug&play into any game/graphics engine. It will mean extra work I know but that's ok for me. My theory is that I'll do more or less what Halifax suggested. I'll make a plain version for me and after that I'll try and make a custom Irrlicht version which uses built-in types and stuff.morris wrote:aussiedude, that's one cool analysis of how a driver's AI should workhope you're able to implement that in reality.
does that mean that you're not using any of irrlichts built-in types (e.g. vectors)? if so, you'll be facing extra work.aussiedude wrote:Problem is I can only code these as a generic all-purpose type thing, I don't know much about the irrlicht engine to take advantage of it. But if make the maths of them you could modify it to take advantage of irrlichts engine right?
if it's a library especially for irrlicht, i think you should also use the built-in types to make it feel more "irrlike" and to save you a _lot_ of work.
Just curious, but have you also taken into account the effect of the other race car drivers on the track. It would be cool if it would be possible for an AI node to recognize other AI nodes, etc.aussiedude wrote:Well it's not especially for irrlicht, I want it to be more or less like my miNav library and be plug&play into any game/graphics engine. It will mean extra work I know but that's ok for me. My theory is that I'll do more or less what Halifax suggested. I'll make a plain version for me and after that I'll try and make a custom Irrlicht version which uses built-in types and stuff.morris wrote:aussiedude, that's one cool analysis of how a driver's AI should workhope you're able to implement that in reality.
does that mean that you're not using any of irrlichts built-in types (e.g. vectors)? if so, you'll be facing extra work.aussiedude wrote:Problem is I can only code these as a generic all-purpose type thing, I don't know much about the irrlicht engine to take advantage of it. But if make the maths of them you could modify it to take advantage of irrlichts engine right?
if it's a library especially for irrlicht, i think you should also use the built-in types to make it feel more "irrlike" and to save you a _lot_ of work.
Thanks for the compliment on my analysis. To be honest I've been planning and writing down notes on how to do this all week at work. So I've had a lot of time to think about how to approach this. It's been good though, I feel the time spent planning will payoff in the end more than just jumping into this.
I don't think those figures are very realistic. Having a smooth FPS with only 30-40, even 60 on a good PC is like saying I have a very effective and strong engine but it's too heavy to make the car move.JP wrote:Performance & The Code
As for the number of NPCs you can have running around at one time the current fps example can handle 30 quite easily, without dropping below 60fps (vsync on) and only really starts to struggle when you add up to 40 when the frame rate drops down to between 50 and 60fps.
I'm sure it wouldn't be too hard for someone to gather the jist of irrAI through the demos.MasterGod wrote:I believe performance is one if not The first thing we should take care of when creating a game. Because AI is only a part of a much larger picture the performance of it should be accordingly and so,I don't think those figures are very realistic. Having a smooth FPS with only 30-40, even 60 on a good PC is like saying I have a very effective and strong engine but it's too heavy to make the car move.JP wrote:Performance & The Code
As for the number of NPCs you can have running around at one time the current fps example can handle 30 quite easily, without dropping below 60fps (vsync on) and only really starts to struggle when you add up to 40 when the frame rate drops down to between 50 and 60fps.
I understand it will take time to optimize it but I'm willing to help with reports.
JP, as I don't have Dev-Cpp and I don't want to install it, could you provide me an exe file, .zip with some demos that I will run and test to provide back with report on performance with different PCs? - I'll be glad to do it if it helps.
P.S
Do you have a doxygen-made .chm file of the lib to share with us?
Performance is certainly important and as you say you can't have the AI hogging all the CPU time whilst the graphics and physics suffer. But i'm developing this library primarily for Christan and the result of my work with him will be that there will be a library that everyone else can use too. Therefore my priority is to get the library working with the features Christian needs. Obviously he's going to need performance but his project is a long one and so i want to get the basic framework together first and then i can optimise that for him.MasterGod wrote: JP, as I don't have Dev-Cpp and I don't want to install it, could you provide me an exe file, .zip with some demos that I will run and test to provide back with report on performance with different PCs? - I'll be glad to do it if it helps.
P.S
Do you have a doxygen-made .chm file of the lib to share with us?