Any ideas on how i would fix this, because i kinda need to have data set to the shapes...
Is there maybe a hidden doc. for it? Would like to look into itbartbes wrote:With the difference that love.thread already exists.
Is there maybe a hidden doc. for it? Would like to look into itbartbes wrote:With the difference that love.thread already exists.
It's nice for when you're doing downloads or huge resource loading while playing music or animations.Jasoco wrote:Also, why do we need loading screens? I haven't had any loading time on any Löve project I've worked on to even justify needing a load screen. The only time I did see a load screen was in that super-cool file downloading project that would show a "downloading" progress bar while it downloaded a file. Super cool. That one worked in a way where it would call the love.graphics.present() function inside the loop that handled downloading. So every frame it would download a little, then update the screen to draw the progress.
Well, it's how the love.run() function works. If you write your own love.run() (Which I do) you will see that you have complete control over everything including graphics.clear, graphics.present, timer.step, what gets passed as the dt variable... (timer.getDelta()) Complete control. By calling drawing and present and other important functions during a long loop you can take away the inconvenient pause you sometimes get when it gets stuck in a loop for a while.Luiji wrote:Well the love.graphics.present() idea is ingenious!
Code: Select all
variable = {}
for x=0,10000 do
varable[x] = {}
for y=0,10000 do
variable[x][y] = stuff
end
end
Code: Select all
local titi = love.timer.getTime()
love.graphics.clear()
local maxLoop = 100000
local tmp = {}
local tmp2 = 0
local progStep = 100
for x=0,maxLoop do
tmp[x] = math.random(1,1000)
if tmp2 >= progStep then tmp2 = 0 end
if tmp2 == 0 then
dt = love.timer.getDelta()
love.timer.step()
love.graphics.setColor(100,100,100)
love.graphics.rectangle("fill", 100, 100, maxLoop/200, 30)
love.graphics.setColor(255,255,255)
love.graphics.rectangle("fill", 100, 100, x/200, 30)
love.graphics.setColor(0,0,0)
love.graphics.print(x.." of "..maxLoop, 106, 122)
love.timer.sleep(1)
love.graphics.present()
end
tmp2 = tmp2 + 1
if love.event then
for e,a,b,c in love.event.poll() do
love.handlers[e](a,b,c)
print(e, a, b, c)
end
end
end
print(love.timer.getTime() - titi)
Users browsing this forum: Bing [Bot], Google Adsense [Bot], Semrush [Bot] and 4 guests