nmlgc/ssg

(DirectDraw/Direct3D 12/???) Investigate sporadic slowdowns in 32-bit mode

Opened this issue · 2 comments

nmlgc commented

The 32-bit mode implemented in #3 made the game run well on modern Windows in general, but it seems to have introduced (or at least, not prevented) sporadic slowdowns at very specific places, for example during the defeat animation of the Extra Stage midboss. This happened to @WishMakers0 on stream:

https://clips.twitch.tv/CrowdedFlaccidAppleTBCheesePull-CWOmyHfFm1mcmZSf

We might need other DDrawCompat hacks after all. Only applies to the vintage DirectDraw backend, the SDL_Renderer backend implemented in #4 exhibits no slowdown in this place.

nmlgc commented

OK, I'm still getting this slowdown with SDL_Renderer's Direct3D 12 backend on my system. However, it also confirms that the cause is indeed an overwhelming number of draw calls; setting the environment variable SDL_RENDER_BATCHING to 1 works around the issue.
The other backends work fine even without batching.

That checks out. Running other games seems to imply that bullet cancels are a common optimization problem with older forms of DirectX in shmups. It's a sheer numbers game seemingly no matter whether it's just text or "particle" animations for bullet destruction, I noticed it in a couple other games too.
Batching seems like a reasonable solution to the problem without changing very much underlying functionality in other places 👍