Closed Thread Icon

Topic awaiting preservation: June 20lines javascript contest - Elements - comments Pages that link to <a href="http://ozoneasylum.com/backlink?for=22028" title="Pages that link to Topic awaiting preservation: June 20lines javascript contest - Elements - comments" rel="nofollow" >Topic awaiting preservation: June 20lines javascript contest - Elements - comments\

 
Author Thread
InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 06-02-2004 16:29

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 06-20-2004 16:16

*bump*

Come on fellow scripters, there many things to do on that subject.
/me will start to work on my entry tonight or tomorrow

Virbatem
Nervous Wreck (II) Inmate

From: Perth Western Australia
Insane since: May 2004

posted posted 06-21-2004 15:20

I thought about redoing fire but it seemed lame to reproduce something already in existance.


Water would be no better. There's that water applet where an images, usually a flower, has it's reflection rippled. A simple method of over populating a whole mess of DIV's with the same image and wobbling them around a bit.


I could make some bubbles, light and transparent. Replace them with my rotating 3D balls or have them meaner up the screen to either dissapear or pop at the top. Maybe a collection of dot divs to outline a fan and rotate them? Dot divs again and have them blow past the screen in a breezy fashion? Dynamically paint a grid of spans to render a cloudy texture?


Have a fractal tree swaw in some imaginary wind while burning all above some shimmering water?


I just cannot see anything new in this. I have no new ideas. it's all just a rehash of that which I have done before.


I'll wait till next month's challenge unless someone can throw some ideas my way.


Not Enough Is Better Than Too Much

wrayal
Bipolar (III) Inmate

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

posted posted 06-21-2004 17:03

It isn't totally about just new ideas. I was thinking of doing a full-on simulation of all of them, incorporating them all into a scene. Then I woke up and realised it was way beyond me . But not some of you guys. go for it, its always worth a try, though having said that I have no idea what in the hell Im going to make....


Wrayal

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

InI
Maniac (V) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 06-21-2004 17:58

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
Maniac (V) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 06-21-2004 18:07

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 06-22-2004 22:41

Not sure about image clipping and some of the other stuff you're writing about - was thinking of asking for a tut in the other 20 lines thread . But anyway, I have had a lack of time due to exams, but Im throwing together a crappy little water fountain/particles effect. Not impressive, but a bit of fun CPU killer though - lots of lovely random numbers and loops .
Not sure quit when Ill have it done (im frazzled and had many stack overflow problems with my Timeout function before realising it wasnt in quotes. hmm - inifinite loops ), but I will (should) submit it in time

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 06-22-2004 23:07

While reading and reformating Vibratem's entry ( watch below ), I count 25 lines. My counting method is not the only and valid one. That's why I don't think it's really important if an entry exceeds a bit the line count limit. Add to that that it's easy to shrink the line count in this very example.

code:
/*    */	function init()
/* */ {
/* 1 */ imgObj=new Array();
/* 2 */ for(i=0;i<30;i++)
/* */ {
/* 3 */ imgObj[i]=document.body.insertBefore(document.createElement("IMG"),null);
/* 4 */ imgObj[i].className="bubble";
/* 5 */ imgObj[i].src="bubble.gif";
/* 6 */ imgObj[i].id="b"+i;
/* 7 */ imgObj[i].style.pixelLeft=Math.random()*120+100;
/* 8 */ imgObj[i].style.pixelTop=340+(Math.random()*400);
/* */ };
/* 9 */ setTimeout("bubble();",1500);
/* */ };
/* */
/* */ function bubble()
/* */ {
/* 10 */ for(i=0;i<30;i++)
/* */ {
/* 11 */ y=imgObj[i].offsetTop-1.51;
/* 12 */ x=imgObj[i].offsetLeft+Math.sin((y*i)*0.0174524064)*2+.5;
/* 13 */ if(y<333)
/* 14 */ imgObj[i].style.visibility="visible";
/* 15 */ if(x-157+Math.abs((y-212)/2)<0)
/* 16 */ x=157-Math.abs((y-212)/2);
/* 17 */ if(x>157+Math.abs((y-212)/2))
/* 18 */ x=157+Math.abs((y-212)/2)
/* 19 */ if(y<100)
/* */ {
/* 20 */ y=Math.random()*400+340;
/* 21 */ x=Math.random()*120+100;
/* 22 */ imgObj[i].style.visibility="hidden";
/* */ };
/* 23 */ imgObj[i].style.pixelLeft=x;
/* 24 */ imgObj[i].style.pixelTop=y;
/* */ };
/* 25 */ setTimeout("bubble();",75);
/* */ };



PS: I'll try to work on my entry soon.

Virbatem
Nervous Wreck (II) Inmate

From: Perth Western Australia
Insane since: May 2004

posted posted 06-23-2004 03:13

Thanks for counting pio, at 4am I neither trusted myself to count correctly nor compress the script. And as you commented it's easy to complres it. It's a first version. I am going to let it stand as is but I really do think lines 1 to 9 should not be counted. They do not perform any special function except to create the images and get the real function going.


I could have just as easily created 30 <img> tags, all identical except for the ID which would have been simple counting: b0, b1, b2, b3, b4, b4...


Not Enough Is Better Than Too Much

wrayal
Bipolar (III) Inmate

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

posted posted 06-23-2004 12:56

God, isnt that always the way? You have a little effect going, then you look at the submissions for the competitions, and somebody's already submitted a better one. This was going to be the basis of my entry:

code:
<script>
for (var i=0; i<(mine=64); i++) document.write('<div id=p'+i+' style="position:absolute;bottom:10;left:'+(i*5)+';height:2;width:2;font-size:0;background-color:#1111aa"></div>')
var movArray=new Array()
var posArray=new Array()
for (var i=0; i<mine; i++) movArray[i]=new Array(((Math.random()-0.5)*2),(2+Math.random()*2))
for (var i=0; i<mine; i++) posArray[i]=new Array(400,Math.random()*100)

function movement() {
for (var i=0; i<mine; i++) {
document.getElementById("p"+i).style.posLeft=(posArray[i][0]+=movArray[i][0])
document.getElementById("p"+i).style.posBottom=(posArray[i][1]+=movArray[i][1])
movArray[i][1]-=0.1
if (posArray[i][1]<=50) {
posArray[i][0]=400
posArray[i][1]=100
movArray[i]=new Array(((Math.random()-0.5)*2),(2+Math.random()*2))
}}
setTimeout("movement()",1)
}
</script>
<body onLoad="movement()">



Now I guess its time to look for something else
All your fault IW!

Wrayal

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

Iron Wallaby
Bipolar (III) Inmate

From: USA
Insane since: May 2004

posted posted 06-23-2004 13:35

Ook! I'm sorry about that. Guess it was good that I stayed up late to finish that thing, heh!

Well done, though.

"Any sufficiently advanced technology is indistinguishable from magic." -- Arthur C. Clarke
"Any sufficiently arcane magic is indistinguishable from technology." -- P. David Lebling

InI
Maniac (V) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 06-23-2004 14:02

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.

Iron Wallaby
Bipolar (III) Inmate

From: USA
Insane since: May 2004

posted posted 06-23-2004 19:39

Why doesn't anyone ever go for FF compatibility? v__v

A bunch of entries I have to wait to see, heh...

"Any sufficiently advanced technology is indistinguishable from magic." -- Arthur C. Clarke
"Any sufficiently arcane magic is indistinguishable from technology." -- P. David Lebling

wrayal
Bipolar (III) Inmate

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

posted posted 06-23-2004 19:43

Because the coding ism hard enough for most people IW
Trust me, in terms of mine u really ain't missing much - think a slower version of ur particle engine (speaking of which, how did u get it going so fast....) with a sort of wind function fudged in. Still, the whole particle thing was a bit of fun....

Wrayal

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

Iron Wallaby
Bipolar (III) Inmate

From: USA
Insane since: May 2004

posted posted 06-23-2004 20:13

Hmm... I'm not too sure what makes mine go so fast (FF/Opera compatibility perhaps? ;) ). I was careful to use faster alternatives to certain things (& instead of %, * instead of /, for(i=max,i--;) instead of for(i=0;i<max;++i), especially with the Math.min() in there), but that's about it. Mostly, in reducing lines of code, the thing tended to go faster and faster (e.g. all those assignments on one line). Following the general rules of optimization (reduce function calls, etc etc) works perfectly here.

It was originally all done similar to Ini's stuff, in using a DIV array (I was using wu particles... looked pretty but was mad slow). Ended up rethinking the entire thing into how you now see it. (I deleted the version with the wu particles, so no, I can't show you the code.)

"Any sufficiently advanced technology is indistinguishable from magic." -- Arthur C. Clarke
"Any sufficiently arcane magic is indistinguishable from technology." -- P. David Lebling

wrayal
Bipolar (III) Inmate

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

posted posted 06-23-2004 20:37

Yeah, I found compressing my raytracer made it a lot faster (yes, somehow it was even slower then than it is now )

Wrayal

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

Iron Wallaby
Bipolar (III) Inmate

From: USA
Insane since: May 2004

posted posted 06-23-2004 22:24

Weee! http://www.rpi.edu/~laporj2/stream.html

"Any sufficiently advanced technology is indistinguishable from magic." -- Arthur C. Clarke
"Any sufficiently arcane magic is indistinguishable from technology." -- P. David Lebling

InI
Maniac (V) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 06-24-2004 17:19

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 06-30-2004 16:34
quote:
InI said:
Hey, people! At midnight tonight, the winners will officialy be announced.

Damn! We're already reach the 30th june. I must move my ass I want to release an entry.



(Edited by poi on 06-30-2004 16:36)

Iron Wallaby
Paranoid (IV) Inmate

From: USA
Insane since: May 2004

posted posted 06-30-2004 16:47

I would like to see what you come up with.

Oh, and that reminds me... I've been poking around the PC demoscene again lately, and was wondering if you were, indeed, the same poi from pouet.net and etc.?

I already know you are the one from the 5k, heh (my raycaster SO beats yours )

"Any sufficiently advanced technology is indistinguishable from magic." -- Arthur C. Clarke
"Any sufficiently arcane magic is indistinguishable from technology." -- P. David Lebling

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 06-30-2004 21:15

Iron Wallaby: For once, I'll make an ubber quick entry. With ~3h of train a day + the work day, it's hard to not fall asleep in the sofa.

Yep, I'm the "poi" of pouet.net and 256b.com which I administrate.

quote:
(my raycaster SO beats yours )

The "engine" of 3D TOMB was really experimental, read crappy, and more a proof of concept than a real game. Add to that that it's 2years old now. We'll see when I'll officially release 3D TOMB II ( I should release it within 2-5 weeks )

Iron Wallaby
Paranoid (IV) Inmate

From: USA
Insane since: May 2004

posted posted 06-30-2004 22:23
quote:
poi said:

We'll see when I'll officially release 3D TOMB II ( I should release it within 2-5 weeks )


Looking forward to that.

I've been updating my raycaster a lot of late too. I think I can squeeze the entire thing *really* teeny without any game elements or textures (running at an excellent framerate in a relatively large window, no less), making a game quite more-than feasible. We'll see if I ever make a game out of it though.

If I can find a way to remove duplicate code (ie. seperate x-scan and y-scan blocks) it would go even smaller. But then again, if I used a different raycasting algorithm, I could probably make it ~1000 bytes, it would just run really slowly, heh. So the trick is finding the proper balance of size and playability.

"Any sufficiently advanced technology is indistinguishable from magic." -- Arthur C. Clarke
"Any sufficiently arcane magic is indistinguishable from technology." -- P. David Lebling

(Edited by Iron Wallaby on 06-30-2004 22:48)

InI
Maniac (V) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 06-30-2004 22:54

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.

Iron Wallaby
Paranoid (IV) Inmate

From: USA
Insane since: May 2004

posted posted 07-01-2004 00:08

Coincoin! How utterly cute.

"Any sufficiently advanced technology is indistinguishable from magic." -- Arthur C. Clarke
"Any sufficiently arcane magic is indistinguishable from technology." -- P. David Lebling

InI
Maniac (V) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 07-11-2004 11:04

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.

« BackwardsOnwards »

Show Forum Drop Down Menu