hi please help me for changing the levels of a game in irrlicht .
look , i wana to write a game that been playing start a real time demo in another situation . i wana to write this situation in another file like a function and game switch to this file without changing the Device . and after finishing the demo game come back to continue from the situation befor demo .
i think it's verry easy for irrlicht mans . show me an example . sending the variables is important . Thanks .
Get Ready For an Amazing Journey Into the World of Game Development
It is all in the scene nodes. You can clear the scene nodes with the clear function, then add the scene nodes for the next level. I'm not sure how you've implemented the level files, etc..., but Irrlicht easily switches levels. In fact, do you have a main menu. You have nodes for the stuff on the menu, then when you start the game, you clear those nodes and add the nodes for the level. Switching levels in no different.
please explaint more with some codes . my game all isn't scene nodes . it's many IF commands and variables that must cleared and i must used from it later !
Get Ready For an Amazing Journey Into the World of Game Development
Most games use one group of functions to handle all of the levels and just change a few nodes/textures/models. So the IF's you are talking about should be generic and work according to what enemies/etc... you have at the time. If you wanted to, you could have a different function that does the different level, but either way, you are going to have to clear and re insert the nodes if you actually render anything in the other world. Now, another option, though I don't like it, is to have two different "levels" loaded, and just switch the camera to see the other world. That would allow you not to clear nodes, but it would be quite inneficient. Also, IrrSpintz(Irrlicht 0.12 with some fixes and additions) allows two different scene managers, so you could go between them without having to clear nodes, but I've never done it that way.
look , i have 2 room that have many deffrence with him , i write 2 cpp file for each room and in every cpp file i written many IF commands and GUI Environments . i want switch with these files without any patch and ... such as irrsprint irrwizard . show me an example about it . it's verry important subject in games and irrlicht resources don't any help to us for this . Thanks alot .
p.s : it's verry mess up project that for level changing we use switching camera . please don't explain it again . thanks
Get Ready For an Amazing Journey Into the World of Game Development
see irrwizard construction,,,
you hace 2 cpp files in which the scene is created right? and you have a main function in some file right?
this is what the main function does: begin with function in cpp level 1... and IF you want to switch, free all that was done in cpp 1 and run function in cpp2
needforhint wrote:see irrwizard construction,,,
you hace 2 cpp files in which the scene is created right? and you have a main function in some file right?
this is what the main function does: begin with function in cpp level 1... and IF you want to switch, free all that was done in cpp 1 and run function in cpp2
just see IrrWizard construction, it will help you
This is what I'm telling you. Either way, you have to clear the nodes and load in the nodes for the other .cpp file. It doesn't matter where you get the scene from(.cpp files/same header), you still can't really change scenes completely without clearing the original scene and loading in the new scene nodes.
i don't want to clear nodes ! i need them after finishing the demo !!
i try with some function but there is some problem !!
if i create new device game open in new window !!!
IF I Use 1st device there is some problem too !! it's important for me anybody cann't write a brief codes for doing this changing in irrlicht ??
thanks
Get Ready For an Amazing Journey Into the World of Game Development
Are u just pretending to be that ignorant or do u want us to write ur code?
class ur objects up!!!!!!
save all atributes of the node in the class and then clear the node and u can restore it if u need it.
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
can you help me with other way ??? i want just switch with devices easily , i think it must be with a better way !!! i need it know . every body cann't help me ??
Get Ready For an Amazing Journey Into the World of Game Development
This is definitely not a source code bazaar-although you might find someone to write you the code in case you have some money. Otherwise you must definitely have some programming abilities. You must also be able to describe your problems such that other people can understand it, and you should be able to understand what those people tell you. And make some use of it. Otherwise it won't be useful for you to ask the questions anyway.
OK, I read that IrrSpintz can allow you to have multiple scene managers, so you could just swap managers. Otherwise, you should do as I said earlier and just redo the nodes. You can always save there information about the nodes in other objects/variables and then when you reload the nodes, set their positions accordingly.