Closed Thread Icon

Preserved Topic: April JavaScript contest - Graphic creation in 20 lines - entries (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=21316" title="Pages that link to Preserved Topic: April JavaScript contest - Graphic creation in 20 lines - entries (Page 1 of 1)" rel="nofollow" >Preserved Topic: April JavaScript contest - Graphic creation in 20 lines - entries <span class="small">(Page 1 of 1)</span>\

 
wrayal
Bipolar (III) Inmate

From: Cranleigh, Surrey, England
Insane since: May 2003

posted posted 04-12-2004 21:26

The aim of this is to create the most impressive program you can in 20 lines that has something to do with the creation of graphics. You have until Midnight, 30th April, to submit your entries to this contest. This is only friendly, and will be judged by any members of the asylum who wish to contribute. The "winner" will set the theme for the next contest.
Some important rules:

1. Function's declaration doesn't count as one line.

ie
function mine() {
alert("Hello")
}
would only count as one line!

2. Comas are forbidden when they can be replaced by a semicolon.

ie If the comma can be replaced with a semi-colon and a line break and still have the exact same effect, then you're not allowed to use the comma.

Post your entries in this thread!

And, of course, good luck to everyone!

Wrayal

Go to kimber-ja.demon.co.uk and click on the link to the raytracer!

wrayal
Bipolar (III) Inmate

From: Cranleigh, Surrey, England
Insane since: May 2003

posted posted 04-28-2004 22:00

No entries yet? Im hoping people have been working on them and just havent submitted yet...or this competition might just die and fade away, unheeded

BTW, Ill be uploading mine tomorrow

Wrayal

Go to kimber-ja.demon.co.uk and click on the link to the raytracer!

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 04-29-2004 06:59

NEBULA


NEBULA started as a "trendy" patterns renderer and accidentaly ended up in a variation of an entry I did for 256B.htm round #2. It fits in 6 lines of JavaScript and require a browser natively supporting the PNGs with alpha transparency ( read NOT IE ).

Hope you'll enjoy your trip through the clouds of gas.



(Edited by poi on 04-28-2004 22:00)

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 04-29-2004 11:16

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

wrayal
Bipolar (III) Inmate

From: Cranleigh, Surrey, England
Insane since: May 2003

posted posted 04-29-2004 22:42

Here we go, here's my entry. It's another rayracer, written from scratch. Its fairly limited, but it works
Hope u like it!
BTW: Unfortunately poi, Iv only got IE so I dont know what urs is like. I can also not vouch for any cross-browser compatability for mine

Wrayal

Damn, link words stopped it working (I think), so:
20 Line Wraytracer

Go to kimber-ja.demon.co.uk and click on the link to the raytracer!

(Edited by wrayal on 04-29-2004 13:44)

(Edited by wrayal on 04-29-2004 13:48)

(Edited by wrayal on 04-29-2004 13:49)

norm
Paranoid (IV) Inmate

From: [s]underwater[/s] under-snow in Juneau
Insane since: Sep 2002

posted posted 04-29-2004 23:42

Wow...you guys do such great stuff that I'm a little embarrassed to post my entry. Here goes anyway....

catch me


/* I wonder....Does Fuzzy Logic tickle? */

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 05-01-2004 15:28

A late entry to spice up the whole thing:

FIRE


An ubber classical fire in 4 lines for IE only sorry, I can't figure why Mozilla do not render the TABLE.



(Edited by poi on 05-01-2004 06:31)

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 05-01-2004 16:20

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 05-01-2004 16:37

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

wrayal
Bipolar (III) Inmate

From: Cranleigh, Surrey, England
Insane since: May 2003

posted posted 05-01-2004 17:22

I know its late, but personally Im gona go for poi's fire- that is amazing! And the Honorable mention must, of course, go to you, InI for your awesome plasma effect.

(this is a complete bugger - I was hoping to see what people thought of my wraytracer. Oh well)

Congratulations guys, those are some amazing scripts.

Wrayal

Go to kimber-ja.demon.co.uk and click on the link to the raytracer!

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 05-01-2004 17:27

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

norm
Paranoid (IV) Inmate

From: [s]underwater[/s] under-snow in Juneau
Insane since: Sep 2002

posted posted 05-01-2004 19:48

This was great, and quite a learning experience for me. I learned more from my 'faliures' than from my final submission.

My first idea was inspired by a java app. that InI posted sometime ago...I wanted to make a star field with each point moving and changing color. But I just couldn't manage to get more than one star to do all of the above.The sticking point was passing parameters in setTimeout(). I didn't want to create a global variable to hold the id of each newly created star because I figured that I would end up crashing the browser eventually.

The 'ghost' script was a quick offshoot of what I had been trying to do.

Then last night I figured out how to get past the sticking point. My problem (as usual) was procedural thinking.... nextStar=new star() was the answer to my problem! I thought about doing another entry here, but I got quite carried away and couldn't bring myself to keep it down to 20 lines or so. I kept adding more stuff. And I 'm still going on and on with this script because it is so much fun.

My original idea of twinkling and moving stars has morphed into a small study in artifical life (kinda..). No more stars, just red or black Spots and a running tally of each group displayed in the upper left. Today I will add Preditor Spots, dynamicaly generated to prey on one color Spot when the population ratio has become too uneven. Next I will be adding a color changing property to each newly created Spot so that while it is traveling about the screen (that's pretty much what Spots do, ya know...) if it's two closest Spots are of a certain color , it will change colors to match (social conformity).

This is so much fun! I know i should be working on other things, like my ongoing attempt to learn Java, but I can't seem to stop....When I'm all finished with it I will post it here.

I know most of you could code this sort of thing in your sleep, but as I have said before- I may not be the sharpest crayon in the box, I'm just happy that I get to color.

/* Sure, go ahead and code in your fancy IDE. Just remember: it's all fun and games until someone puts an $i out */

(Edited by norm on 05-01-2004 10:51)

wrayal
Bipolar (III) Inmate

From: Cranleigh, Surrey, England
Insane since: May 2003

posted posted 05-01-2004 20:23
quote:
So I personally prefer doing it for my own satisfaction, without a need to prove stuff anymore



Yeah, I know what you mean. I do it for fun now as ever - its not really like there is, or ever has been, a neeed to prove urself, as far as I can see. But hey, thanks for the compliment

I look forward to poi's topic!

Wrayal

Go to kimber-ja.demon.co.uk and click on the link to the raytracer!

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 05-02-2004 05:01

Thanks for the kind comments.

DmS: It's sad that you haven't had the time to shrink your entry to 20lines. It looked promising. Some variations of color and/or shape would have been interresting too.

norm: Your entry is funny and have the interactivity that lacks to all other entries. BTW if it were up to me, you'd have the "Honorable mention" for that reason.

InI: The idea of the plasma is great. Too bad that you ran out of time to animate it. I tried the suggestions I gave you ( plus some others ) to get a fluid animation, and voilà ini_plasma_continued. Sorry I couldn't resist

Hosting the 20liners on a single place is a great idea. Let's see how much entries we'll have in may, and if the number grows we should consider seriously to realize a mini-site to host them all.

wrayal: Like I said to InI, I really like your entry. Alas it's hard to realize that the sphere is raytraced. Adding a plane beneath would help. If you don't mind I'd like to make a "20lines_wrayal_raytracer_continued" thread where I'll try to include a checkboard plane.

just my 0.02?

wrayal
Bipolar (III) Inmate

From: Cranleigh, Surrey, England
Insane since: May 2003

posted posted 05-02-2004 08:23

This is going to be hard
The reason it is only a single sphere (and hence it is impossbile to see that it is wraytraced) is that, in order to cut it down to under 20 lines, I had to cut many things out. That included any readily-modifiable way of adding new primitives, or even moving the camera. However, I will try to include a plane, tho making it checkered might be slightly harder...

Go on, if you'd like, make a new topic -it might result in some aid from some javascript gurus (speaking of which, what happened to slime?!)

Wrayal

Go to kimber-ja.demon.co.uk and click on the link to the raytracer!

wrayal
Bipolar (III) Inmate

From: Cranleigh, Surrey, England
Insane since: May 2003

posted posted 05-02-2004 08:24

This is going to be hard
The reason it is only a single sphere (and hence it is impossbile to see that it is wraytraced) is that, in order to cut it down to under 20 lines, I had to cut many things out. That included any readily-modifiable way of adding new primitives, or even moving the camera. However, I will try to include a plane, tho making it checkered might be slightly harder...

Go on, if you'd like, make a new topic -it might result in some aid from some javascript gurus (speaking of which, what happened to slime?!)

OH, and BTW, that plasma effect is amazing. Unforunately the source code means nothing to me .

Wrayal

Go to kimber-ja.demon.co.uk and click on the link to the raytracer!

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 05-02-2004 11:27

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

DmS
Paranoid (IV) Inmate

From: Sthlm, Sweden
Insane since: Oct 2000

posted posted 05-02-2004 21:11

Thanx for the comments on my "entry" that I wouldn't classify as a valid entry since it's way above 20 lines at this point. But what can you do without time...

I'll work on it anyway as I get time, just to see if I can improve it, I've got some cool ideas for something completely useless like this

Beautiful work on the other entries though, the mebula is not only cool, it's beautiful to see, the plasma as well, just whish it would move for me
Cheers/Dan

{cell 260}
-{ a vibration is a movement that doesn't know which way to go }-

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 05-02-2004 21:47

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 05-02-2004 23:01

It shouldn't be too long until the creation of the "20lines_wrayal_raytracer_continued" thread. Unfortunatelly I can't get a shadow ...

DmS: Thank you.
InI: You're oh so true about the time in my hand.

DmS
Paranoid (IV) Inmate

From: Sthlm, Sweden
Insane since: Oct 2000

posted posted 05-03-2004 22:51

Sorry to push this thread again but to defend my entry just I had to shrink it to below 20 lines even if it's old by now
http://www.dmsproject.com/test/5k/perspective.html
then I added another variation to it: http://www.dmsproject.com/test/5k/perspective2.html
If I can find some more time I'll animate the second one to see if I can make it draw random swirls fading in and out, just for fun.
Great learning experience!
/Dan

{cell 260}
-{ a vibration is a movement that doesn't know which way to go }-

« BackwardsOnwards »

Show Forum Drop Down Menu