Framerate and Performance: Difference between revisions

From Vintage Story Wiki
Marked this version for translation
(add translate tag)
(Marked this version for translation)
Line 1: Line 1:
<languages/><translate>
<languages/><translate>
<!--T:1-->
Vintage Story aims to be a high performance game even on non-gaming hardware, such as laptops.  For high-end gaming hardware, it should be possible to achieve high framerates (100fps or more) even with all settings maximised.
Vintage Story aims to be a high performance game even on non-gaming hardware, such as laptops.  For high-end gaming hardware, it should be possible to achieve high framerates (100fps or more) even with all settings maximised.


<!--T:2-->
Generally each new major version of Vintage Story should have better performance: version 1.15 was noticeably better than 1.14, for example.
Generally each new major version of Vintage Story should have better performance: version 1.15 was noticeably better than 1.14, for example.


<!--T:3-->
''(Last updated February 7, 2022 for game version 1.16.3)''
''(Last updated February 7, 2022 for game version 1.16.3)''


===Basic performance tips - if the game runs slow===
===Basic performance tips - if the game runs slow=== <!--T:4-->
With appropriate settings, most players should be able to achieve playable framerates (such as 30fps) even on older hardware.  Make sure to read through the [[Troubleshooting_Guide#Game_Runs_Slow|Game Runs Slow Guide]].  
With appropriate settings, most players should be able to achieve playable framerates (such as 30fps) even on older hardware.  Make sure to read through the [[Troubleshooting_Guide#Game_Runs_Slow|Game Runs Slow Guide]].  
<br>
<br>
If you have only integrated graphics (e.g. Intel Core with Iris), use graphics settings Medium or Low, or even lower.
If you have only integrated graphics (e.g. Intel Core with Iris), use graphics settings Medium or Low, or even lower.


===Advanced Tips for Maximising Performance===
===Advanced Tips for Maximising Performance=== <!--T:5-->
1. If you are playing Single Player, for maximum performance and stability - on a PC with at least 16GB of RAM and a modern CPU - you can set up a dedicated server on your own PC, instead of playing Single Player.  So you copy/move your saved game world into the server's Saves folder and run VintagestoryServer.exe.  Then start the game normally, in the main menu click on Multiplayer and connect to the server you just made.  The address of the server on your own machine is always 127.0.0.1.  This should be straightforward - it's not normally necessary to set up port forwarding or firewall permissions if playing on a server which is running on your own PC.
1. If you are playing Single Player, for maximum performance and stability - on a PC with at least 16GB of RAM and a modern CPU - you can set up a dedicated server on your own PC, instead of playing Single Player.  So you copy/move your saved game world into the server's Saves folder and run VintagestoryServer.exe.  Then start the game normally, in the main menu click on Multiplayer and connect to the server you just made.  The address of the server on your own machine is always 127.0.0.1.  This should be straightforward - it's not normally necessary to set up port forwarding or firewall permissions if playing on a server which is running on your own PC.


<!--T:6-->
'''Strongly recommended for the new higher view distances above 1024, or any high view distances really!'''
'''Strongly recommended for the new higher view distances above 1024, or any high view distances really!'''


<!--T:7-->
''Why this helps: it means the server part of the game (which generates and runs the world) and the client part of the game (which draws the chunks and animals and everything else you can see) can each run separately in their own memory space, without conflicting with each other and with reduced lag spikes. You'll also be less likely to run out of memory at high view distances.  .NET framework gives the game 4GB of RAM on each instance: in single player, that 4GB has to be shared between the internal server and the client.  With a dedicated server, the server has its own 4GB and the client has its own 4GB.  More memory is good!''
''Why this helps: it means the server part of the game (which generates and runs the world) and the client part of the game (which draws the chunks and animals and everything else you can see) can each run separately in their own memory space, without conflicting with each other and with reduced lag spikes. You'll also be less likely to run out of memory at high view distances.  .NET framework gives the game 4GB of RAM on each instance: in single player, that 4GB has to be shared between the internal server and the client.  With a dedicated server, the server has its own 4GB and the client has its own 4GB.  More memory is good!''


<!--T:8-->
Alternatively if you have a laptop or similar with only limited RAM, but there's another PC on the same local network, try running a dedicated Vintage Story server on that other PC and connecting to it over your local network.  This may need the firewalls to be set to allow Vintage Story to have network access on both PCs.
Alternatively if you have a laptop or similar with only limited RAM, but there's another PC on the same local network, try running a dedicated Vintage Story server on that other PC and connecting to it over your local network.  This may need the firewalls to be set to allow Vintage Story to have network access on both PCs.




<!--T:9-->
2. It may help to play the game in Full Screen mode, not windowed mode.
2. It may help to play the game in Full Screen mode, not windowed mode.




<!--T:10-->
3. Vintage Story has a wide range of graphics settings.  Adjusting these up or down, and switching on or off the fancier elements, can have a huge effect on performance.  The tooltips on each control on the Graphics settings page should give you some pointers.  Switching off Shadows, SSAO and Bloom will have the biggest effect on framerate for most people.
3. Vintage Story has a wide range of graphics settings.  Adjusting these up or down, and switching on or off the fancier elements, can have a huge effect on performance.  The tooltips on each control on the Graphics settings page should give you some pointers.  Switching off Shadows, SSAO and Bloom will have the biggest effect on framerate for most people.


<!--T:11-->
''Large view distances have an effect not only the framerate (fps) on screen, but also performance throughout the game.  If everything is sluggish or there are frequent lag spikes, try turning down the view distance.  The game is balanced to be smooth and playable on most modern PCs at view distances around 256 blocks to 512 blocks, depending on your hardware.  Above 512 blocks is certainly possible on most PCs - at least to see what it looks like - but long-term play at such large view distances with max graphics is best left only for high-end gaming PCs who followed the advice in step #1...
''Large view distances have an effect not only the framerate (fps) on screen, but also performance throughout the game.  If everything is sluggish or there are frequent lag spikes, try turning down the view distance.  The game is balanced to be smooth and playable on most modern PCs at view distances around 256 blocks to 512 blocks, depending on your hardware.  Above 512 blocks is certainly possible on most PCs - at least to see what it looks like - but long-term play at such large view distances with max graphics is best left only for high-end gaming PCs who followed the advice in step #1...




<!--T:12-->
4. The game supports 4k screens.  Even so, the size of that screen places higher demands on the GPU and so framerates may be lower.  On ultra HD monitors, you can experiment with turning down the resolution to a lower HD setting like 1920x1080.  You won't lose much graphical fidelity and it will likely help performance.
4. The game supports 4k screens.  Even so, the size of that screen places higher demands on the GPU and so framerates may be lower.  On ultra HD monitors, you can experiment with turning down the resolution to a lower HD setting like 1920x1080.  You won't lose much graphical fidelity and it will likely help performance.




<!--T:13-->
5. Make sure your CPU is not overheating and therefore "thermally throttling".  If you run Vintage Story with no VSync and unlimited frame rate, it will push one of your CPU cores to 100% permanently. That in turn will cause the CPU internal temperature to rise.  You can monitor temperatures using a free 'Hardware Monitor' tool, or just listen to the fan noise ramping up! If the CPU internal temperature is approaching maximum allowed levels (90-100 °C on a modern CPU, that's hot enough to boil water) then the CPU should automatically switch to running slower than its maximum speed, this is "thermal throttling".  This will slow down the game's performance.  To prevent this thermal issue, use VSync or max frame rate limits to prevent your CPU cores reaching 100% usage: your game will probably actually run faster overall if the busiest CPU core is at around 70-80% utilisation or less.
5. Make sure your CPU is not overheating and therefore "thermally throttling".  If you run Vintage Story with no VSync and unlimited frame rate, it will push one of your CPU cores to 100% permanently. That in turn will cause the CPU internal temperature to rise.  You can monitor temperatures using a free 'Hardware Monitor' tool, or just listen to the fan noise ramping up! If the CPU internal temperature is approaching maximum allowed levels (90-100 °C on a modern CPU, that's hot enough to boil water) then the CPU should automatically switch to running slower than its maximum speed, this is "thermal throttling".  This will slow down the game's performance.  To prevent this thermal issue, use VSync or max frame rate limits to prevent your CPU cores reaching 100% usage: your game will probably actually run faster overall if the busiest CPU core is at around 70-80% utilisation or less.


<!--T:14-->
''Tip: on a multi-core PC, the overall CPU usage percentage shown by Windows can look small even if one core is maxed out.  For example, with 8 cores, one core maxed out at 100% would only be 12.5% CPU usage overall.  To see what's really going on, you need to use a non-Microsoft tool like Hardware Monitor.''
''Tip: on a multi-core PC, the overall CPU usage percentage shown by Windows can look small even if one core is maxed out.  For example, with 8 cores, one core maxed out at 100% would only be 12.5% CPU usage overall.  To see what's really going on, you need to use a non-Microsoft tool like Hardware Monitor.''


<!--T:15-->
''(Note that VintageStory does use multithreading for efficient performance.  That is why the game runs best on a CPU with 4 cores or more.  But the main rendering thread, which is one of the limits on FPS, runs on a single core.)''
''(Note that VintageStory does use multithreading for efficient performance.  That is why the game runs best on a CPU with 4 cores or more.  But the main rendering thread, which is one of the limits on FPS, runs on a single core.)''




<!--T:16-->
6. If you followed suggestion #1 above, you can tweak server performance by adjusting the "magic numbers".  The magic numbers default values are aimed at a typical Vintage Story multiplayer server with let's say 3 or 4 players, playing over the internet, so some of them can be increased if it's only 1 player on your own machine.
6. If you followed suggestion #1 above, you can tweak server performance by adjusting the "magic numbers".  The magic numbers default values are aimed at a typical Vintage Story multiplayer server with let's say 3 or 4 players, playing over the internet, so some of them can be increased if it's only 1 player on your own machine.




<!--T:17-->
7.  There's a known issue on '''Radeon''' graphics cards - including high end Radeon cards - about GPU availability, more like memory lock contention.  The issue is normally only seen on max graphics settings (with shadows enabled) and is most obvious when moving across the map so that a lot of new map loads, there can be '''noticeable frame rate drops and stutter'''.  Game version 1.15.7 and above has a change that slightly improves this, we hope to do even more to work around it in future versions, but ultimately it is a hardware/GPU issue.  For anyone bothered by the issue, a solution is to ease the pressure on the GPU by turning down some of the top end settings (SSAO and Shadows, or reduce the MaxFPS) so that the GPU has some idle time each frame.
7.  There's a known issue on '''Radeon''' graphics cards - including high end Radeon cards - about GPU availability, more like memory lock contention.  The issue is normally only seen on max graphics settings (with shadows enabled) and is most obvious when moving across the map so that a lot of new map loads, there can be '''noticeable frame rate drops and stutter'''.  Game version 1.15.7 and above has a change that slightly improves this, we hope to do even more to work around it in future versions, but ultimately it is a hardware/GPU issue.  For anyone bothered by the issue, a solution is to ease the pressure on the GPU by turning down some of the top end settings (SSAO and Shadows, or reduce the MaxFPS) so that the GPU has some idle time each frame.




<!--T:18-->
8.  The Occlusion Culling graphics setting is recommended on any modern multi-core CPU (4 cores or more) - it uses one additional CPU thread but leads to less work for the GPU.
8.  The Occlusion Culling graphics setting is recommended on any modern multi-core CPU (4 cores or more) - it uses one additional CPU thread but leads to less work for the GPU.




<!--T:19-->
See also [[Troubleshooting_Guide#Game_Runs_Slow|Troubleshooting Guide]]
See also [[Troubleshooting_Guide#Game_Runs_Slow|Troubleshooting Guide]]


===Balancing performance, temperature and power consumption===
===Balancing performance, temperature and power consumption=== <!--T:20-->
* For the reasons given in #5 above, it is recommended not to run with Unlimited FPS, but instead to limit the FPS.  The main reason to do this is so that your CPU will not be maxed out with one core at 100% all the time, which can lead to overheating or even (in the long term) a shorter lifetime for your CPU.  If FPS is limited in any of the ways on offer, it allows the CPU to "rest" in between frames, and that in turn means the CPU takes less power and runs cooler, so that system fans can be quieter, etc, etc.
* For the reasons given in #5 above, it is recommended not to run with Unlimited FPS, but instead to limit the FPS.  The main reason to do this is so that your CPU will not be maxed out with one core at 100% all the time, which can lead to overheating or even (in the long term) a shorter lifetime for your CPU.  If FPS is limited in any of the ways on offer, it allows the CPU to "rest" in between frames, and that in turn means the CPU takes less power and runs cooler, so that system fans can be quieter, etc, etc.
* FPS can be limited through the graphics settings.  This can be done either by using the MaxFPS slider, or using VSync, or the third VSync option is a combination of both.
* FPS can be limited through the graphics settings.  This can be done either by using the MaxFPS slider, or using VSync, or the third VSync option is a combination of both.
Line 61: Line 78:
* Some players want lag (latency) to be as low as possible, in that case you can try setting MaxFPS at a much higher number like 100 or 120fps.  Even a high number like that will have cooling benefits on a high powered gaming PC which is capable of reaching framerates of 150 or more in Vintage Story.
* Some players want lag (latency) to be as low as possible, in that case you can try setting MaxFPS at a much higher number like 100 or 120fps.  Even a high number like that will have cooling benefits on a high powered gaming PC which is capable of reaching framerates of 150 or more in Vintage Story.


===Thinking about what is on-screen===
===Thinking about what is on-screen=== <!--T:21-->
* Vintage Story framerates can change a lot depending on the complexity of what is on screen
* Vintage Story framerates can change a lot depending on the complexity of what is on screen
* To see this, with unlimited MaxFPS, try looking straight up into the sky - you should see the frame rate increase dramatically
* To see this, with unlimited MaxFPS, try looking straight up into the sky - you should see the frame rate increase dramatically
* Normally the most complex scenes, causing the lowest FPS, are thick, deep forests.  It's because of all the leaves, and each leaf block is slightly transparent, so everything behind leaf blocks also has to be drawn - the depth of field is huge.
* Normally the most complex scenes, causing the lowest FPS, are thick, deep forests.  It's because of all the leaves, and each leaf block is slightly transparent, so everything behind leaf blocks also has to be drawn - the depth of field is huge.


===CPU or GPU runs too hot===
===CPU or GPU runs too hot=== <!--T:22-->
* The main way to control CPU and GPU usage is using the '''Vsync''' and '''Max FPS''' settings in the graphics settings as described above.
* The main way to control CPU and GPU usage is using the '''Vsync''' and '''Max FPS''' settings in the graphics settings as described above.
* One path to optimise both: pick a framerate you want e.g. 60 fps.  Now with '''VSync''' off and '''Max FPS''' unlimited, adjust the graphics settings that heavily affect framerate (view distance, godrays & bloom, shadows, SSAO) to hit a framerate that's about 15%-20% better than you want, e.g. 70 fps or 80 fps.  When the game can comfortably hit that, now set '''Max FPS''' to 60fps and '''VSync''' to 'On + Sleep'.  This should produce a stable 60fps, a smooth game with no lag spikes, and less than 100% CPU and GPU usage so that your fans run quiet.
* One path to optimise both: pick a framerate you want e.g. 60 fps.  Now with '''VSync''' off and '''Max FPS''' unlimited, adjust the graphics settings that heavily affect framerate (view distance, godrays & bloom, shadows, SSAO) to hit a framerate that's about 15%-20% better than you want, e.g. 70 fps or 80 fps.  When the game can comfortably hit that, now set '''Max FPS''' to 60fps and '''VSync''' to 'On + Sleep'.  This should produce a stable 60fps, a smooth game with no lag spikes, and less than 100% CPU and GPU usage so that your fans run quiet.


</translate>
</translate>
Confirmedusers
13,514

edits