Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Create an ACTUAL loading screen
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Jeffmagma




PostPosted: Sat Jan 09, 2016 3:06 pm   Post subject: Create an ACTUAL loading screen

So the ISPs are here, and everyone is trying to make their program fancy, to get marks and such. I have a lot of friends that have very simple programs, and have a fake loading screen that just makes you sit through and wait. However, my program is relatively complicated, and takes around 5 seconds to load up each time. How would I create a loading screen? I had thought of using a process to run while everything else "loads" and using a boolean to tell when the program starts, but it seems like processes are very disliked here.
Sponsor
Sponsor
Sponsor
sponsor
Zren




PostPosted: Sat Jan 09, 2016 3:32 pm   Post subject: RE:Create an ACTUAL loading screen

What is slowing down loading? Use var t1 := Time.Elapsed() to find out when a specific thing starts and ends. Eg:

Turing:

var t1 := Time.Elapsed()
for i : 1 .. 100000
end for
var t2 := Time.Elapsed()
Time.Delay(1000)
var t3 := Time.Elapsed()

% Done Loading
put "Long for loop took ", t2 - t1, "ms"
put "Delay took ", t3 - t2, "ms"
put "Loading took ", t3 - t1, "ms"
Insectoid




PostPosted: Sat Jan 09, 2016 6:52 pm   Post subject: RE:Create an ACTUAL loading screen

It's not that we dislike processes, but they cause a lot of problems when new programmers inevitably use them incorrectly.

What is a loading screen? It's just a picture or an animation. When something finishes loading, update the animation.
Jeffmagma




PostPosted: Sun Jan 10, 2016 11:50 am   Post subject: Re: Create an ACTUAL loading screen

I think it's the procedure and variable declarations that are taking a lot of time, I put a Time.Elapsed right after most of them. The stuff inside the other included files are just variable and procedure declarations.


elapsed.png
 Description:
Takes a while to declare variables and stuff
 Filesize:  59.82 KB
 Viewed:  2608 Time(s)

elapsed.png


Jeffmagma




PostPosted: Sun Jan 10, 2016 8:07 pm   Post subject: RE:Create an ACTUAL loading screen

I added one of the Time.Elapsed to every time i created a variable, and found out that the culprit was my 10,000x5,000 background image, taking around 4 seconds to load
Nathan4102




PostPosted: Sun Jan 10, 2016 9:22 pm   Post subject: RE:Create an ACTUAL loading screen

Oh boy, yeah that'd do it. That's a high enough resolution to display on a 2*2 array of 4K televisions without any up-scaling. :p
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 6 Posts ]
Jump to:   


Style:  
Search: