Well, I want to create a scene with a moving camera and some animated objects using Irrlicht. What I currently can't imagine is how can I control all of these things. The camera is going to have a certain route and should move from one point to another, and then to another according to the time passed or to some triggers (it won't be controlled manually). And will follow one moving animated mesh. The mesh,it will be a snowman, will move, stop sometimes and animate. So, as I understand, I need something like three (at least) subprograms, running simultaneously: one should control camera, anoter the snowman, the third a car that will pass by and so on... I've already had an experience with scripting in Operatin Flashpoint game. There all seemed to be easy - you create some scripts, load it during the game, and they do what they should. What do I need to create a similar-looking system in Irrlicht? A scripting language, IrrLua, some functions in C++ or what?
Thanks in advance, Alexey.
Simultaneous actions
I would have to suggest you to read something related to concurrent
programming. There are two types of concurrency:
cooperative and preemptive
For beginners (but not only) game coders cooperative is better, pseudocode:
Bye
programming. There are two types of concurrency:
cooperative and preemptive
For beginners (but not only) game coders cooperative is better, pseudocode:
Code: Select all
while(1) {
job1();
job2();
job3();
render();
}
Yeah it's really not too hard. In fact a lot of it may be mostly done by using Irrlicht's built in functions like followSpineAnimators for the camera to follow a certain path, and either that or flyStraightAnimators for the 3d models in the scene.
Like Stef said you could just, each frame, move the camera a bit, move the snowman a bit, move the car a bit. That way when it runs it will move each of the things a bit each frame which will make them all move at the same time.. sorta thing...
Possibly not the best explanation though!
Like Stef said you could just, each frame, move the camera a bit, move the snowman a bit, move the car a bit. That way when it runs it will move each of the things a bit each frame which will make them all move at the same time.. sorta thing...
Possibly not the best explanation though!
I may sound alittle harsh but at the moment, I think in nearly every third thread here: Why are you all start Programming (Scripting is not programming) and do your first C++ experiences with 3d Stuff.
Sure, 3D Programming and making Games is fun and really cool, but even if you get your questions answered here, you won't have fun with gamecoding for long, as you will get stuck very fast. Befor you start a game, you should at least understand programming, basic programmlogics and know how to compile your programm, how to compile libs and how to include them into your app.
Sure, 3D Programming and making Games is fun and really cool, but even if you get your questions answered here, you won't have fun with gamecoding for long, as you will get stuck very fast. Befor you start a game, you should at least understand programming, basic programmlogics and know how to compile your programm, how to compile libs and how to include them into your app.
I started with 3D and I didnt find it a problem. I am not exactly pro but I find no need to ask silly questions like these Anyway Aleyer anything simple like this is possible with general C++ programming. Going a little further ahead it iiis recommend you incorporate a scripting langauge so your game is more well "put together" later on but with your current level it may be a headache so try doing it in C++ first than incorporate a scripting language.
I think for your purpose Irrlicht has some form of spline following technique, look at the demo for irrlichts source code, where the camera is moving, and copy that, then release the scene node you are following moments before camera so they are on the same path.
I think for your purpose Irrlicht has some form of spline following technique, look at the demo for irrlichts source code, where the camera is moving, and copy that, then release the scene node you are following moments before camera so they are on the same path.
followSpineAnimators is what I need, thanks!JP wrote:Yeah it's really not too hard. In fact a lot of it may be mostly done by using Irrlicht's built in functions like followSpineAnimators for the camera to follow a certain path, and either that or flyStraightAnimators for the 3d models in the scene.
It's not my first C++ experience! But I don't know much theory...sober wrote:Why are you all start Programming (Scripting is not programming) and do your first C++ experiences with 3d Stuff.
And in Pascal I'm one of the best 16-year-old in my city
Question is silly, but the answers helped me a lot. Asking silly questions makes me understand better what I need...BlindSide wrote:I am not exactly pro but I find no need to ask silly questions like these
I realise that you are right. I'm gonna do it in C++, certainly it's easierBlindSide wrote: Anyway Aleyer anything simple like this is possible with general C++ programming. Going a little further ahead it iiis recommend you incorporate a scripting langauge so your game is more well "put together" later on but with your current level it may be a headache so try doing it in C++ first than incorporate a scripting language.
I think it should look like this, shouldn't it?stef_ wrote:For beginners (but not only) game coders cooperative is better, pseudocode:Code: Select all
while(1) { job1(); job2(); job3(); render(); }
Code: Select all
while(device->run && elapsed_time < 3000) {
jobs();
render();
}
some_other_jobs();
while(device->run && elapsed_time < 10000 && elapsed_time > 3000) {
jobs();
render();
}
and so on...