TurningWheel / Barony

Barony Open Source Release
http://www.baronygame.com/
Other
488 stars 127 forks source link

Fix game stutters upon doing something for the first time #834

Closed koneko closed 5 months ago

koneko commented 5 months ago

hello. when playing barony ive always had the issue of the game "randomly" stuttering whenever i first start playing and do an action (e.g. scrapping a torch, attacking a rat, etc) and i never found the fix. until (maybe) now. i think the problem with the stuttering comes from the game having to compile shaders upon said action, and then it keeps it loaded and doesnt stutter. i believe the fix for this is forcing the game to compile the shaders upon boot and keeping them there for 24 hours or something. This video goes over what someone else did in a game which has a similar graphical style to barony, so i hope this gets implemented one way or another. also i wish to note that the issue doesnt arise from bad hardware (i have the issue with an nvidia rtx 3060 gpu and ryzen 5800H cpu which is well above recommended specs) and trying the "fixes" suggested in the discord didnt solve the problem (turning off VSync, lowering resolution, preloading songs). hope this helps, since many other players have the same issue. cheers.

SheridanR commented 5 months ago

Barony uses its own game engine that compiles shaders on boot, not Godot.

koneko commented 5 months ago

I meant more as how someone would solve the shader compilation issue, i would hope that sdl has a way to force compilation of shaders (or do what the video did just for yourself).

On Sat, Apr 20, 2024, 19:34 Sheridan Kane Rathbun @.***> wrote:

Barony uses its own game engine that compiles shaders on boot, not Godot.

— Reply to this email directly, view it on GitHub https://github.com/TurningWheel/Barony/issues/834#issuecomment-2067737609, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQDMCDYQNG7UEHO57UDPH4LY6KRIZAVCNFSM6AAAAABGQPHEEGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRXG4ZTONRQHE . You are receiving this because you authored the thread.Message ID: @.***>

SheridanR commented 5 months ago

There is no shader compilation issue. As I said, all shaders are compiled exactly once when the game starts. Also, SDL has nothing to do with shaders. If you're having performance troubles, it is something else.