Game State Launch.

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
digoxy
Posts: 51
Joined: Wed Feb 17, 2010 3:55 pm
Location: Currently Germany.

Game State Launch.

Post by digoxy »

In reference to this thread,
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=35539

I am reading through this and have actually set up a project to test this out. I have added the code and for the life of me, why this escapes me I am not sure, but, how would you start the process? it seems to me that inside your int main() you would start with one of the functions, but which one and what exactly do you call?

Code: Select all

int main()
{
    ??
}
Any help would be appreciated, thanks!
Grandma-- / Grandpa --
randomMesh
Posts: 1186
Joined: Fri Dec 29, 2006 12:04 am

Re: Game State Launch.

Post by randomMesh »

Well, just make an object of the class and call the methods of that object as appropriate.

But i think if you really want to use a state machine, you should use the ones in the thread vitek linked to.
They are much more advanced. Especially the one from vitek. There even is example code.
"Whoops..."
digoxy
Posts: 51
Joined: Wed Feb 17, 2010 3:55 pm
Location: Currently Germany.

Post by digoxy »

Hello RandomMesh, thank you for the reply. I followed your suggestion and tried to implement that Vitek state manager and it comes up with some errors I cannot get down. I think it may still be a bit over my head! I am also not sure I need the global state as of yet since I still just fiddling around trying to learn what I can.

Still havent figured out how to launch this, it seems though that it should be something like

Code: Select all

 
MyGame.Initiate(video::EDT_OPENGL, screenSize, false);
This of course doesnt work, but I keep trying to launch the init this way. Can you possibly give me your thoughts on how this would launch? And, judging by the flow of the classes, does it not appear that it should "take off and run" once this is set into place?
Grandma-- / Grandpa --
randomMesh
Posts: 1186
Joined: Fri Dec 29, 2006 12:04 am

Post by randomMesh »

Code: Select all

MyGame game;
game.Initiate(video::EDT_OPENGL, screenSize, false);
Basic OOP. :o
"Whoops..."
digoxy
Posts: 51
Joined: Wed Feb 17, 2010 3:55 pm
Location: Currently Germany.

Post by digoxy »

RandomMesh, You know.. you are an awesome one.. And, I know its basic, but Ima noob.. :) Now, I look at this, and as I suspected, I would - it makes to much sense. You certainly would have a good laugh at some of the other "options" I was trying.. :)

I added your line, and, it doesnt error, this is good. It doesnt however do anything else. I will beat this up for a few more hours and see where it goes. dont be surprised if I come back for more.

Thanks again,
digz..
Grandma-- / Grandpa --
Post Reply