tumira Posted December 17, 2016 Share Posted December 17, 2016 1)Create new project (FPS Template) 2)Open "07-AI and Events.map" 3)Disable Vsync ( Main.lua line 81 context:Sync(false)) 4)Play the game, you will noticed that when the flashlight hit "controller.mdl" at certain angle the performance drop is quite big. These screenshots are at default settings and resolution (except vsync is off) 1)Flashlight on https://dl.dropboxusercontent.com/u/65841566/Leadwerks/Leadwerks%204.2RC4%20Flash%20part%201.jpg 2)Flashlight off https://dl.dropboxusercontent.com/u/65841566/Leadwerks/Leadwerks%204.2RC4%20Flash%20part%202.jpg 1)Flashlight on https://dl.dropboxusercontent.com/u/65841566/Leadwerks/Leadwerks%204.2RC4%20Flash%20part%203.jpg 2)Flashlight off https://dl.dropboxusercontent.com/u/65841566/Leadwerks/Leadwerks%204.2RC4%20Flash%20part%204.jpg If I change the resolution to 1920x1080, msaa=2, fullscreen , anisotropy filtering=16, vsync on and lighting to "2", it will easily drops to 45-48 ish at the same angle or room. If I turn off the flashlight, the speed will be 60fps. My spec I72600k 8GB 970GTX Latest driver Windows 10 64bit These screenshots are from (1920x1080, msaa=2, fullscreen , anisotropy filtering=16, vsync on and lighting to "2") 1)Flashlight on https://dl.dropboxusercontent.com/u/65841566/Leadwerks/Leadwerks%204.2RC4%20Flash%20part%206.jpg 2)Flashlight off https://dl.dropboxusercontent.com/u/65841566/Leadwerks/Leadwerks%204.2RC4%20Flash%20part%205.jpg This bug or performance impact causes some stuttering to happens. The performance drops will remain there until I turn off the flashlight. Quote Link to comment Share on other sites More sharing options...
Josh Posted December 17, 2016 Share Posted December 17, 2016 That seems about right to me, due to having to render the scene again to update the shadow. I may be able to improve performance a bit still, but it doesn't seem totally unreasonable. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
tumira Posted December 18, 2016 Author Share Posted December 18, 2016 Flashlight will dropped performance from 60 to 43-48ish when it is on, is normal ? The framedrop is steady, it is not just dropped at certain time and coming back up. It will stays at the fps until I move the mouse or look at other angle. Quote Link to comment Share on other sites More sharing options...
reaper2259 Posted December 18, 2016 Share Posted December 18, 2016 is your flashlight set to dynamic+static? here is a reference to lights, if you scroll down to the comments section you will see a very useful comment by AggorJorn. http://www.leadwerks.com/werkspace/page/tutorials/_/lights-r4 Quote Link to comment Share on other sites More sharing options...
tumira Posted December 18, 2016 Author Share Posted December 18, 2016 @reaper2259 it is as default as what is in the example. So I assume Josh already make the optimization. @Josh Found the problem and a short term fix. Install MSI Afterburner and in the Rivaturner Statistic Server, Set the frame limit to 60 (To my Monitor refresh rate). Solved my problem with the flashlight and rotating around object microstuttering. Actually my fps when rotating is 60fps but somehow it is not smooth and jerky. Limiting the frame to 60 in Msi afterburner solved this. The jerky or stuttering happens even when Vsync is on in the Main.lua. I think I know why my friends that is using higher performance card (980ti) said that leadwerks game is not smooth also. I hope Josh can come out with some sort of targeting frame rate settings or frame rate smoothing or something. I suspect user with higher GPU speed may see this stuttering effect more. I would like to request some sort of frame smoothing or frame limiting features built into the engine if possible. Quote Link to comment Share on other sites More sharing options...
tumira Posted December 18, 2016 Author Share Posted December 18, 2016 (edited) .. Edited December 18, 2016 by tumira Quote Link to comment Share on other sites More sharing options...
tumira Posted December 18, 2016 Author Share Posted December 18, 2016 Adding Time:Step() before Time:Update() in the Main.lua will solve this micro stuttering and jerky issues for my case. http://www.leadwerks.com/werkspace/page/api-reference/_/time/timestep-r501 Well you learn something new everyday.. So I guess when published our game, we can let the user to have the option to turn off frame cap or not this way ? Or there is more elegant way to do this ? Quote Link to comment Share on other sites More sharing options...
Genebris Posted December 18, 2016 Share Posted December 18, 2016 I have a better controls in my game with 120 FPS than with 60. Quote Link to comment Share on other sites More sharing options...
tumira Posted December 19, 2016 Author Share Posted December 19, 2016 @genebris I understand, but not every user like to play their game with vsync off. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.