deploying game - config problems

Hi, I’m trying to deploy my game. I’m using

packp3d -o myapp.p3d -d c:/myapp

but it doesn’t import my config.prc options inside. Am I doing something wrongly? I’ve tried adding

-e prc


-c prc_name=config

but nothing works. Or is there another way of enabling multisampling inside my programme? Thank you!

When packed panda is a bit picky about what config options to read.

But you can do:

loadPrcFileData("", "multisamples 1")


from panda3d.core import ConfigVariableInt
ConfigVariableInt('multisamples', 1)  

or you could ship your game with a config file outside of the game package, then you could do:

from panda3d.core import loadPrcFileData
from direct.showbase.AppRunnerGlobal import appRunner
if appRunner: 
else:  #for testing  
    f = open(path, 'r')
    for line in f:
        if not line.startswith('#'):        
except IOError:
    print "No config file, using default" 
from panda3d.core import WindowProperties
from panda3d.core import ConfigVariableInt

cfg_win_size=ConfigVariableInt('win-size', '640 480')  
wp = WindowProperties.getDefault()         

Thanks for the reply! The first one didn’t work :frowning: I don’t know why, though I would really prefer the first one. Any idea why? Second and third ones worked great. Thanks a lot! :slight_smile:

Are you sure you used the quotation marks correctly?

What’s the error you get?

yup quite sure (im not with my computer now). there’s no error, just that nothing happens.

That code is kind of silly given that there’s also a loadPrcFile function.