Will p3d package compile all py to pyo before including them? Does it do some import analysis or does it just grab all py files?
p3d system automatically converts all bam’s to egg. Normally what i do is ship egg’s and compile them to bam’s first time users runs the game. Then during update i always clear the tmp directory. Should I always ship bam files? What about shipping txo’s? Currently i shipped only png’s. And when users has super bad graphics card i can half all of the textures and create new txo’s and i guess new bams that include those half sized txo? Then whats the point of bams?
Reading and writing files. It looks like open() is not supported inside the p3d packed files, so i have to use vfs.readFile(), I think it would be useful to create open()-python-like file interface to vfs.
Temp files. My game creates some temp files as it runs. It also can download some files from the web like user profiles. Normally my temp files and my compiled bam files lived in this tmp folder. Should i still have a temp folder even if i will not ship bams? Where this tmp model cache should live in the p3d system?
Where should i put odd fiddly multifile switches such as wav’s should be compressed because then they cant stream etc… Don’t compress png and jpgs because its waste of time…
Can I substitute the default panda3d p3d loader with my game logo? Its not that i don’t want to advertise panda3d, but i also don’t want the main logo of my sci-fi game be a cartoon panda, when loading, updating etc… breaks immersion you know.
But there’s a lot to be said for the convenience of having it all it a concise file format that can be invoked with a simple command-line tool, instead of having to write a new program for each package.
In fact this is supported, precisely via the stdpy module that rdb points out. The runtime system automatically replaces the global open() with the stdpy version, so you don’t even need to do anything special in your code to read your files (other than to find the files in the correct path, relative to base.appRunner.multifileRoot).
Sure, sounds like your temp directory is useful. You can create it relative to the start directory.
Ah, I see. In that case, if you don’t specify -s, the packages will be downloaded upon installation. I’m not 100% sure if they will be automatically updated when there is a new version though, probably not, because it requires root rights to modify installation dirs.
In the game directory. On windows that’s not a problem, as that directory is probably writable, but on Linux it will be /usr/share/yourgame/hosts/ so that won’t work correctly.
I still haven’t 100% decided on the correct behavior for locally hosted packages by pdeploy, though. I’m still in a bit of dilemma about this, and I’ll update pdeploy later when I have a permanent solution.