Helion-Engine / Helion

A modern fast paced Doom FPS engine
GNU General Public License v3.0
86 stars 9 forks source link

Weapon sprite bob snaps to a virtual grid of 320×200 pixels, making it look less smooth #543

Closed Calinou closed 8 months ago

Calinou commented 8 months ago

Helion version: https://github.com/Helion-Engine/Helion/commit/73e70716f9e4309255ed80ad46f6a074516010c6

Right now, bobbing appears to be interpolated, but snapped to a virtual grid of 320×200 pixels.

https://github.com/Helion-Engine/Helion/assets/180032/94398820-1ef4-450b-885a-abafeb51b778

This makes it look not as smooth as it could. In contrast, in pretty much any other source port I've seen, sprite bobbing can work with any physical pixel the screen has (which means it can be pretty smooth with interpolation and a high internal resolution like 4K).

You can see interpolation is still in effect if you move while holding a chainsaw[^1]:

https://github.com/Helion-Engine/Helion/assets/180032/ec970153-fb5f-4e59-b21f-1f8a8b7c97ba

[^1]: The chainsaw bobbing updating at a lower rate is a vanilla Doom issue that Helion could fix as well, but this should be tracked in a separate issue.

This occurs regardless of the move bob intensity setting.

nstlaurent commented 8 months ago

I changed the code to manually calculate the draw dimensions for the weapon instead of using the virtual draw functions because they are incapable of handling this scenario. The changes are pushed to dev.

I don't recall what the chainsaw issue is specifically but it is a Doom specific problem that makes it choppy. GZDoom made changes for it, ports like dsda retain the original choppy animation functionality.

Calinou commented 8 months ago

Thanks for looking into this! I've opened a new issue for the chainsaw sprite bobbing, as the original issue reported here is now resolved.