Page 1 of 1

SIMPLE Loading Screen?

Posted: Sun Mar 20, 2016 5:29 pm
by Greninjask
First time poster here,

I have a good prototype for my game, and I'm testing it out on mobile. Unfortunately (at least with my Android phone) there is a 3-4 second loading time, and during this time, the screen is just black. Is there a way for me to add a simple loading screen during this short interval? All I really want to do is just display the text "Loading, please wait", or maybe an image, so the user would know that the app is actually doing something instead of just staring at an empty screen.

Thanks in advanced for any help!

Re: SIMPLE Loading Screen?

Posted: Sun Mar 20, 2016 6:38 pm
by ivan
The way I approach this is by displaying a splash screen.
Basically I draw an image, then I load fonts, lua files and sfx.
One everything is loaded up, I do a transition effect.

The loading routine could be simplified to:

Code: Select all

local queue = { "1.lua", "2.lua", "3.lua" }
function love.update(dt)
  local q = table.remove(queue)
  if q == nil then
     return -- done loading
  end
  -- if _ext == '.lua' then
    dofile(q)
  -- end
end
PS. Sure you can use threads but what's the point if you're splash screen is static?

Re: SIMPLE Loading Screen?

Posted: Mon Mar 21, 2016 1:13 am
by pgimeno
You can also draw something in love.load (or even in main, before any requires) and then call love.graphics.present() before you start loading other things. I think you need to call love.graphics.clear() before drawing anything.