Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
nmlgc opened this issue Jan 2, 2023 · 2 comments
Open
Labels
Bug Something isn't working Graphics

Comments

@nmlgc
Copy link
Owner

nmlgc commented Jan 2, 2023

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 nmlgc added Bug Something isn't working Graphics labels Jan 2, 2023
@nmlgc nmlgc changed the title Investigate other DDrawCompat hacks to fix sporadic slowdowns Investigate sporadic slowdowns in 32-bit mode Jan 2, 2023
@nmlgc nmlgc added the Vintage Only necessary to keep the game working on the old Windows 9x systems that it originally targeted. label Aug 12, 2024
@nmlgc nmlgc changed the title Investigate sporadic slowdowns in 32-bit mode (DirectDraw) Investigate sporadic slowdowns in 32-bit mode Aug 12, 2024
@nmlgc nmlgc changed the title (DirectDraw) Investigate sporadic slowdowns in 32-bit mode (DirectDraw/Direct3D 12/???) Investigate sporadic slowdowns in 32-bit mode Aug 28, 2024
@nmlgc nmlgc removed the Vintage Only necessary to keep the game working on the old Windows 9x systems that it originally targeted. label Aug 28, 2024
@nmlgc
Copy link
Owner Author

nmlgc commented Aug 28, 2024

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.

@WishMakers0
Copy link
Collaborator

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 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Graphics
Projects
None yet
Development

No branches or pull requests

2 participants