I cannot produce a working "bdist_apps" version of my game on windows

yes we are back on this topic again, I apologize, but I am currently in game jam, and people are reporting the game being broken on windows, today I finally had the chance to install bootcamp on a borrowed mac and check out the issues for myself, there are couple, I will focus on the missing modules issue, here is the terminal log.

Building runtime for platform: win_amd64
There are some missing modules: [‘builtin’, ‘_bisect’, ‘_blake2’, ‘_codecs_cn’, ‘_codecs_hk’, ‘_codecs_iso2022’, ‘_codecs_jp’, ‘_codecs_kr’, ‘_codecs_tw’, ‘_heapq’, ‘_md5’, ‘_multibytecodec’, ‘_opcode’, ‘_pickle’, ‘_posixsubprocess’, ‘_random’, ‘_sha1’, ‘_sha256’, ‘_sha3’, ‘_sha512’, ‘_struct’, ‘_winapi’, ‘binascii’, ‘math’, ‘zlib’]
warning: build_apps: could not find dependency d3dx9_43.dll (referenced by libpandadx9.dll)

EDIT: it turns out that directX is now slow in my windows sdk, so I don’t want it anymore, but I want openGL to run at full speed, so any advice on that would be appreciated.

A alarming thing is many modules are missing, does anyone know why? especially the math, as that is needed for my cosine calculations or my game cannot function properly, there must be another missing module that is making my vfs.resolveFilename name checks not work properly

here is my setup.py

from setuptools import setup


setup(
    name = "Vortex The Pretty Magical Girl Jam Edition",
    options = {
        "build_apps" : {
            "include_patterns" : [
                "**/*.egg",
                "**/*.png",
                "**/*.txt",
                "**/*.wav",
                "Fonts/*"
                ],
            "gui_apps" : {
                "Vortex The Pretty Magical Girl Jam Edition" : "main.py"
                },
            "plugins" : [
                "pandadx9",
                "p3openal_audio"
                ],
            "platforms" : [
                "win_amd64"
                ]
            }
        }
)

I am doing anything wrong? does anything need to be included that I don’t know about? thanks to anybody willing to help, have good day.

Could you show the code in which you’re using this, please?

I’m wondering whether it’s not a filename-format issue.

What error messages are your users and you seeing when your game is run under Windows?

(By which I’m not referring to errors or warnings produced when you build your program, but rather when the built program is then run.)

I can but it would not make much sense without context, first here is the code

                filecfm = None
                filechk = Filename(str(os.path.join(str(base.mainDir),'actor',"fr_"+str(self.frchar[(len(self.frchar) - 1)])+"-ani","act_"+str(franim)+".egg")))
                if vfs.resolveFilename(filechk, getModelPath().getValue()):
                    filecfm = filechk
                filechk = Filename(str(os.path.join(str(base.mainDir),'actor',"fr_"+str(self.frchar[(len(self.frchar) - 1)])+"-ani","act_"+str(franim)+".egg.bam")))
                if vfs.resolveFilename(filechk, getModelPath().getValue()):
                    filecfm = filechk
                if not filecfm is None:
                    if franim is 0:
                        self.frobj[scnin].loadAnims({"RoleA": filecfm})
                    self.frobj[scnin].loadAnims({"Act"+str(franim): filecfm})

The above code checks to see if actor has animation files or not, I was having issues with the animation loading on the mac version so I implemented os.path call the fix it, the reason there are multiple checks is because one is for development, and the other is when the game is published as bdist_ apps changes the file name of all the egg files to bam.

It fixed the mac version, anyway, the user errors are too gameplay specific to be understood without knowing how the game works, I do know what they are complaining about though, all my cosine calculations not are working, and that is because the math module is missing.

The file path checking is not a issue with the graphics, it must be one with a missing module as my windows sdk, all the file path checks work fine.

Panda’s file system abstraction (e.g., VFS) all use forward slashes ("/") for a path separator regardless of the underlying platform. So, the output of os.path.join works on Linux, but not on Windows. You can use panda3d.core.Filename.from_os_specific() to convert platform-specific paths to Panda3D ones. Or, you can just use something like '/'.join().

2 Likes

for some reason the vfs does not work on mac outside the sdk, so I decided to use a os.path call, and it fixes the issue, but in windows it breaks it, however, the file paths on windows work as is on the sdk that have also setup on windows.

Edit: hey your solution fixed my bump mapping on windows, thank you!

EDIT2: your solution fixes everything on the mac build, it fixes everything on the windows build except the speed, which is another issue I am having with windows

Okay so after changing a lot of code, it turns out mogul’s solution fixes almost everything but the speed, the speed is a weird one though, I checked pstats (which is functional on windows) and it said my collisions are slowing everything down, this is strange seeing that it runs at full speed in the mac, the hardware is the same (same computer, just bootcamp) and in windows it is half speed, maybe something to do with the python calculations?


EDIT: it is my collisions, ctrav, pass1, that is slowing everything down in the windows version, does anyone have any clue what this means?

If I’m not much mistaken, this means that collision-traversal is taking a long time.

As to the “why”, I’m not sure of why it’s slower on one platform than on another–perhaps Windows is a more resource-intensive OS than MacOS; perhaps there’s some platform-specific element that’s more efficient under one OS than under the other; perhaps some third-party library is faster under MacOS than Windows. I don’t know–perhaps one of the others will have more information here!

Still, it might be worth taking a look at your collision -code and -models to see whether there are any potential issues there. Offhand, the two specific potential-issues that come to mind are these: Are there collision-models with a high polygon-count? Are there lots of “active” objects (i.e. ones that have been added not only to a traverser, but also to a collision-handler)?

they are polyset, so yeah, I mean I still can’t believe that a change in os can cut the fps in half, I don’t want to jerk apple off, but it sounds like they did something right, and it isn’t just my mac, people (other game jam participants) are reporting the slowness on their pcs too.

EDIT: seven, seven active ones with path fallowing, the active ones are collision sphere

Hmm… A thought occurs to me:

What FPS are you getting in Mac? And is v-sync perhaps enabled in Windows?

If Windows has v-sync enabled (something that I’ve seen be the case, as I recall), then a frame-rate that’s slightly below the sync-rate might result in the program waiting for the next update, thus cutting the frame-rate as observed.

[edit]

Okay, that part at least doesn’t sound too bad!

30 fps on mac, while on windows 14fps, I tired the V-sync disable but it does nothing

Which v-sync disable? If it was an in-game one (e.g. via Panda’s PRC-file), then it may be overridden by the OS/graphics-card-driver setting.

the graphics has one? give me a sec to check the settings

EDIT: well I have Intel HD graphics panel, is v-sync called Vertical Sync? if so, it is set to Application Settings instead Driver Settings

EDIT2: oh I forgot, I used to disable vsync

loadPrcFileData("", "sync-video #f")

I am posting because maybe I didn’t disable it right

1 Like

Does your machine have only the Intel graphics card, or does it also have a second card for more-intensive 3D rendering?

For example, my machine has an integrated Intel card for general purposes, and an NVidia card for 3D purposes, as I recall.

If your machine is similar, then it may have a second graphics panel for the other card.

(Or worse, the Windows installation may be using the Intel card for your game instead of the other card…)

just the one card, it is a macbook air after all.

Ah, fair enough. (I don’t know much about MacBook Airs, offhand, but I’ll take your word for it!)

And just to check: you looked at the graphics panel in Windows specifically, right?

If so, then it’s perhaps not a v-sync issue.

Given that, I think that it’s time to return to PStats. Specifically, what I suggest is this:

  • Under MacOS, run your game with PStats and note the output, In particular, write down the time (in ms) spent in “collisions->ctrav->pass1”, and in “flip”.
  • Under Windows, do the same, and see how the values compare.
  • Take note of any other discrepancies between the output under the two OSes!

I cannot get pstats for mac to work, I tried, and plus the application is missing from my sdk, perhaps because mine was pip installation not downloaded from the website, I can try what suggested on the windows version, give me a sec

EDIT: windows is between 50 to 67ms (with spikes to 67 and back to the middle)

EDIT: I was playing around a little bit with pstats, and found to be the collsionPolygon eating everything, but flip is far below 17ms, near the bottom