High UPS run.lua script

Show off your games, demos and other (playable) creations.
Post Reply
User avatar
darkfrei
Party member
Posts: 109
Joined: Sat Feb 08, 2020 11:09 pm

High UPS run.lua script

Post by darkfrei » Thu Dec 10, 2020 3:50 pm

Hi all!

I've tried to make high UPS Löve run.lua script.

The updates per second will be about 200000; frames per second about 60.

You can move slider to change the UPS, also use arrow keys to move the agent. Lines move one-by-one pixel every updating, but yellow moves every new lap.
Attachments
2020-12-10T16_43_12.png
2020-12-10T16_43_12.png (41.05 KiB) Viewed 2605 times
high-UPS-06.love
(3.94 KiB) Downloaded 66 times

User avatar
Gunroar:Cannon()
Party member
Posts: 141
Joined: Thu Dec 10, 2020 1:57 am

Re: High UPS run.lua script

Post by Gunroar:Cannon() » Sun Dec 13, 2020 4:52 pm

High ups? As in ultra powered supply. I can't really test the .love file now but does it make love.run faster?
me: I don't always code but when I do it's done flawlessly.
also me:

Code: Select all

 function Gunroar:Cannon()
    for x, enemy in ipairs(self.allEnemies) do
        self:Cannon(enemy)
    end
end

Code: Select all

Lua Error: [file Gunroar.lua]:18: C stack overflow

User avatar
zorg
Party member
Posts: 3055
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: High UPS run.lua script

Post by zorg » Sun Dec 13, 2020 6:23 pm

updates per second, probably; disabling vsync and removing love.timer.sleep(0.001) from love.run would do that... not that that's a good idea.
Me and my stuff :3True 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.

User avatar
pgimeno
Party member
Posts: 2480
Joined: Sun Oct 18, 2015 2:58 pm

Re: High UPS run.lua script

Post by pgimeno » Sun Dec 13, 2020 6:37 pm

I think it's all about multiple updates per render. Which is a good concept for some things.

User avatar
darkfrei
Party member
Posts: 109
Joined: Sat Feb 08, 2020 11:09 pm

Re: High UPS run.lua script

Post by darkfrei » Sat Dec 19, 2020 6:43 pm

zorg wrote:
Sun Dec 13, 2020 6:23 pm
updates per second, probably; disabling vsync and removing love.timer.sleep(0.001) from love.run would do that... not that that's a good idea.
Why I cannot set sleep less than 0.001 s?

BEN1JEN
Prole
Posts: 1
Joined: Fri Apr 17, 2020 3:01 am

Re: High UPS run.lua script

Post by BEN1JEN » Sun Dec 20, 2020 1:45 am

Interesting, I actually wrote something very similar for this project I've been working on where I needed to get many inputs per second but wanted to keep the fps around 60.

Post Reply

Who is online

Users browsing this forum: No registered users and 23 guests