sdl12-compat icon indicating copy to clipboard operation
sdl12-compat copied to clipboard

issues affecting Loki port of Soldier of Fortune

Open twolife opened this issue 9 months ago • 5 comments

I know there are some issues to get this game to even run on a modern system (it being an ancient SDL 1.1 game), but it is possible, with a real SDL 1.2 or the supplied SDL 1.1. But unfortunately the game is unplayable with sdl12-compat :'(

I noticed 2 problems (they may be related, or not...)

  1. Once you starts a new game, a red icon starts to flickers very quickly in the top left corner & when you move the character it's completely sluggish. It sometime get fast for 5 second before slowing down again. It's horrible. sof

  2. If you persist to play (despite the big n°1 problem), the floor sometimes gets instantaneously full of blood, and if you take 2 steps ahead it' gets back to normal sof_blood sof_noblood

I don't know if this is a lost cause or if you can pull off some magic, but at least this is now documented ^^

twolife avatar Oct 26 '23 10:10 twolife

Red icon and sluggish movement are caused by high refresh rate, limiting in-game fps to 60 fixes the issue. I can't reproduce bug with red floor изображение

OlegAckbar avatar Mar 30 '24 23:03 OlegAckbar

Hmm...@twolife, can you verify?

We could maybe add a quirk to force vsync or just make SDL_GL_SwapBuffers stall to keep to ~60fps.

icculus avatar Mar 31 '24 02:03 icculus

@icculus locking framerate to 60 wouldn't be necessary since game can run without issues even at 165 fps. I think best case would be to determine critical framerate for this game since there are 360hz and higher monitors on the market already and forcing vsync could exceed framerate threshold. изображение

OlegAckbar avatar Mar 31 '24 12:03 OlegAckbar

We should probably do both, vsync and also wait, so it looks smoother and also doesn't iterate too quickly if the refresh rate is too high. But maybe that's silly, I don't know yet.

icculus avatar Mar 31 '24 18:03 icculus

ho wow, SDL12COMPAT_SYNC_TO_VBLANK=1 fixed the walking problem & did make the blood problem disappear. thanks a lot :smiley:

twolife avatar Apr 01 '24 09:04 twolife