Alienhead Posted February 19, 2023 Share Posted February 19, 2023 Is there a clear advantage to updating and rendering every other loop? Granted speed variables and a few other things need adjusting to compensate. I've recently began experimenting with a controlled rendering loop and have seen some nice results. I'm just wondering if what I'm seeing is an actual improvement or just the results of 1 frame updated every too loops increasing the fps. Here's a short example of what I'm talking about. sets = {} sets.optimizationlvl = 2 while appquit == false do Time:Update() --Render the world if rendertick == sets.optimizationlvl then -- do 3d world:Update() world:Render() -- do 2d context:Sync(false) end if rendertick == sets.optimizationlvl then rendertick = 0 end rendertick = rendertick + 1 end I'm just wondering if I'm wasting my time with this or if this framework could be tweaked in some ways to provide some additional horsepower. Quote I'm only happy when I'm coding, I'm only coding when I'm happy. Link to comment Share on other sites More sharing options...
Solution Josh Posted February 19, 2023 Solution Share Posted February 19, 2023 You should not do this. 1 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...
Alienhead Posted February 19, 2023 Author Share Posted February 19, 2023 Fraps actually reports lower fps than LE does when ran without the optimization loop, LE runs the scene at 59 fps while reporting 151. Fraps comes in at 45's - 50's. Quote I'm only happy when I'm coding, I'm only coding when I'm happy. Link to comment Share on other sites More sharing options...
Alienhead Posted February 19, 2023 Author Share Posted February 19, 2023 10 minutes ago, Josh said: You should not do this. I didnt think so.. As mentioned I'm just experimenting but wanted expert opinion.. Tyvm Quote I'm only happy when I'm coding, I'm only coding when I'm happy. Link to comment Share on other sites More sharing options...
Josh Posted February 19, 2023 Share Posted February 19, 2023 All you are doing is calling Time::Update twice, in a really convoluted manner. 1 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...
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.