News : The level of daily SPAM has reached insane proportions, all registrations are now manual. I ask you to send me an e-mail (john (at) murga (dot) org), to confirm that you want me to create an account for you.


Post Reply  Post Thread 
(very) basic slideshow
Author Message
mikshaw
Senior Member
****


Posts: 522
Group: Registered
Joined: Apr 2007
Status: Offline
Reputation: 5
Post: #1
RE: (very) basic slideshow

The timing is a half-baked hack, which still needs work or replacement
Originally it used socket.sleep() only, but every event, including exit, had to wait the length of the sleep time before performing.

I suck at math, so most of the stuff I do is based on a more abstract, maybe visual, approach.
The math.* functions are jibberish to me.

Currently it uses os.difftime within a function to see if the pause duration has passed. If not, it simply repeats the function. The initial test was a miserable failure (crash), so i stuck in a 1-second sleep for each run of the function. This way, no matter what the pause time is, events have only to wait that one second.

This is a pretty crappy method, though. As soon as I did it I noticed a huge performance hit and some odd behavior, but it did reach my temporary goal of getting (mostly) rid of the delay in events. It will likely be totally rewritten the next time i play with it.

06-25-2007 11:17 AM
Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

Messages In This Thread
(very) basic slideshow - mikshaw - 06-24-2007, 08:55 AM
RE: (very) basic slideshow - mikshaw - 06-24-2007, 12:53 PM
RE: (very) basic slideshow - mikshaw - 06-25-2007, 05:02 AM
RE: (very) basic slideshow - iGame3D - 06-25-2007, 08:13 AM
RE: (very) basic slideshow - mikshaw - 06-25-2007 11:17 AM
RE: (very) basic slideshow - mikshaw - 07-03-2007, 04:57 AM
RE: (very) basic slideshow - iGame3D - 07-03-2007, 09:28 AM
RE: (very) basic slideshow - mikshaw - 07-03-2007, 12:56 PM
RE: (very) basic slideshow - mikshaw - 07-06-2007, 06:29 AM
RE: (very) basic slideshow - mikshaw - 07-16-2007, 12:06 PM

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: