Some issues i would love help with

Hello, first post here.

I’ve been using Panda3D( 1.8 ) to build a little class project game, and got a couple of apparently unsolvable issues in the process, that i hope someone can help me with:

1)I have an actorInterval that i would like to set the playRate to more than 1, but doesnt matter if i put “playRate=x” in the interval constructor or use something like animation control and then try actor.play(), the character (the default moving panda of Panda3D) doesnt seem to move any quicker. Any clues?

  1. Since installers are generated by p3d files, i would like to know how to include my music files (ogg) in the p3d file. As for now my p3d game and installers have no sound.

I’ve seen in another thread that i should use ‘base.AppRunner.multifileRoot’ as a base to search for the file, but i couldnt find how to access this variable (even tried the Reference).

Tried also -n and -e with “ogg” in the packp3d.

3)I also would like to know how to include stuff like “loadPrcFileData(’’, ‘fullscreen #t’)” in the p3d file, because my code runs fine, but when i get to the p3d it seems to lose all these extra configs.

Thanks in advance,

Victor T.

Welcome! :slight_smile:

Hmmm, there should be an error in your packing process since I can pack p3d files with working audio support. Could you write here a small example (like a small program which only plays a sound) and precisely describe the process you are following to make the p3d file?

Anyway, please verify that your p3d file correctly contains ogg files with something like

multify -tvf yourFile.p3d

Moreover, be sure that you used the -r fmod/openal/audio switch in the packp3d invocation, and check your logs to see which error has occurred (file not found? Missing audio support?).

Same here, the loadPrcFileData function works as expected in my game, so there should be an error somewhere in your process. Could you produce a small example which contains the minimal amount of code which reproduces your problem?

Thanks for the reply flavio! ;D

  1. With “multify -tvf yourFile.p3d” i’ve checked that the ogg files were in fact included in the file, and the “-r fmod/openal/audio” did the trick to make it work, thank you!

Since it seems to be not that obvious, and the logs didn’t complain, shouldn’t the manual be more clear on this? =(

3)My packp3d log shows a

Which made me worried, since i use

from panda3d.core import loadPrcFileData

Also noted that using

from pandac.PandaModules import loadPrcFileData

To do the same didnt work, and no clue in the logs.

I just tried running the tutorial program of the manual

http://www.panda3d.org/manual/index.php/Using_Intervals_to_move_the_Panda

With any of the imports above and a simple

loadPrcFileData('', 'window-title Panda Adventures')

And it seems not to work, since the window title is still “panda”.

Any hints are appreciated! ;D

Hmmm I have just done a try and have seen a “NullAudioManager” in the console.

You can safely ignore this warning.

Oh, you are right, it looks like this setting is being overwritten or ignored by the runtime (while it works otherwise). Someone more expert than me should know why this happens.

I never faced this issue since I prefer this way to set the title of the window (which also works in the Panda’s runtime), since it let you change properties at runtime:

wp = WindowProperties()
wp.setTitle( 'Your title' )
[...]
base.win.requestProperties( wp )

Flavio,

Thanks again for the reply.

I’ve realized too that only some of the ‘loadPrcFileData’ are been overwritten on runtime, such as ‘Window Title’ and ‘Fullscreen’, and some do work with ‘loadPrcFileData’ such as ‘showFpsMeter’.

I’ve also been able so far to succefully set these properties with the “WindowProperties” that you have pointed in your reply.

But I have noticed another issue: when i run the p3d file (even after these window tweaks to fullscreen etc), the fps seems a lot slower than runnin the source directly (using python/ppython).

Running directly (python main.py) i get about 70-80 fps, and from the p3d file i get about 15-20 fps.

Anyone may know a cause for this?

Just remembering that i’m in Ubuntu 11.10 Oneiric Ocelot, running panda 1.8.0.

Thanks in advance.

You are welcome. :slight_smile: I don’t know about this new issue, 1.8.0 didn’t bring this problem in my project, anyway you could analyze your project in order to see how the time is differently consumed: this could give more information.

I don’t really know if this helps or not, but i’ve just successfully done in windows exactly what i was trying to do in Ubuntu 11.10.

Trying the same commands in Windows I’ve experienced none of the issues with p3d files or installers said above.

I’d like to mention that I’ve tested the resulting p3d file and intallers in Ubuntu 11.04, 11.10 and Windows, and in Ubuntu 11.10 running the game through any of these resulted i very slow FPS (6-7) compared to running directly from the source or any of the other platforms mentioned (60 FPS).

Guess I’ll just leave Ubuntu 11.10 be for a while…