pouët.net

Go to bottom

New www.chiptune.com preview !

category: general [glöplog]
Quote:
rez: Here comes some insight after partly unobfuscating your code ( btw why obfuscating it ? with gZip enabled on your server, there's nothing to gain )
In fact there is a good reason for that. Since JS is an interpreted language, you benefit from short variable names and compact code. Not much, but a little.
added on the 2006-05-23 14:50:57 by nitro2k01 nitro2k01
Quote:
In general you should try to make a better use of classNames to avoid generating a hell lot of redondant inline style properties, also try to avoid changing frequently the backgroundImage, prefer loading ONE big baground image and just change the backgroundPosition to reveal the parts you need.


It's what I have done for the font displayed on the screen, one picture with all the charset :)

btw, i will replace my hex() function by your own who seems to be faaaar better :)

well, you know Matthieu, I'm not good as you, YOU are the God of javascript :)

for your information, the site is perfectly running under Firefox 1.5 on my athlon 2200+, and is slooooow with IE6, but the site work as a charm on my tiny iBookG4 with ALL browser (works fine with Safari).

And I'm aware about the "double" mouse pointer, but there's no solution to hide the "default" pointer under non windows(c) Fiferox since the pointer loaded is a .cur (an empty one, that's why it is not displayed, but just the arrow).
added on the 2006-05-23 15:06:18 by rez rez
nitro2k01: Well, the correct answer to your assumption is : it depends of the JavaScript engine.

If it interprets the JavaScript on the fly your assumption makes sense, but then JavaScript would be slow anyway.

But other JavaScript engines chew the scripts into some sort of bytecode during a first pass then that bytecode is executed by a "JavaScript Virtual Machine". It makes for some much faster code. I don't know for the other browsers but that's the case for at least Opera.

rez: Regarding the cursor, IMHO you should drop the cursor DIV and simply provide the Amiga cursor as a real .CUR file to avoid getting 2 cursors in some browsers.

For the bg images, Il also had the juggler and twister in mind.

And for the use of the classNames I thought about giving a className to the drag-able things and thus get rid of all the inline event handlers.


Using 2 global variables ( data_url and data_type ) for your XMLHttpRequests prevents you from doing an XHR before the data of the previous one have arrived. Oh, and to instanciate correctly the XHR, your load_data() function should look like :
Code:function load_data(_5,_6) { timer_data=(new Date()).valueOf(); data_url=_5; data_type=_6; // insert the first code snippet from http://www.jibbering.com/2002/4/httprequest.html if( xmlhttp ) { xmlhttp.onreadystatechange=xml_http_change; xmlhttp.open("GET",_5,true); xmlhttp.send(null); } }


Personnaly I think I'd have go for an OO approach, but I might be wrong.
added on the 2006-05-23 16:06:16 by p01 p01
you should make a small connectionManager to either allow several XHR at the same time or queue them.
added on the 2006-05-23 16:16:45 by p01 p01
p01: But even if the script is reduced to bytecode, the names must matter, since you can't really save a reference from a variable name, say foo, to a certain object. That is so because foo might or might not be defined elsewhere.
... thinking again about javascript scopes I see this isn't really the case. And even if it is, you could have an opcode like xx yy, where xx is an instruction, and yy is a hashcode for the variable name foo.
Hmm, I gotta go code a javascript demo, one that doesn't suck... :P
added on the 2006-05-23 16:21:22 by nitro2k01 nitro2k01
nitro2k01: trust me when I say that's the way it is in Opera. ;)
added on the 2006-05-23 16:27:34 by p01 p01
I don't doubt that's the way it is, I was just tinkering about the exact implementation. (And found that you were probably totally right)
Btw, good to see another Opera user. Are you even an Opera developer?
added on the 2006-05-23 16:32:52 by nitro2k01 nitro2k01
I saw you blog now. :D
added on the 2006-05-23 16:34:46 by nitro2k01 nitro2k01
I'm a JavaScript developer in the Web Applications team. I don't work on the browser itself.
added on the 2006-05-23 16:41:49 by p01 p01
Opera sucks, so you prolly don't have a clue then.
added on the 2006-05-23 23:52:52 by Hatikvah Hatikvah
hei hei,

well, i found (with some help) why the site is SO slow on some browser.

sometimes, some users disabled the image caching, so the site want to load and reload the same picture (because it's not cached) and since my site use ONLY picture, it takes AGES to load...
if you disabled image caching, please enable again to browse on my site :)

also, the site works fine with Opera if you select the "emulate fiferox" (by pressing F12), there's only a REALLY strange bug, ALL chars "p" and "0" doesn't appears ! weird O_O;
Poï can you help on that point ?

Btw, I changed lots of things about picture loading (i packed everything into 3 pictures) and I changed a bit the "Shadow of the Chip" effect, now resizable ;D
added on the 2006-05-30 17:27:58 by rez rez
I want the vectorball applet back!!!
added on the 2006-05-30 17:31:42 by keops keops
and I want a GEM TOS version, I will hold keops hostage untill then...

added on the 2006-05-30 19:16:20 by Dubmood Dubmood

login

Go to top