Posted on 2003-11-01 19:12:42 by bitRAKE
The fireworks is pretty neat... but i find it crashes if i hit the full-screen button.. :(
Posted on 2003-11-01 19:38:23 by NaN
Yeah, the window can only be so big - will work 1024x768.
Let us look for the error in the code...



Why is ExitThread used and TerminateThread is not used? And the sleep functions should not be needed if the threads are created from within the window create message and the thread is waiting on the window to reply to another message.

...but the following is most certainly the problem:
    invoke HeapAlloc,hHeap,HEAP_ZERO_MEMORY,2359296

add eax,4096 ; blur: -1'th line problem
mov bitmap1,eax
invoke HeapAlloc,hHeap,HEAP_ZERO_MEMORY,2359296
2359296 = 768*1024*3 :grin:

I think this program can be re-wrote without threads, or better communication between threads is needed - using constant sleep times and assuming the state of the threads is not a good idea.
Posted on 2003-11-01 19:48:11 by bitRAKE
This version will work up to 1280x1024 and doesn't use threads. On my machine this version is faster on small windows, but the same speed on large windows. Wonder if it would help any to send paint messages to the window rather than using SetDIBitsToDevice outside the WndProc?
Posted on 2003-11-02 10:12:16 by bitRAKE
Hehe

Well almost the same kind of effect is used in HE to show slpash damage explosions on top of ships
Different parameters/color palette and no MMX but the idea is the same: generate some particles and then blur them while they move in gravitational field
Posted on 2003-11-02 10:57:35 by BogdanOntanu
For example this is what i did for my little girl's birthday (she had fun with it)
(press 3 to generate explosion)
Posted on 2003-11-02 11:01:24 by BogdanOntanu
BogdanOntanu, it did not work. Black screen then back to desktop.
Posted on 2003-11-02 11:15:57 by bitRAKE
Ooops,
Added the "needed" bitmaps, sorry forgot to include them in above post
Posted on 2003-11-02 11:26:20 by BogdanOntanu
I was not very polished just something fast to show my little girl at her birthday "demo" party :grin:
so:
- press "3" to generate a random explosion
- there is an atractor in the scene :grin:
-press PageDown to see speed actually render time in microseconds
so 20.000=50fps,10.000=100fps, 5.000=200fps

i can not recall what other options are available
source code is too much dummy/quick hacked but i guess i could arrange it an post if anybody is interested
Posted on 2003-11-02 11:30:57 by BogdanOntanu
BTW...
Does this version work?
Posted on 2003-11-02 11:49:12 by BogdanOntanu

BTW...
Does this version work?
Yeah, works now. A bit more than a fire. After pressing PageDown it read 1999 and then started rising...up to 2200+ getting slower each time...
Posted on 2003-11-02 13:30:04 by bitRAKE
Wow? what PC do youu have (and what monitor refresh rate?)
2000 is approx 500fps :grin:

I hardly got 10 fps on a P1133Mhz -- that is why i reduced the size of the effect
Should i make a more parametrized one running in window? like the effect presented here first?
Posted on 2003-11-02 13:55:19 by BogdanOntanu
I also think this should be on the Games section?
or de we need a small demo scene section :-?
Posted on 2003-11-02 13:57:15 by BogdanOntanu
Should i create a tool to make such effects with many parameters like:
-number of particles,distribution,life time
-gravitation,
-blur methods,
-attractors,
-color palletes

And then save them as a movie/sequence of bitmaps?

Anyone interested ?
Posted on 2003-11-02 14:12:44 by BogdanOntanu

I was not very polished just something fast to show my little girl at her birthday "demo" party :grin:
so:
- press "3" to generate a random explosion
- there is an atractor in the scene :grin:
-press PageDown to see speed actually render time in microseconds
so 20.000=50fps,10.000=100fps, 5.000=200fps

i can not recall what other options are available
source code is too much dummy/quick hacked but i guess i could arrange it an post if anybody is interested


hey thats cool!

All I saw on my PC when I pressed PgDown was a number that was constantly increasing and another number below it that remained at zero.

Please post the source, nice effect :D
Posted on 2003-11-03 18:55:00 by x86asm
what about making a screensaver out of the exe... it would look really nice on my screen :)
Posted on 2003-11-04 06:32:41 by beaster
Gee.. that looks awesome. Is there any beginner tutorial on this graphic topic? I suppose this one does not use dx or opengl? I dont wanna go too deep into all this, but I would love to have a little window in my "about dialog" with some cool animation like this one. Pretty amazing.
Posted on 2003-11-04 19:56:05 by Mikky
nice work, Bitrake :) ought to make comtrails coming up..
Posted on 2003-11-06 09:53:18 by drarem

nice work, Bitrake :) ought to make comtrails coming up..
Oh, no - it is not my work. I only move some code around to get rid of threads - nothing more. Here is the author. I will think about the feature, but I am already thinking of a whole new program (spinning, multicolor flares, smoke). I have always liked the fireworks programs - even the original Mac screen saver.

Mikky, check out the demo scene - there are tons of tuts on graphics. Tuts from the old hornet archive are the best for beginers, imho.

beaster, should be fairly easy to do...
Posted on 2003-11-06 20:31:05 by bitRAKE