tModLoader / tModLoader

A mod to make and play Terraria mods. Supports Terraria 1.4 (and earlier) installations
https://www.tmodloader.net/
MIT License
4.14k stars 1.86k forks source link

[1.4 Alpha] FPS changes between 30 and 60 without any reason in fullscreen #1763

Open Hasster1 opened 3 years ago

Hasster1 commented 3 years ago

Is there an existing issue for this?

Version

Latest public-1.4-alpha

OS

Windows

Platform

Steam

Description

CPU - I5 4210u. GPU - GeForce 840m. RAM - 6 gb. For some reason, FPS switches for no reason between 30 and 60 in fullscreen mode. It doesn't matter what settings i'm using. Sometimes switching between menus (Opening credits for example) can bring fps back from 30 to 60. Sometimes changing day/night cycle can change fps. (In main menu) Sometimes it might stay in 30 or 60 fps mode for a few minutes, and change to another mode after that. Happens only in fullscreen mode!

--Update-- Actually, it does the same ingame. It doesn't really matter what settings you are using, because it can happen just randomly. Even in menu, with autopause enabled. If fps is stuck at 30, sometimes changing some settings can revert it back to 60 fps. (Like resolution)

--Update №2-- Alright, my dumb brain forgot to check if this slowdown was happening in windowed mode, and it doesn't happen in windowed mode, which means that problem is in the fullscreen mode itself.

Log File

client.log (Main menu) client.log (Ingame) I'm pretty sure that log files here are useless.

Steps to reproduce

1 - Just get into terraria (Probably with the semi-weak laptop like mine) 2 - Turn fullscreen mode on. 3 - Just play a game, or even stay at the menu. it'll happen by itself (only if the problem isn't in my poor laptop)

Expected Behavior

There should be no changing fps at all, it should stay either only 30 or 60 fps.

Actual Behavior

It just changes fps from 60 to 30 or from 30 to 60 with no reason. f10 shows that.

Reproduction frequency

Every time i'm in menu.. or playing, happens by itself.

Additional Information

Someone can probably test it by opening other programs and intentionally slowing down tmodloader.

Hasster1 commented 3 years ago

If someone needs a video, i can record it. Btw, can someone add "1.4 alpha bug" label to the issue?

Hasster1 commented 3 years ago

Probably related to https://github.com/tModLoader/tModLoader/issues/1470

FaKsho commented 1 year ago

I have the same problem

FaKsho commented 1 year ago

I honestly don't understand the relationship between the solution I found and the problem, but I'll tell you. By enabling amd's Metrics Overlay, the game magically starts using the full power of the gpu and the game is no longer limited to 30fps. For now it is the only solution that worked for me.

Geometryblue commented 2 weeks ago

I have the same problem. I've noticed that the game uses almost all of the PC's memory, which is strange since it doesn't seem like a game that should consume that amount, I honestly think tmodloader should make some optimization changes.

Despite having passed 3 years this problem is still valid, and it is not very well known, I will make some configurations to see if it can be solved, in my case, my graphic processor is nvidia

Update:

in the tmodloader folder there is a folder called "dotnet" which contains the dodnet.exe executable, which seems to be the game as well since if you configure its graphics in the nvidia panel or in another graphics panel, the changes are applied. so i disabled vsync and now the game is more responsive, i don't think it solves the problem but it feels good.

Some mods also make the game worse, like wrat of the gods, which is supposed to add 2 fights but strangely also adds lag to the whole game.