yes, you read correctly. You can make some static/animated animals, a single kind or a real zoo, and you're free to let the visitors nurse or feed them if you want. I just want to see some animals this month.

quote:A code monkey said once:
As usual, the main rule is to make your script in 20 lines of (effective) code.
Comas shouldn't be used to execute several instructions on the same line
See the code sample below to illustrate the basic rules :

The document.body.onclick = function() does not count as a line as it's not some effective code and the function call could be put in the BODY tag ( or anyother HTML tag ).
The declaration of the stupidFunction() does not count either for the same reasons.
The coma in the line /* 03 */ is ok, since it simply separates the parameters of a function.

Interesting topic.
Would anyone mind if I re-entered the Fish AI I won with a while ago? I'd modify it for this theme of course.
I'll also try to avoid the 0*isNaN()s I had to put in to sqeeze it to 20 lines in FireFox.

A zoo was a tough call, given the 20-line limit, so I thought I'd limit the species to fish, and make an aquarium.

You can change the number of fish by modifying the value in line 10. I've used values between 1 and 75... anything over that and the tank gets far too crowded (someone call the RSPCA!

The fish are random each refresh (so random position, direction, and type). There are 8 different types of fish in total... but this could easily be increased just by adding more images, and changing the value in line 1 from 7 to (numImages-1).

It works in IE, Firefox, NN 7, and Opera 7... and probably Safari as well (although this has not been tested).

Nice aquarium BRPS!
It gave me a few ideas on how to improve performance of the Fish AI.

I just found out that I might not be able to make an entry this time either. Me and my classmates will be leaving for Belgium in 2 weeks and there are a lot of things to take care of before that. I'll make my best though!

BillyRayPreachersSon: my mum has that aquarium screensaver on her computer

Yeah - I searched around on Google's image search for aquarium and fish pics, and some guy had done a screengrab of the control panel for the screensaver showing all the fish. So I grabbed them, and spent a few hours cutting around them for the transparency.

BTW - I checked out your web page - good to meet another Atari fan, even if I was staunchly 8-bit (turbo charged 800XL with 256Kb RAM (woo!) and all the kit. I just couldn't be bothered downgrading to the ST

*bump*
Ok, I'll try to make a script too. After all, this is me who asked to get the ZOO in town.

BillyRayPreachersSon: Among the 8bits Atari I've only had a 2600 for ~1 year But the demos on Atari XL blows me away. I'd really like to learn to code for these machines, but at the moment I'm into assembly 68000.

I took a slightly different approach to BRPS and went for a night time themed zoo. I've managed to get everything into 20 lines of code without too much fiddling too! The final page has been tested to work properly on:

as for me, i promised an entry and its a halfway done tamagotchi, but since i still need a large number of graphics (animation frames) and there is a lack of motivation and time i wont participate. sorry.

again, i like the others so far. good choice of topic too!
so poi, whos the winner?

BabbyJeffy WINNER, for his original idea. Welcome in the Asylum BillyRayPreacherSon RUNNER UP, for his crowded aquarium.

Therefore it's up to BabbyJeffy to create the "March 2005 - 20 lines JavaScript Contest - insert your topic here" thread to perpetuate the tradition. As he is a new comer and has posted nothing else but his script, we shouldn't exclude the possibility that he won't give a sign of life. If he doesn't before march 4-5, the runner up will lead the March 2005 - 20 lines JavaScript Contest.