store Panda3D apps on USB stick, choose from menu

Right now my media player device only displays videos.
I have code for button input and transitioning between video files.
Even though the tiny embedded PC Panda3D is running on isn’t very fast, I still think having it play some “interactive animations” or games stored on the USB would be nice.

Now, I could write few thousand lines of code to have a base program always running and have other programs as plugins or addons for the base program (for example by having the code and media for them in multifiles) and have them access the same core functions and attributes and get properly cleared from memory when switched.
But I feel like I might be reinventing the wheel.
Maybe there’s a simpler way to “scroll” between Panda scenes, for example by using p3d files?

Hmm, there are a bunch of options here. What exactly does each scene entail? Is it just a rotating model or is there a script involved? If it’s just a model or a scene, then I’d suggest writing a model viewer application that switches between the different .bam files it loads.

It is definitely possible to use the .p3d architecture for this. This would mean that you would write a bootstrap program with a menu that invokes the .p3d in question when a menu item is selected, and return to the menu whenever it is closed.

Hi. The scene is not just a model(s). Models, animated models, particle effects and such could be done with custom Tags in egg files, but I also want some interactivity, by which I mean allowing to modify the default button behaviour (eg. arrow keys move character instead of rotating the camera), simple AI and things like dialog boxes which will need their own code.

Yes, but how do you think this could be done exactly?
What do you mean by invoking and closing? Separate executable, not getting closed when second executable is opened? Second executable closing itself? What if you have a left and right button to choose between programs on the device? First executable would need to know right button was clicked, while second executable is running. Would both be fullscreen and react to same input somehow?

Hmm, yeah, it would be tricky if you were to use separate panda3d runtime processes. I think that the best solution in your case might be if each scene was a Python file that defined a function or class for loading the model, and setting up whatever fancy scripts might be needed, and then it would not be difficult to write a loader that used Python’s import() or imp.load_module() to dynamically import that Python file and invoke the contained function.

Done something like this before and I think isn’t worth the hassle. I’ll pre-code some input and allow Tags in egg files to choose between them.
Thank you for the ideas though.