----------------------------------------------------

Pyro 32 Screen Saver 1998, written by Steven De Toni

----------------------------------------------------


Sick of boring screen savers that do basically nothing except display

dumb pictures. Want something with action, spice, look sexy and be the 

drewly of your work mates, then this could be what you are looking for...


Pyro has been a play and learning tool for my windows programming, and has 

grown a little in detail and ALOT in speed since my first Windows version in

1996. This version breaks alot of barriers of the original 16bit version:


16bit                                32bit

--------------------------------------------------------------------------

Limited memory model                 Takes as much memory as it needs

means limited number                 from the system. But it is important

of fireworks on                      to limit memory consuption to the

screen.                              amount of physical RAM you have

                                     in your system.


All drawing was through the          All drawing is directly into video

operating system. Needless           RAM using Direct-X. My implementation  

to say this was slow.                is quite fast, but could be faster...

                                     

Used fixed point calculations.       Improved fixed point calculations by

                                     about 200% at least, and extensive use 

                                     of math lookup tables.

                                     

Update using timer tick              Use of threads, and screen updates

windows messages,                    calculated to ruffly 60 fps or 15ms.

about every 50ms                                     

                                     

Sinus graphic algorithm in           Left this stuff out due to 

preferences screen.                  limited time available.

                                     

All in all this version can do quite alot on screen with a fairly 

decent processor (e.g. pentium 75 and above). This screen saver was 

developed on a Cyrix 166 with 24MB RAM using Borland C++ Builder.

                                     

                                     

Installation

------------


Copy the following files into your Windows main 

directory:


pyro.scr

fire.wav

explode1.wav

explode2.wav


Now go into the screen saver preferences and select this

screen saver and start playing.



Experiment with high number flares in rockets for spectacular effects

(e.g. 5000 to 10000). Also limit the number of rockets on screen as 

they tend to produce chaos which spoils the whole effect of the screen

saver. 


Maths

-----

All math is calculated in 2D so all firework explosions explode outwards

and towards the user (you). I'll maybe get around it changing to 3D ...

some day :-)


Speed

-----

All the calculations are done using integers, so they ware calculated as 

fast as possible whether you have an FPU or not. Since most memory allocated 

will be contiguies, cache hits for memory access on objects will be high 

(i.e. a flare object on screen), plus there is fairly small execute loop size 

so this should also sit well in the cache. If your system is 

multi-processor then the separate thread should take 65-70% of the CPU 

load insteed of the usual 100%.



Enjoy...


Regards,

Steven De Toni


p.s. Needless to say this program is freeware, mail it to your

     friends...

     

Suggestions to steven@waikato.ac.nz, and I have time I'll

see if I can put them in.

