My first time trying this engine i want to see if i can imitate artifcial life, not sure if i can do this with the GE. Here is my question: can i make some objects that will school when together then scatter if a predator comes around? If so do i need a special A I or will logic bricks be enough? if i can do this a little detail please
Learn all that you can about python. Programming is power.
One question; For how long have you been using the BGE?
Also if you’re a newcomer to programming and such this is no easy task, however this phrase “imitate artificial life” makes me think you’ve pondered about these things for quite a while.
Know that it is quite possible with python, but I don’t know if it is viable within the BGE.
very preceptive John, i have pondered it quite awhile. I know C++ but teaching myself was slow considering what i want to do so i decided to try BGE .To answer your question i have been using BGE about two days but if i can get it to do what i want it is worth it to learn but i really don’t know anything about python ( was trying to avoid coding, not very good at it.) hoping there are some scripts already out there, I just don’t want to spend too much time with the game engine only to learn it is not possible
Flocking technology or more accurately “software” is definitely possible through python, so simulating birds and sheep crowds should not be too much. However I am first and foremost an artist, so perhaps someone else might give you a better answer.
As for using only logicbricks, definitely possible, however I cannot recommend it.
This is because logicbricks and low-poly meshes start to lose their upside as they grow in complexity.
To scatter the flock press and hold space, releasing it lets the boids return to the centre.
Also, because boids is vector heavy I decided to use 2.5 because game object velocity and position are given as vector types. So you’re going to need to use a 2.5, the one I used is build 23438 win 32. This can be done in 2.49 you would just need to convert positions and velocities into vector instances.
Boids is actually pretty simple, there are 3 base rules.
A boid will move to the centre of the flock
A boid will move at the average flock velocity (speed + direction)
A boid will move away from other boids if its to close.
The scattering was done by making the boid move away from the centre of the flock. I also added some bounds in so the flock stays on screen.
Andrew, what i really wanted to make is an aquarium the fish (more sim than game) will have eyes, mouth, gills, fins all rigged they will be able to eat and scatter when a predator comes comes next to them. there movements should be very realistic. So this will be hard to write i think. i was trying to do it in C++. Python seems to be a bit easier to understand but either way it will be complicated if you make headway let me know
@digiman; I’m not sure if you looked at my file (I don’t blame you if you didn’t with having to download a whole build to see it) but I think boids is very well suited to what you are trying to achieve. Have a look at this
It’s a great start Andrew, you did this in a short time? I was learning C++ becuase people on forums told me python could not handle what i wanted after skimming over python a bit I think it can but i am no expert. I think i might take a deeper look at python
what i need is a script that will do what your boids are doing plus control the armature with incredible detail like wagging back and forth eyes moving. mouth and gills moving. if i can get that in the BGE enviroment what i want might be doable
take a look at the links the first one is a blender boids (birds) as a predator comes into the picture
the second is a spider moving in realtime with incedible detail. Thats’ what i am talking about
Also that’s what I meant by readability, you sort of sense the code, furthermore it’s alot easier to understand other peoples python code as opposed to other peoples c/c++ code.
That being said I think there is only so and so much you can code on the fly when it comes to making AI brains.
In all games that I’ve played to date, there have only been dum AI’s.
In all games that I’ve played the AI cannot trick you.
In all games that I’ve played to date AIs cannot improve.
In all games that I’ve played to date AIs cannot communicate properly.
The list goes on but the main thing is: The AI is perfectly outlined. It cannot do human level randomness, although these are quite possible to program, however since you want to program a fish, I guess my points are invalid.
PS: English is my 3rd language so just give me a holler if I need to clarify something.
Artificial life (commonly Alife or alife) is a field of study and an associated art form which examine systems related to life, its processes, and its evolution through simulations using computer models, robotics, and biochemistry. There are three main kinds of alife, named for their approaches: soft, from software; hard, from hardware; and wet, from biochemistry. Artificial life imitates traditional biology by trying to recreate biological phenomena. The term “artificial life” is often used to specifically refer to soft alife.Artificial life studies the logic of living systems in artificial environments. The goal is to study the phenomena of living systems in order to come to an understanding of the complex information processing that defines such systems.
Also sometimes included in the umbrella term Artificial Life are agent based systems which are used to study the emergent properties of societies of agents.