Restart a closed Device?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Dark Logan
Posts: 11
Joined: Thu Dec 15, 2005 3:43 pm
Location: Hessen, Germany
Contact:

Restart a closed Device?

Post by Dark Logan »

Is it possible to "restart" a IrrlichtDevice that is closed?
killzone721
Posts: 19
Joined: Thu Feb 09, 2006 1:45 am

Post by killzone721 »

There is a way like if you loop it. Menaing that you make a function where you create a device and then you close it ending that function. WELL, to use that same device you have to call that same function back. the problem is it will repeat everything you have done before. There is 1 another way, declaring your device as a gloal variable. Again make function but each function can use the same device for different aspects depending on how you wanted to be. But there is a problem in there too, there is more chances for ur project to cash, i have experienced it before.

Either the solutions above or i haven't understand ur question probably :P

please tell if i didn't, maybe i could help u more if i know about it :wink:
TO ALL THE AMATEURS OUT THERE LIKE ME......

AIM HIGH AND YOU MAKE SOMETHING PRETTY DECENT TO SHOW THE WORLD

CURRENTLY WORKING ON MY COMPANY WITH ME CREW MEMBERS. MY COMPANY IS CALLED
BIG DREAMS
AND WE ARE MAKE VERSION 0.1 FPS GAME
Dark Logan
Posts: 11
Joined: Thu Dec 15, 2005 3:43 pm
Location: Hessen, Germany
Contact:

Post by Dark Logan »

What I want to do is:
-have a GameManager that creates the IrrlichtDevice, sets all parameters up and passes pointers to the GameStates

I first tried it with newly created Devices for each GameState, but the screen flickers by changing the GameState( Intro to StartMenu, StartMenu to Level, etc.) and thats not very aesthetic :wink:
Also the log isn't consistent.
Quall
Posts: 154
Joined: Mon Mar 07, 2005 10:16 pm

Post by Quall »

...Irrlicht supports multiple scenemanagers (although, time will be an issue that you have to work out yourself). Creating multiple devices would probably be a bad way to manage state. Not to mention that it would also be hell on the cpu.

You can look at general game templates to see how most games manage states. The irrWizard framework also does it well with the irrlicht engine (although, you may have to modify it because it appears to reset the states everytime they are called).
Dark Logan
Posts: 11
Joined: Thu Dec 15, 2005 3:43 pm
Location: Hessen, Germany
Contact:

Post by Dark Logan »

:D
I looked at irrWizard and their code looks like mine, so I think the error is somewhere else.

Thanks for your help Quall and killzone721.
Post Reply