Profile cover photo
Profile photo
Damien Golding
English man in Japan helping the world communicate
English man in Japan helping the world communicate

Damien's posts

Am I correct in thinking that long chained variables have more references to go through making them slower? No automatic optimizations made by the JavaScript engine?
In the below I am guessing that the engine works by(get GAME, get WORLD, get currentGame, get GAME[WORLD.currentGame], get GAME[WORLD.currentGame].party get GAME[WORLD.currentGame].party.length)

See below:

    for(var i=0; i<GAME[WORLD.currentGame].party.length; i++)
var party=GAME[WORLD.currentGame].party;
    for(var i=0; i<party.length; i++)

Should I be worried about using jQuery in heavy Web apps? and if so, is there any ways to use jQuery and prevent slowdown?

*I am making a HTML5 game and it is getting larger and larger. I am considering using jQuery for certain layout aspects, but the code is already large and a lot of the issues are around keeping the game running at a high speed.

Post has attachment
I am trying to get a stored list of object names and overwriting them with loaded data.
The below is not working and I can see why, but not sure how to get around it.
Any advice would be much appreciated. Regards.

Ignore the console logging : /

function loadDataFromJSON(json)
    var i=0;
    for(var obj in json)
        var object=eval(MAKER.saveList.objects[i]);
        if(i>100){return false;} //test to get out when bugged??

What's a good free tool for Web development(specifically JavaScript)
Ideally would have recommending features(Type in console. and log etc. would be shown). I like that part of the Chrome console but is not suitable for Web development.


How do I get an object with a string?
for(var obj in window){if(obj=="navigator"){var ref=navigator;}} alert(ref.userAgent);

Is there any way to get all supported HTML elements/info in JavaScript?

Something I have never heard of so probably doesn't exist, and HTML is pretty much XML, but just in case, if there is a list of HTML elements stored somewhere in JavaScript it would be useful for development purposes.
I could quickly test whether canvas is supported or new HTML 5 elements are supported, etc.

Wait while more posts are being loaded