Best way to cache/preload images and other assets for later use?

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
ivan
Party member
Posts: 1911
Joined: Fri Mar 07, 2008 1:39 pm
Contact:

Re: Best way to cache/preload images and other assets for later use?

Post by ivan »

grump wrote: Wed Nov 22, 2017 11:52 pm OP is specifically asking about loading a bunch of images at the start of the program, not about loading in the background. Frame rate is irrelevant.
True, as long as there is no input and nothing moving on the screen (like I said, a static splash screen).
In that case, you don't need threads or coroutines at all.
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

Re: Best way to cache/preload images and other assets for later use?

Post by Nixola »

You still need coroutines if you want to be sure the OS knows the program is still responding.
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
grump
Party member
Posts: 947
Joined: Sat Jul 22, 2017 7:43 pm

Re: Best way to cache/preload images and other assets for later use?

Post by grump »

ivan wrote: Thu Nov 23, 2017 12:34 am In that case, you don't need threads or coroutines at all.
My OS shows a "Program is unresponsive. Force quit?" dialog if the program is in a busy loop for a while and the window does not process its message queue. I think Windows does this too.
Post Reply

Who is online

Users browsing this forum: No registered users and 55 guests