Combining 2 wrappers into 1

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Radikalizm
Posts: 1215
Joined: Tue Jan 09, 2007 7:03 pm
Location: Leuven, Belgium

Post by Radikalizm »

wahagn wrote:
Radikalizm wrote:
wahagn wrote:One more question, is it possible to intergrate an AI engine into Ninfa 3D and can you explain it to me??
AI is a very delicate system, there is no one-solution-fits-all AI system, and you shouldn't ask people managing libraries to write features that are specific to your needs

Implementing path-finding algorithms is possible, but again there are different pathfinding algorithms suited for different situations, an algorithm suited for a dungeon wouldn't work on vast and open scenes for example

Pick up some books, read some tutorials, find out what it is that you need in your game (just saying I need AI is not enough) and write it yourself
A game framework/engine should not contain game-specific elements, only the tools to build these
OK, but do you actually think that I need an AI engine to intergrate in Ninfa or do you think that just searching some tutorials and making some algorithms would be enough, for the type of game I want to make: mini-GTA ??
That's all up to you, since you're designing the game, but I have to tell you that building the needed algos does not give you a complete AI system
Ask yourself how the player should interact with NPCs, how do the NPCs know that someone in their vicinity got shot and that they should run away, how do the cars driving around know where to go, how do they know when there's a red light, how do they know when there has been an accident or if the car ahead of them has stopped, ...

Implementing AI for such a game can be a HUGE task, since you have to take care of all the interactions you can think of, and every entity has to be aware of its environment in some way
wahagn
Posts: 186
Joined: Sat Dec 06, 2008 5:11 pm
Location: Zundert (Netherlands)

Post by wahagn »

Radikalizm wrote:
That's all up to you, since you're designing the game, but I have to tell you that building the needed algos does not give you a complete AI system
Ask yourself how the player should interact with NPCs, how do the NPCs know that someone in their vicinity got shot and that they should run away, how do the cars driving around know where to go, how do they know when there's a red light, how do they know when there has been an accident or if the car ahead of them has stopped, ...

Implementing AI for such a game can be a HUGE task, since you have to take care of all the interactions you can think of, and every entity has to be aware of its environment in some way
Actually all the examples you named I know how that kind of stuff with just Ninfa 3d code so I think I don't need an AI engine.

I will try to make a demo of the cars near traffic lights example ( just don't know a good site for free 3d models.., like a traffic light)
“Any code of your own that you haven’t looked at for six or more months might as well have been written by someone else.”
(Eagleson’s Law)
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Post by serengeor »

wahagn wrote: Actually all the examples you named I know how that kind of stuff with just Ninfa 3d code so I think I don't need an AI engine.


I will try to make a demo of the cars near traffic lights example ( just don't know a good site for free 3d models.., like a traffic light)
I'm thrilled to see it, also read what I wrote before Radikalizm wrote.
Working on game: Marrbles (Currently stopped).
Radikalizm
Posts: 1215
Joined: Tue Jan 09, 2007 7:03 pm
Location: Leuven, Belgium

Post by Radikalizm »

wahagn wrote:Actually all the examples you named I know how that kind of stuff with just Ninfa 3d code so I think I don't need an AI engine.
I'm sorry, but I highly doubt this ;)

As serengeor said, you haven't proven yourself yet, all you do is asking for code after stating that you were in 'programming heaven' (and this using freeBasic)

You have underestimated a lot of things in your development cycle, even after we warned you that it wouldn't be as easy as you pictured it, and still you aren't listening
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Post by serengeor »

And freebasic won't really make game development easier, it may look easier at the first steps, but latter on while building the framework you'll encounter mostly the same problems as using c++, and you'll still have to write thousands of lines of code, as I think I wrote more than one thousand lines of code, and I still only have a basic marble rolling on level.
Working on game: Marrbles (Currently stopped).
nespa
Posts: 167
Joined: Wed Feb 24, 2010 12:02 pm

Post by nespa »

The Irrlicht Wrappers are the easiest way to do something cool for beginners, but if somebody wants to work in a professional fashion , the Irrlicht engine with OOP in C++ is the best way. Is harder, but it is for experimented programmers.

BTW about the AI in Ninfa3D. It is possible , for example path finding or neural network.

I have no time anymore this period , but i'm thinking to do some AI for Ninfa3D.
wahagn
Posts: 186
Joined: Sat Dec 06, 2008 5:11 pm
Location: Zundert (Netherlands)

Post by wahagn »

nespa wrote:The Irrlicht Wrappers are the easiest way to do something cool for beginners, but if somebody wants to work in a professional fashion , the Irrlicht engine with OOP in C++ is the best way. Is harder, but it is for experimented programmers.
I already knew that but I prefer simplicity over powerfull features

nespa wrote:
BTW about the AI in Ninfa3D. It is possible , for example path finding or neural network.

^^ when you say that, are you talking about this release (h version) ???
“Any code of your own that you haven’t looked at for six or more months might as well have been written by someone else.”
(Eagleson’s Law)
nespa
Posts: 167
Joined: Wed Feb 24, 2010 12:02 pm

Post by nespa »

To improve this version with AI , adding new functions.
I think, this will be as Newton, as a separate thread, to save time.
Newton has the update function to read the inputs and to write the outputs time in time. I will see how to do.
Radikalizm
Posts: 1215
Joined: Tue Jan 09, 2007 7:03 pm
Location: Leuven, Belgium

Post by Radikalizm »

nespa wrote:BTW about the AI in Ninfa3D. It is possible , for example path finding or neural network.
Neural network AI systems are advised against for dynamic systems by most people I believe, because of them being relatively slow and mostly bound against a set amount of input and output neurons (and hidden neurons to some degree) making them not too flexible to work with together with the fact that they require some amount of training to get them to function correctly, depending on the complexity of the problem

They could be of use when implemented in very specific games, but I can't see how you could generalize it (unless you just provide neuron and neuron layer classes)
wahagn
Posts: 186
Joined: Sat Dec 06, 2008 5:11 pm
Location: Zundert (Netherlands)

Post by wahagn »

nespa wrote:To improve this version with AI , adding new functions.
I think, this will be as Newton, as a separate thread, to save time.
Newton has the update function to read the inputs and to write the outputs time in time. I will see how to do.
Ok, I'm glad you want to intergrate AI but isn't there a way I can help or make something usefull for it ( because I want to proof myself to this community :P since serengeor asked me to do so) or do you doubt that I have the programming skills ??
“Any code of your own that you haven’t looked at for six or more months might as well have been written by someone else.”
(Eagleson’s Law)
nespa
Posts: 167
Joined: Wed Feb 24, 2010 12:02 pm

Post by nespa »

no problem, wahagn !


About neural network AI, I think we suppose each of the entities must have a brain with his (its:)) neural network. The training could be done before its using in game, each brain class with its particular training depending of the our goals. Or, can be implemented as 2 parts : the 1st part as a trained brain for instinctual reactions and the 2nd part for learning in the game.
Radikalizm
Posts: 1215
Joined: Tue Jan 09, 2007 7:03 pm
Location: Leuven, Belgium

Post by Radikalizm »

nespa wrote:About neural network AI, I think we suppose each of the entities must have a brain with his (its:)) neural network. The training could be done before its using in game, each brain class with its particular training depending of the our goals. Or, can be implemented as 2 parts : the 1st part as a trained brain for instinctual reactions and the 2nd part for learning in the game.
Well yes that would be a way to implement game-specific AI using a NN, but I do not believe you'd get better performance than with using classic game AI, neural nets just arent fast enough in solving these complex problems

Also, you'd have to go through debugging hell because it can get hard to define expected behaviour in neural nets which have the ability to adjust to player-made decisions
Any unwanted behaviour would become hard to 'hammer out'
wahagn
Posts: 186
Joined: Sat Dec 06, 2008 5:11 pm
Location: Zundert (Netherlands)

Post by wahagn »

Since I want to help a bit with the AI (if I can) I decided to take a look at the code of IrrAI but it's c++ and my c++ is very bad so I don't think that this can help me but nespa might want to take a look at the source...

Now I'm searching for other ways learn more about AI and AI with FreeBASIC
“Any code of your own that you haven’t looked at for six or more months might as well have been written by someone else.”
(Eagleson’s Law)
nespa
Posts: 167
Joined: Wed Feb 24, 2010 12:02 pm

Post by nespa »

a trained neural network is very fast in forward propagation. I told You, the training (with backward propagation, slower) is done before, depends of our goals. It is like we have some value stored in a table and depends of the inputs , we have very fast the outputs. If all of them are running in a separate thread, they don't consume the time in the main loop.
I think, is necessary a kind of asynchronus thread to avoid the waiting time.
The number of inputs is done by the number of folowed parameters and the number of outputs is smaller, just to react.
Radikalizm
Posts: 1215
Joined: Tue Jan 09, 2007 7:03 pm
Location: Leuven, Belgium

Post by Radikalizm »

wahagn wrote:Since I want to help a bit with the AI (if I can) I decided to take a look at the code of IrrAI but it's c++ and my c++ is very bad so I don't think that this can help me but nespa might want to take a look at the source...

Now I'm searching for other ways learn more about AI and AI with FreeBASIC
Look, wahagn, I know I've said this a lot, but you should really just take the big step and learn C++, you just keep on avoiding it now and you always try to work around everything while giving up performance and stability just so you can use an easy language

No offense to the people maintaining various wrappers based on variants of BASIC, because I can imagine it taking a lot of work to maintain these, but by design BASIC just is not a language meant for handling these types of systems
BASIC was designed to guide people into programming, functioning as a step before advanced high level languages (probably C at the time) so people could get familiar with certain aspects (hence the name BASIC: Beginners All-purpose Symbolic Instruction Code)

Knowing C++ also gives you the benefit of basically being able to switch over to any other language you want afterwards, it gives you great performance all-round (which is the reason why most developers of real-time systems prefer it), and you'll find that there will be an enormous amount of libraries available to you

Just reconsider it


EDIT:
a trained neural network is very fast in forward propagation. I told You, the training (with backward propagation, slower) is done before, depends of our goals. It is like we have some value stored in a table and depends of the inputs , we have very fast the outputs. If all of them are running in a separate thread, they don't consume the time in the main loop.
I think, is necessary a kind of asynchronus thread to avoid the waiting time.
The number of inputs is done by the number of folowed parameters and the number of outputs is smaller, just to react.
Running your neural net in an async thread will keep the rest of your system running smooth, but the AI will seem unresponsive if you don't set it up to split its tasks up to different detail levels (which in itself can be a pain too)
You will also get the problem of data synchronization with this implementation

I'm not saying that it's impossible to implement an ANN in a game (or any other dynamic system for that matter), this has been done before, but I do not see the benefit over classical AI implementations at this time

Neural nets are really cool and all, and it's fun to create a certain behaviour out of a set of simple neurons, but at this time I believe it will just be more overhead than benefit
Last edited by Radikalizm on Wed Mar 02, 2011 10:48 pm, edited 1 time in total.
Post Reply