Hi, I’m new. I’m trying to write a game using Panda 3d, so I hope I’ve found the right place.
So, there’s a basic pattern in game writing that I’m trying to implement with Panda, and I’m sort of stumped. The pattern is fairly simple (and easy to do in PyGame, which I’d be using if I wasn’t writing a 3d RPG):
-
Game starts with a splash screen, fades to GUI. The GUI is basically “New Game”, “Internet Game”, “Settings”, that sort of stuff. Whatever you choose, eventually you’ll enter the game.
-
Game. You’re looking at your character and moving around, shooting bad guys, deciphering Ancient text (yes, it’s a Stargate ripoff).
-
Ingame UI: This is where you can leave the server, quit the game, whatever. Change video options on the fly if you’re in framerate hell, whatever.
The standard pattern I know to do this is basically a state machine, which Panda supports nicely. If the state is (1), make the main GUI object active. If the state is (2), make the game object active. If the state is (3), make the Ingame UI object active and show updates to the Game object behind it.
Ok, so all of that said, how do I do that sort of switching? I don’t want to destroy objects, necessarily, to do it. But I’ve found exactly 0 examples of this sort of thing. Lots of great examples that I’m eventually going to copy, paste, and modify, but nothing like this.
Um, help?