my purpose is to create a multiplayer game, with a central server.
The client will communicate with the server, and maybe the client will manage local files on its own side.
I have generated a p3d file, and I have tested to create new file with datas, close the file, reopen the file in read mode, and print the content of the file.
All is ok…
But…
where is stored the file. I have specify as path ./datas/config.xml. But I don’t see it from where the exe is launched.
They are loaded from the virtual file system; the files don’t physically exist as files on the disk, but Panda pretends they do. I believe the p3d file is mounted to ~/.panda3d/start, but I’m not 100% sure. In any way, I think you can rely on the current working directory being the directory in the root of your .p3d file- as in, you can load your files relative to that root.
In fact, I successfully create a directory, and a xml file.
my test.exe (created by pdeploy) create the directory and the file into :
C:\Documents and Settings\shimrod\Local Settings\Application Data\Panda3D\start
it is fine for me.
I create the file in a first launch of the game, and when I stop the game, and relaunch it, it is able to read the file created previously.