I found a solution : it was my if name == “main” that was the problem, I should just make a main() function.
Hello,
I’ve just built a p3d package from my game with packp3d.p3d (taken from runtime.panda3d.org, the 1.8 version), but when I try to run it, it simply hangs after displaying :
:AppRunner: Total Panda3D disk space used: 342 MB
:AppRunner: Configured max usage is: 2048 MB
:util: Reading /home/grungi/.panda3d/start/config.prc
There’s a p3dpython process that takes 100% of the CPU, but no window is created.
How can I try and debug this ?
My main.py file contains this code :
if __name__ == "__main__":
# --- For debug only ---
god = False
if len(sys.argv) > 1:
if sys.argv[1] == "--debug" or sys.argv[1] == "-d":
from panda3d.core import loadPrcFileData
loadPrcFileData("", "want-directtools #t")
loadPrcFileData("", "want-tk #t")
if sys.argv[1] == "--god" or sys.argv[1] == "-g":
god = True
# --- end ---
loadTranslation('translation/traduction.csv')
checkTranslation()
app = LudumGame(god)
app.run()