i've seen many sources on how to code one in DOS.
but none how to code one in win32asm.
what's the best way to do this? i want to have the water drop effects on a DC. should i use setpixel(v) and getpixel to get this done? any ideas?
NO
DO NOT USE SetPixelV...its too much slow...
Do it like this:
make the effect into an system memory array
get the pixels from a DC bitmap into an array
apply the effect on top of the pixels
write the pixels back to the DC
Alternatively you can use DirectDraw to directly modify pixels on a system memory surface...like i did in my RTS Game Intro screen
hi
BogdanOntanu:
u said u wrote
RTS Game Intro screen
can u give me the source for using the direct draw???
if u can please send it to my email
Seems alot of people are using the pixel plotting functions.
Way to slow, use Getbitmapbits and SetBimapbits functions to
manipulate the data, then Bitblt it to the window.
If Using DirectDraw then learn GetlockedArray Method.
Look at the other post DirectDraw for a wealth of websites
to get started.:)
Hi eko
Nope i cant give you the source code...its too much combined with the game code itself...getin it out...will be a pain in the ass...
But i will write some demo/tutorials about fire/watter routines that will be open source and free of course (others have asked it)...so please be patient and wait a little...
If you cant wait,..well i dont think that converting the old DOS style examples on the HORNET archive can be very difficult...
Just DONT go for new DX8 Methods they are ...so slow...also..
Just get a IDirectDrawSurface4 or so interface (DX6 or DX7 are still there inside DX8 :) ) and use the Lock() and Unlock() methods to get a pointer to that pixels...
PS..take care at lPitch...and..and...yeah...make them SYSTEM MEMORY surfaces ...NO VIDEO Memory...because reads from VIDEO MEMORY are damn slow (100x slower :( even now i wonder why...)
also take some time to tweak the parameters...fire and watter routines change looks a lot on parameters :D
the rest should be a "piece of cake"
Hello Treepwood (Guybrush, is that you? :D ),
returning from LeChuck to ASM and programming I have to say that I am the "owner" of a raindrop source. It is written in Delphi *yack* and uses DirectX 6 (I think) but if you are good in ASM and know Delphi (or TP, as Delphi is based on/developed from TP) then you will be able to translate it.
Download
Normally I don't link directly to files on my server but now I think that it is okay.
HTH
Stefan
yes, after i defeated LeChuck i wanted to be a win32asm coder :D
thanks for your source, i think it can help me alot.
i'm also looking forward for BogdanOntanu's demo/source/tuts about fire/water effect..
thanks for the replies mateys :)
Go and download the winpool.asm file from Bizarre Creations at:
http://bizarrecreations.webjump.com
It contains MMX-optimized code to implement good old water-drops effect!!