Re: Falling Speckles Exercise
- Posted by James Powell <Wizard at DJO.COM> Apr 25, 1997
- 870 views
--=====================_861989419==_ >---------------------- Information from the mail header ----------------------- >Sender: Euphoria Programming for MS-DOS <EUPHORIA at >MIAMIU.ACS.MUOHIO.EDU> >Poster: Matt Sephton <u5ms at CSC.LIV.AC.UK> >Subject: Falling Speckles Exercise >------------------------------------------------------------------------------- > >I've made a small falling speckles demo, which look sort of like snow. >The speckles fall down the screen and build up on any text or whatever. > >I think that it would be a good exercise for those on the mailing list >to see who can come up with the best attempt at putting some sort of >speed limitation into the program. My P166 can manage a huge number of >speckles but lesser computers cannot. > snip >Matt Sephton >-- Actually, i wanted to speed it up :). I had the bright idea of using a virtual screen to perform all the operations on, and then mem_copy it to the VGA. And it works, sort of. The problem is, its slower (currently), and a bit buggy (the snow falls THROUGH things rather than building up!). However, those problems can be fixed. The REAL problem, however, is that it runs fine for 10 only seconds or so. Within that 10 seconds, if the user hits any key, the program exits. Good, thats the way its programmed. BUT, if it is allowed to run longer than that, everything still LOOKS normal, ie. the snow falls (eating as it goes) until a key is pressed. As soon as the key is pressed, the program terminates abnormally, generating a Causeway protection fault (or similar)!! I cant figure out why, so im sending the code and a CS.ERR file. Hopefully someone can spot the bad section of code. James Powell --=====================_861989419==_ x-mac-type="705A4950"; x-mac-creator="705A4950"