This site requires JavaScript, please enable it in your browser!
Greenfoot back
GMagician
GMagician wrote ...

2015/7/22

PreLoading

GMagician GMagician

2015/7/22

#
I was wondering if it was possible to add a preloader into greenfoot, i know how to add a gif and would use one as the preloader but not sure how to make the gif stop when the game is loaded.
wabuilderman wabuilderman

2015/7/22

#
So you mean like a progress bar or something? What exactly do you mean?
gulzaibthegreat1 gulzaibthegreat1

2015/7/22

#
exactly what i mean, a simple progress bar which shows how far the game has loaded or a simple loading gif which loops until the game is loaded
wabuilderman wabuilderman

2015/7/22

#
Well, first of all, how do you want to implement the GIF? It might just be better to have a series of images separate and then have a piece of code animate them. In that case, its as simple as stopping a loop. If you are wanting to know how to make it actually matter, what you do is you load your stuff in chunks. i.e. Textures, audio, etc. After each thing is complete (once they are not null), then stop animating the GIF. I don't know how you are implementing the GIF, so I can't tell you how to stop it.
gulzaibthegreat1 gulzaibthegreat1

2015/7/23

#
how would i load stuff in chunks?
wabuilderman wabuilderman

2015/7/23

#
Well it should be simple if you are actually loading files. If you aren't doing any i.o. stuff, then you don't need a loading screen.
You need to login to post a reply.