Does anyone have a turtrial for a loading screen

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
hellfiresage
Prole
Posts: 49
Joined: Tue Feb 10, 2009 6:07 pm

Does anyone have a turtrial for a loading screen

Post by hellfiresage »

was wondering if anyone could make one if there isnt one. thank you
User avatar
zapwow
Prole
Posts: 48
Joined: Fri Oct 24, 2008 11:37 pm

Re: Does anyone have a turtrial for a loading screen

Post by zapwow »

I don't understand this recent fascination with loading screens... are you actually loading something that would take so long as to cause the user to question the functionality of your program, or do you simply want to add a bit of flair to make your project look important?

... kinda reminds me of someone who will pretend to take calls on his cell phone to make it look like he has friends.

Anyway, philnelson made one that you could take a look at. Just download the .love file, rename to .zip and extract to view the source code.
hellfiresage
Prole
Posts: 49
Joined: Tue Feb 10, 2009 6:07 pm

Re: Does anyone have a turtrial for a loading screen

Post by hellfiresage »

ok thats not what i wanted. i wanted to no if there is one where it will show a progress bar.
User avatar
Kaze
Party member
Posts: 189
Joined: Sat Jul 19, 2008 4:39 pm
Location: Dublin, Ireland

Re: Does anyone have a turtrial for a loading screen

Post by Kaze »

hellfiresage wrote:ok thats not what i wanted. i wanted to no if there is one where it will show a progress bar.
It's clear that you don't know much about programming, so I'll just go ahead and tell you: You don't need a loading screen, or a progress bar. It will be completely useless for your project.
lbhoward
Prole
Posts: 23
Joined: Tue Feb 17, 2009 6:12 pm

Re: Does anyone have a turtrial for a loading screen

Post by lbhoward »

Technically you could emulate a loading bar, although it would not represent just what has been loaded. From what I understand the LOVE engine streams music/sounds as they are requested to play - so I could not see any hope for your code to ask 'is everything loaded' for it then to 'draw loading bar'.

You could however, do this.

Code: Select all

function load()
loadingsplash = love.graphics.newImage("graphics/loadingsplash.tga")
loadingsplash:setCenter(0, 0)

isloadingtrue = 1
end

function update(dt)
time = love.timer.getTime()
end

function draw()

if isloadingtrue == 1 then
love.graphics.draw(loadingsplash, 0, 0)
love.graphics.rectangle(100, 100, time, 10)
end

if time >= 100
isloadingtrue = 2
end

if isloadingtrue == 2
-- input the relative code that pushes to your next coding (your level/menu)
end

end

this code was very quickly done, I have not checked it for errors and I do not intend to, you should get a rough idea of just how this work. The rectangle we draw has a width of 'time'. Time is going to climbing from 1 to 100 - when it reaches 101, the splash and rectangle are no longer shown. What this will achieve in theory, is a bar which gradually stretches to 100 pixels. Correct me if I'm wrong here.

Quite honestly, it's not worth the time, and it complicates things for those who do not quite understand LUA or the LOVE engine.

I personally will be using this for one of my projects, purely because it is a college assignment, and it demonstrates loading screens which is required to achieve the highest possible grade for the said assignment. For a hobby/personal game/project it's only worth it learning purposes, and barely worth that.
hellfiresage
Prole
Posts: 49
Joined: Tue Feb 10, 2009 6:07 pm

Re: Does anyone have a turtrial for a loading screen

Post by hellfiresage »

thank you very much im a begginer at programming an my game does need alot of progress bars you might not nderstand right away i will show you the game when it is done.
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 50 guests