JD-pyprocgame
JD-pyprocgame copied to clipboard
Some assets still loaded with a relative path
JD-pyprocgame was modified at some point to access assets using an absolute path computed from the location of the running class. This makes it relative to where JD-pyprocgame is stored in the file system.
Some locations were missed and still access assets with the relative path "./games/jd/...". This assumes the game was launched from a directory higher in the file system. The code should be modified to use absolute paths like the other assets. After the change will be able to launch JD-pyprocgame from its own installation directory. This change is backwards compatible.
JD-pyprocgame makes an assumption where pyprocgame is located relative to the current directory and modifies the sys.path accordingly. This code should be removed to rely on the sys.path being configured properly. This change is not backwards compatible, but is required to safely launch from its own installation directory. Look for comments similar to this: sys.path.append(sys.path[0]+'/../..') # Set the path so we can find procgame. We are assuming (stupidly?) that the first member is our directory.
You can experiment with this test program which shows the path of every asset being loaded and checks whether the file exists. test.zip