What did you do?
Are you Jesus?
At first my pc had problem with getting 372FPS. Really unstable and messy.
But it went great after all.
"Let's try run mah game" - works at nice 75FPS
Go back to 125 cap.
BAM it works
PRAISE THE SUN!
I will save this .love and run it everytime something goes wrong.
Capped frame limit for no reason *sigh*
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- zorg
- Party member
- Posts: 3465
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: Capped frame limit for no reason *sigh*
Yep, it kills one of my CPU coresEvine wrote:Check if this program works on your computer. It uses a "while" loop to delay the frame rate.
It's just imprecise.Evine wrote:The "love.timer.sleep" function is cursed I tell ya.
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Re: Capped frame limit for no reason *sigh*
The program doesn't actually do anything with your pc. Your love.timer.sleep() function just decided to be accurate again, for some bizarrely strange reason.pacman wrote:What did you do?
Are you Jesus?
At first my pc had problem with getting 372FPS. Really unstable and messy.
But it went great after all.
"Let's try run mah game" - works at nice 75FPS
Go back to 125 cap.
BAM it works
PRAISE THE SUN!
I will save this .love and run it everytime something goes wrong.
Now i made a more precise timer function you can implement into your game. And it doesn't kill a CPU core either. (unless you put the tolerance_constantFPS to 0)
Code: Select all
--Add this line to the start of love.update(dt)
constantFPS(125,0.5) -- FPS , Sleep % from 0(Diabled, max CPU usage) to 1(CPU Sleep 100% of a frame)
--Copy this function to wherever.
function constantFPS(fps_constantFPS,tolerance_constantFPS)
do
local fps , tolerance , loopTime , loopDelay = fps_constantFPS , tolerance_constantFPS , loopTime_constantFPS , loopDelay
if loopTime == nil then loopTime = 0 end
love.timer.sleep((1/fps)*tolerance)
local loopTime = loopTime - love.timer.getTime()
local loopDelay = love.timer.getTime() + loopTime
while love.timer.getTime() - loopDelay < (1/fps) do end
end
loopTime_constantFPS = love.timer.getTime()
end
No it's inconsistently imprecise. In layman terms: Cursedzorg wrote:It's just imprecise.Evine wrote:The "love.timer.sleep" function is cursed I tell ya.
Artal, A .PSD loader: https://github.com/EvineDev/Artal
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Capped frame limit for no reason *sigh*
If it were "consistently imprecise" it wouldn't be imprecise.Evine wrote: No it's inconsistently imprecise. In layman terms: Cursed
Re: Capped frame limit for no reason *sigh*
There's definitely something going on with this one.
Yesterday I had 100FPS problem once again but today it seems fine ; )
I will try your "antidote" to this curse, Evine. Thank you very much
Yesterday I had 100FPS problem once again but today it seems fine ; )
I will try your "antidote" to this curse, Evine. Thank you very much
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 2 guests