Jump to content

Leadwerks 4.2 RC4 Flashlight causes alot of performance hit


tumira
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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.

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

@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. smile.png

Link to comment
Share on other sites

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.. biggrin.png

 

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 ?

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...