Jump to content

Wait or Sleep command


AggrorJorn
 Share

Recommended Posts

I want to display an intro splash screen that lasts for 5 seconds. In those 5 second the application should have enough time to load the main menu.

 

You shouldn't use sleep then, because it will stop the app from loading (unless you're multithreading)

I think you need to use Apptime() and calculate the amount of time passed.

desktop: Quad core Q6600 + 4GB + ATI HD4890 + XP

laptop: Dual core T6400 + 4 GB + NVidia 9600M GT + Vista 32

Link to comment
Share on other sites

couldn't you just load the splash screen (assuming its a 2d image), load the main menu, then at the end of loading all of the menu items, remove the 2d splash screen... you would not need a timer... or just use two timers; one that gets set when you first display the splash screen, and one that is constantly updated in an update loop.... when the difference between the two timers is greater than 5 seconds, remove the splash screen...

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

Thanks for your replies.

The waiting command with os.clock is indeed not the thing I need, since it pauses the entire app (as well as loading assests.)

 

The thing I am trying to avoid is the dos loading screen. If I can start me game fullscreen with just an image, the dos box is almost emidiatly skipped. Then, while th fullscreen image shows a logo or something, the program can start loading the assets.

 

This approach works okay but 1 thing is still not correct. It takes the program a couple of seconds to display the fullscreen game. That means that the assests already start loading even before the game is fullscreen: creating a longer dos box.

 

What I could do is wait a couple of seconds untill the programm is completely fullscreen with an image and then start the assets loading.

Link to comment
Share on other sites

well, if you use c# to make an executable to run your program, would you need to even worry about it? I am incorporating lua into a bmx program and when done like that it doesn't show the command window. I had tried at one point using vbscript to run the command window as invisible but it unfortunately also ran the LE graphics window invisible as well :)

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

I had tried at one point using vbscript to run the command window as invisible but it unfortunately also ran the LE graphics window invisible as well :D

lol.

 

I was thinking of a function like this (pseudo code)

 

function Wait(seconds)
local Timer = CreateTimer()
while newTimer <= seconds do
        --do some waiting or just nothing at all
end
end

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...