Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / Rain drops drawing algorithm (DBC/DBP)

Author
Message
Dodic
19
Years of Service
User Offline
Joined: 6th Nov 2005
Location: SNM (Serbia&Montenegro)
Posted: 7th May 2006 02:07
I called this rain drops drawing algorithm becouse it is suppost to simulate rain drops falling into the water, but it also makes a nice chrome effect.
(I`m studying making fractals and using/creating algorithms for a texture generation utillity)



This WILL run in DBC as well, but i do not really suggest it, becouse it`ll take a while untill you see the actuall result.


3Nigma
18
Years of Service
User Offline
Joined: 23rd Apr 2006
Location: RoManiA
Posted: 7th May 2006 10:08
nice effect dude... It looks great...

Knowledge belongs to the world...but not this time
Chris Franklin
19
Years of Service
User Offline
Joined: 2nd Aug 2005
Location: UK
Posted: 7th May 2006 14:11
Wow somwthing simple made something good nice work

Theme park simulator wip boards

Dodic
19
Years of Service
User Offline
Joined: 6th Nov 2005
Location: SNM (Serbia&Montenegro)
Posted: 7th May 2006 20:07
Thanks


Bob da reaper
18
Years of Service
User Offline
Joined: 25th Mar 2006
Location:
Posted: 12th May 2006 18:36
brilliant it's so simple

I pwn n00bs
Dodic
19
Years of Service
User Offline
Joined: 6th Nov 2005
Location: SNM (Serbia&Montenegro)
Posted: 13th May 2006 01:34
yeah simple, but complicated.

Sig. pics are only increasing the loading time of the threads, so why have them...
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 15th May 2006 13:24
I'll bet you can speed that up alot by using memblocks.

x1bwork
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 15th May 2006 15:45
lol, you gotta admire LiTs Code-Fu

Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 16th May 2006 01:15
I made a nice change to it:



Tempest - P2P UDP Multiplayer Plugin (DBP/DBCe) - 71%
Download the free version
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 16th May 2006 03:14
Cool I wonder why that code takes 2.7 secs on my fast machine at home and .5 secs on this slow work machine

Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 16th May 2006 04:03 Edited at: 16th May 2006 06:18
Yay it moves.



Quote: "I wonder why that code takes 2.7 secs on my fast machine at home and .5 secs on this slow work machine "

Different patches maybe?

Tempest - P2P UDP Multiplayer Plugin (DBP/DBCe) - 71%
Download the free version
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 16th May 2006 04:15
Same patches. Probably due to my hyperthreading processor limiting DBP to 50% usage at home I guess.

Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 16th May 2006 06:15
Ouch. That's irony for you.

Tempest - P2P UDP Multiplayer Plugin (DBP/DBCe) - 71%
Download the free version
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 16th May 2006 10:10
Oddly enough still the memblock version of that code runs the same speed as the dot version on this machine as well. The memblock is way faster on my machine.

Back on track though, Dodic you better pull a rabit out of a hat or something. Benjamin is winning LOL.

Dodic
19
Years of Service
User Offline
Joined: 6th Nov 2005
Location: SNM (Serbia&Montenegro)
Posted: 17th May 2006 12:34 Edited at: 17th May 2006 12:38
Quote: "Dodic you better pull a rabit out of a hat or something. Benjamin is winning LOL.
"


Winning what ? LOL, but yes, if anyone actually thinks that this algorithm...at least looks...nice, then i guess i`ll come up with a few more algoriths, sence it is for my texgen app, i`ll go for some "earthy" algorithm, and well, other algorithms i need for my app, though there will be many...algorithms before i get it right (the terrain one), so when i get something funny, or at least something that i think looks nice, i`ll post it.

p.s. nice "move" there, lol

edit :
Quote: "Cool I wonder why that code takes 2.7 secs on my fast machine at home and .5 secs on this slow work machine "
It takes about 0.5-1 sec with the dot sistem on my machine...

p.s. A n00b question, Benjamin, when you added "lock pixels - unlock pixels" what does it actually do ? i mean it calculates it somewhere and then shows it i guess, but do you get faster calculation with it ?

Sig. pics are only increasing the loading time of the threads, so why have them...
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 17th May 2006 12:42
Yes it make 2d drawing much faster. Check out the help files and example and you can write some pretty fast 2d stuff.

Quote: "LOCK PIXELS

This command will lock the current bitmap for faster reading and writing of visual data. Rather than use DOT and POINT to manipulate pixel data, use this command in combination with GET PIXELS POINTER to write directly to the memory storing the visual data."


Login to post a reply

Server time is: 2024-11-23 03:35:10
Your offset time is: 2024-11-23 03:35:10