How to fix performance issues?

  • 34 Replies
  • 2354 Views
*

Offline Lit Knob

  • 178
  • 33
  • Spoiler: (click to show/hide)
    • View Profile
How to fix performance issues?
« on: September 26, 2021, 15:09:53 »
Performance in Knytt Stories is quite an obscure topic no one ever talks about (unless I'm just bad at searching) so I just didn't know where to ask, anyway: in current versions and mods (plus and EX) Windows DWM's forced V-Sync really hurts performance like in the base game due to it being borderless and running at 50 fps (apparently DWM is not a fan of that) and it currently lags with 32-ish fps. I know some of you, if not all of you, managed to get the game to run properly at 50, like Don Doli for example but I'm still clueless.
I tried changing the refresh rate to 50 Hz (my monitor's max refresh rate is 75 Hz and neither that nor 60 work) but there's still some lag.
My question is: has this issue already been widely addressed and fixed?
If so, what is the current solution?
If there indeed is one, I think it should be mentioned in the plus and EX mods to make the game newcomer-friendly
« Last Edit: February 25, 2022, 15:13:44 by Lit Knob »
"The flaw expert" -egomassive

*

Offline ixMarcel

  • 357
  • 70
  • I'll get you during my next save game!
    • View Profile
Re: How to fix performance issues?
« Reply #1 on: September 27, 2021, 17:02:53 »
I had that issue with my previous Radeon graphics card, but with my current RTX 3070 KS runs butter smooth.

You game will probably run full-FPS if you enter fullscreen mode, but that stretches out the graphics. You can try to open your GPU control panel and change KS profile to something else than default (Radeon has something like Gaming Mode I think).

*

Offline Lit Knob

  • 178
  • 33
  • Spoiler: (click to show/hide)
    • View Profile
Re: How to fix performance issues?
« Reply #2 on: September 27, 2021, 20:28:02 »
My pc specs are:
Ryzen 7 2700
Gtx 1070
16 GB RAM
Nvidia driver 471
Windows 10 1909

I play Knytt Stories+ 1.3.6 with Zoom and Hide Desktop on. I confirm that fullscreen works (but as you mentioned it has no integer scaling so it's not a solution)

My card is Nvidia like yours though, so the cause must be something else.
I also tried changing Nvidia control panel settings, like disabling/enabling V-Sync but nothing changed.

Maybe your Windows and Nvidia driver versions are the answer.
Also your refresh rate
« Last Edit: September 28, 2021, 11:48:12 by Lit Knob »
"The flaw expert" -egomassive

*

Offline egomassive

  • 1850
  • 250
    • View Profile
    • egomassive games
Re: How to fix performance issues?
« Reply #3 on: September 30, 2021, 04:07:46 »
GrayFace made a program that enhances the output of older Nifflas games. I haven't used it myself and I don't think KS+ is compatible, but original KS and KS Ex should work.
https://nifflas.lp1.nl/index.php?topic=7193

I was aghast after upgrading to Win8/10, but now I've just grown numb to the poor frame rate.

*

Offline Lit Knob

  • 178
  • 33
  • Spoiler: (click to show/hide)
    • View Profile
Re: How to fix performance issues?
« Reply #4 on: September 30, 2021, 18:31:02 »
GrayFace made a program that enhances the output of older Nifflas games. I haven't used it myself and I don't think KS+ is compatible, but original KS and KS Ex should work.
https://nifflas.lp1.nl/index.php?topic=7193

I was aghast after upgrading to Win8/10, but now I've just grown numb to the poor frame rate.
I tried Scaler on Plus, EX and the base game but it just acts as your zoom feature sadly, it does not fix the lag.

For now, the only thing I tried that gets rid of it is going fullscreen (alt+enter) on your mod as stated by IxMarcel (fullscreen still lags in EX and the base game, for some reason) but of course it's not a proper solution.

I also tested YKnytt (a Knytt Stories made in Godot that runs at 60 fps) but it suffers from several issues such as atrocious input lag, and bad sound effects and scaling. It has great potential but In its current state I definitely don't consider it a valid alternative to Plus and EX. You guys still have the crown.

Any other suggestions/possible solutions?

I still don't understand why Don Doli and IxMarcel are not affected. It would be nice to finally uncover the truth.

More useful info: Don Doli is an 8.1 user. He has a 60hz refresh rate and a 1070 ti (so Nvidia) and also stated the game (Plus) just worked, out of the box and he didn't need to disable DWM nor anything...

The mistery deepens
« Last Edit: September 30, 2021, 22:27:52 by Lit Knob »
"The flaw expert" -egomassive

*

Offline Lit Knob

  • 178
  • 33
  • Spoiler: (click to show/hide)
    • View Profile
Re: How to fix performance issues?
« Reply #5 on: October 03, 2021, 18:06:12 »
I found a possible solution, but it's a bit annoying and introduces screen tearing so not ideal but still:

I used DWM Killer by PolisGod after running KS+. It completely disables DWM, not just for the Knytt window (so also disables taskbar and desktop among other things). It's a bit extreme as a solution but I personally despise tearing, so it's not worth it for my tastes.
You can give it a try if you don't mind screen tearing, but only if you plan on playing the game and nothing else at that specific moment (not suited for multitasking).

I guess I'll get used to the 30-ish fps like egomassive for now.

If anyone finds a proper definitive fix that doesn't involve upgrading hardware, please let me know.
Thanks
« Last Edit: February 25, 2022, 15:20:47 by Lit Knob »
"The flaw expert" -egomassive

*

Offline egomassive

  • 1850
  • 250
    • View Profile
    • egomassive games
Re: How to fix performance issues?
« Reply #6 on: October 04, 2021, 00:20:41 »
I wouldn't think screen-tear would be a big issue with KS since the screens don't scroll or move around, only the objects with-in them move. Unless you can set your monitor to 50Hz while jail-breaking from v-sync, I don't think it's possible to run at 50 fps without tearing.

I tinkered with the KS+ source to see if I could get it to run in fullscreen mode with integer scaling. The base engine does the dumbest thing. It boxes the game window into the smallest standard monitor resolution it can fit into, and then sets the monitor to that resolution. The only surefire way to work around this behavior is to set the game's window size to match the monitor you're using. This means I'd have to compile a different version of KS+ for every typical monitor resolution in use today. I won't do that. It's too janky and too complicated for end users.

*

Offline Lit Knob

  • 178
  • 33
  • Spoiler: (click to show/hide)
    • View Profile
Re: How to fix performance issues?
« Reply #7 on: October 04, 2021, 02:37:11 »
I wouldn't think screen-tear would be a big issue with KS since the screens don't scroll or move around, only the objects with-in them move. Unless you can set your monitor to 50Hz while jail-breaking from v-sync, I don't think it's possible to run at 50 fps without tearing.

I tinkered with the KS+ source to see if I could get it to run in fullscreen mode with integer scaling. The base engine does the dumbest thing. It boxes the game window into the smallest standard monitor resolution it can fit into, and then sets the monitor to that resolution. The only surefire way to work around this behavior is to set the game's window size to match the monitor you're using. This means I'd have to compile a different version of KS+ for every typical monitor resolution in use today. I won't do that. It's too janky and too complicated for end users.
Ok, I tried a 50hz + DWM killer combination and there's still tearing for some reason. By the way, I know the background has no tearing but as you stated, moving things are still affected, so for example Juni, enemy bullets and opening the map all get tearing and I notice it.
Anyway

I would love that integer-scaled exclusive fullscreen mode.
Can you try to just implement it for 1080? (The most common resolution right now).
I know it can feel "unfair" to 4K and 4:3 users for instance, but maybe it's a good starting point, I don't really know
« Last Edit: October 04, 2021, 03:38:43 by Lit Knob »
"The flaw expert" -egomassive

*

Offline egomassive

  • 1850
  • 250
    • View Profile
    • egomassive games
Re: How to fix performance issues?
« Reply #8 on: October 04, 2021, 23:13:38 »
I'll do it as a test. I have an onboard chipset so nothing will ever make my frame rate better. The program itself has always been set to no v-sync, so I'll give you the option to toggle that. If you can v-sync at 50hz, that may get the result you're looking for.

KS+ 1.3.7 is almost ready to launch. I'll make the native 1080 version when it's ready.

*

Offline Lit Knob

  • 178
  • 33
  • Spoiler: (click to show/hide)
    • View Profile
Re: How to fix performance issues?
« Reply #9 on: October 05, 2021, 04:57:22 »
YES. That's exactly what I wanted. Thanks egomassive.
I would give you a star now, if only I knew how to do that. I see no up arrows anywhere
"The flaw expert" -egomassive

*

Offline LPChip

  • You can only truly help other people by allowing them to fail.
  • 3510
  • 138
  • Excel at the thing you're the best at!
    • View Profile
    • LPChip Interactive
Re: How to fix performance issues?
« Reply #10 on: October 05, 2021, 17:31:14 »
The up arrow is something from the past. There is now a link  at the left that says "Give a star". Click that for it to work.

Also, if you have 2 graphics cards, for example a dedicated graphics card AND an integrated GPU from the CPU or motherboard, windows may wrongly do hardware accelleration over the integrated GPU with poor performance.
on the left, above my avatar.

MODPlug Central Forum
"If I tried to kill you, I'd end up with a big fat hole through my laptop." - Chironex

*

Offline Lit Knob

  • 178
  • 33
  • Spoiler: (click to show/hide)
    • View Profile
Re: How to fix performance issues?
« Reply #11 on: October 05, 2021, 21:02:05 »
Ok, I didn't know that. Thanks.
I guess mobile users can't give them though, because there's no "Give a star" even in desktop mode. I had to give them on my PC.

Oh I forgot to mention it in my specs list: I have 2 identical 1070 cards but there's no SLI bridge so only one is used (they only work in tandem when I use a really demanding software called Blender. Using it was the main focus of my workstation), so I don't know if what you said applies to this situation.
« Last Edit: February 25, 2022, 15:30:41 by Lit Knob »
"The flaw expert" -egomassive

*

Offline Purple Ink

  • 392
  • 39
    • View Profile
    • My lore forum
Re: How to fix performance issues?
« Reply #12 on: October 10, 2021, 03:33:06 »
Am I just lucky? I don't have any FPS related issues with Knytt Stories.

*

Offline Lit Knob

  • 178
  • 33
  • Spoiler: (click to show/hide)
    • View Profile
Re: How to fix performance issues?
« Reply #13 on: October 10, 2021, 07:45:39 »
If you are a Windows 10 or 8.1 user then yes. IxMarcel and Don Doli are also unaffected and I still have no idea why.

My original goal in this thread, was solving this "murder mistery" about pc specs and lag, and finally find the cause, but then egomassive started working on KS+ 1.3.7 and I stopped investigating cause I didn't feel the need anymore.

My current analysis of the "crime scene" is as follows:

Me, Don Doli and IxMarcel all have an Nvidia card, and Don Doli's is the Ti version of my card, so GPU is not involved.
Me and Don Doli both have a 60hz refresh rate so it can't be that.
We all play KS+ so game version is not the problem.
I have an AMD CPU while Don Doli's is Intel, but I tried the game on my second pc that has an Intel CPU and it lags there, so CPU brand doesn't matter.
Me and Don Doli both have 16 GB but I mean... It's a 2007 pixel art game so... why even bother about RAM.
The only thing that really sets me apart hardware-wise is the fact I have 2 identical Nvidia cards but in my second computer there's a single AMD card, so it can't be that.
I pretty much think and hope at this point that hardware in general is not the cause.

Software-wise I only know my OS is Windows 10 1909 and my Nvidia driver is 471.11, while Don Doli is a Windows 8.1 user.

As Don Doli stated, KS+ just worked out of the box, so I have to consider trying the game on my third computer (I don't have more so that's the last thing I can do on my end).

You can share your pc specs/Windows and GPU driver version/other things if you think it can narrow down the "suspect pool".
« Last Edit: February 23, 2022, 18:12:17 by Lit Knob »
"The flaw expert" -egomassive

*

Offline Lit Knob

  • 178
  • 33
  • Spoiler: (click to show/hide)
    • View Profile
Re: How to fix performance issues?
« Reply #14 on: October 11, 2021, 03:19:56 »
I can confirm it lags on all my 3 computers...

Ouch

This issue is not so rare as it seems then, it's actually the opposite.

My third pc has an old AMD A8 and a Gt 1030. Nvidia driver version is the same as my main pc, while Windows 10 version is 20H2, so updating it will not fix the issue.

I will just wait for the new KS+ version for now. If it really fixes everything forever, there's no point in finding the cause of the lag.
"The flaw expert" -egomassive