xor eax, eax




Ø main()
Ø fireworkx
Ø amp
Ø gallery
Ø feedbacks
Ø about




ronybc.com
45.113.122.52



flag counter

Fireworks



Fireworks Simulation Screenshot



Fireworks simulation MMX


Fireworks MMX is a simple free EyeCandyware, a small software which does some cool graphics on your computer screen. It actually is a light-weight pyrotechnics simulation program. The code was initially developed in C++ and later adopted to 32bit assembly language, you can find full source code of the program at the bottom of this page. The basic design idea of the simulation is as follows. A FireShell is collection of FirePixel's each having its own random assigned x-velocity and y-velocity. The exploding point of the shell will be the initial position for all FirePixels in it. The air resistance and gravity affects velocity of each FirePixel as it moves away from the explosion point. Pixel velocity is the displacement of pixel per frame.

Linux version

The explosions may be called 'particle system based'. Actually.. while coding the first fireworks I was not aware that it is called particle system programming. And being proud of myself :) that I did it long before knowing about the actual particle systems, even before I get access to internet. The original program was created using Borland Turbo C++ for MSDOS. I did it part of my hobby programmings, without having any idea to upload it to the web..!

In the C++ code, Object Oriented Programming is implemented by creating an array of FireShells(class) with functions such as launch, explode, draw, recycle ..etc, attributes like color, power, age, ..etc and an array of FirePixels which is a data structure consisting x and y coordinates and velocities. Function 'ExplodeAG' undertakes the task of moving these FirePixels across the night sky obeying the laws of gravity and atmosphere. After the explosion the FireShell-life starts to tick down. As it extinguishes the object is recycled to create a new shell with different (random) qualities and fires it up again to the sky. FireShell is the most interesting C++ object i ever had to code..! It never bores me, because it explodes..! Those real world fireworks are sure my favorites. I go wherever i can to see it. Luckily there is a lot of temples and festivals around my place.

The Win32 version of the program is done using MASM32, with some enhancements. The source code is poorly commented. Even though it helps easy understanding how to handle DIBs (Device Independent Bitmaps) in Windows GDI programming with MASM32.

The smoke is created by adding blur effect. It is a raster type processing of pixels, scans through the entire bitmap in x and y axis's, replacing each pixel with the average of it and average of surrounding ones. So requires vast amounts of cpu cycles and memory access. After many days of optimization (still feels there is a better other way..!) and learning all those intel pdf's the program now uses MMX instruction set with which r, g and b values of each pixels can be processed simultaneously. It is possible to upgrade the engine with intel SSE and AMD 3DNow! instruction sets. That 'prefetch' instruction can improve blur speed. Unfortunatley I don't have the required hardware, happy with my 333MHz Celeron(PII core). I've got 15fps at 580x420(default) here on my SiS315, please let me know which hardware you're using there and the 'fps', on my guestbook.

The program is also intended to explore the power of modern microprocessors. The frame rate reasonably varies between different system configurations of µP's, RAM types, motherboard chipsets and display hardwares.

Actually it is this firewrks, wish to see that old DOS program in a window, lead me to learn 32bit assembly and Win32 API programming... even 'how to code vxds' from the net ;) Thus after the DOS era now it runs on Windows GDI. Using hardware acceleration (DirectX or OpenGL) is a good idea. But for a hobby programmer like me, coding it by hand is more interesting. There is no fun to code 'put that there like that'.

I'm continuing experimentations with more powerful and colorful chemicals..! So keep coming back to this site for downloading the latest version of fireworks.

Right-click HERE to download the most Powerful Assembly Optimized Free Fireworks Simulation Program having MMX Blur and Light effects


Win32 ASM Source Code (MASM)

Previous C++ code & MS-DOS Executable : download

Also see the Linux version of fireworks (LATEST)


Copyright 1999 - 2011 Silicon Fumes Digital Distilleries. All Rights Reserved.
NAVIGATION PANEL:

Ø Parallel Resistance Calculator
Ø Voltage Divider Calculator
Ø LM317 Calculator
Ø Volume Control Pot with Parallel Resistor Graph tool
Ø Power Dissipation Across Transistor/MOSFET
Ø Display PPI Calculator
Ø Blogandrum - The Complete Conundrum
Ø The Eight Queens Puzzle
Ø Fireworkx : Linux version
Ø Kunthrantum - very low distortion audio power amplifier
Ø Creative AudioPCI soundcard mods (Ensoniq ES1370, AK4531)
Ø Buffered Flash memory access routines for PIC microcontrollers
Ø Fireworks : Windows version, coded using Win32 ASM
Ø SparcZ - tiny telnet server with remote desktop administration powers