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 / Unpredictable Worm

Author
Message
skovron
20
Years of Service
User Offline
Joined: 14th Sep 2003
Location:
Posted: 13th Oct 2003 22:06
Here's very simple program generating unpredictable effect

The idea is simple:
1) put some worm in center of the screen
2) increase color value (grey intensity in this case) on this point
3) take new worm direction from table
4) move worm to new location
5) repeat the algorithm

the table (program) has 2 dimension dim(255, 7) and it stores worm directions 0 up, 1 up-right, 2 right, 3 down-right etc..
so for every color value and current worm direction we can establish new direction

but to find out equation that generates some nic-looking effect is not so easy

There are 5 effects currently (key 1 - 5)



there is function CreateWormProgram() which 'controls' worm behavior. there you can add your own equations.

please if you'll find out some nic-looking effect snipp it here

P.S. sorry for my english. if dont understand somethig ask, and i'll try to answer as far as I can
skovron
20
Years of Service
User Offline
Joined: 14th Sep 2003
Location:
Posted: 14th Oct 2003 01:53
Ok heres updated version with new 6th effect

and one more thing: observe it for some time couse it's rather boring from the beginning but then it changes the way you've never though

skovron
20
Years of Service
User Offline
Joined: 14th Sep 2003
Location:
Posted: 14th Oct 2003 02:42 Edited at: 14th Oct 2003 02:45
And one more update.
Includes 12 effects (programs)
keys are 1,2,...9,0,q,w

enjoy!

D Man
21
Years of Service
User Offline
Joined: 3rd Oct 2002
Location: Germany
Posted: 14th Oct 2003 14:54
Nice effects .

God is real, unless declared integer.
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 15th Oct 2003 08:13
i like the last effect. the first one, if ran for a minute, looks like carpet with a bump map if you stand far away. How'd you come up with the equations?
skovron
20
Years of Service
User Offline
Joined: 14th Sep 2003
Location:
Posted: 15th Oct 2003 14:25
the equations are totaly random i just write some and test it thats all. with most equations it generates straight flashing line or dot or it iterates for smoe (short) time and then it ends with flashing dot in some place

here is new version:
keys 1,2,..,9,0,q,w,e,..,o,p

Xanatus
21
Years of Service
User Offline
Joined: 15th Mar 2003
Location: Germany
Posted: 15th Oct 2003 23:41
very impressive

Login to post a reply

Server time is: 2024-05-03 00:53:59
Your offset time is: 2024-05-03 00:53:59