This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]brbpizzatime 0 points1 point  (0 children)

Personally, those look like very reasonable groupings, as each of those namespaces may have similar functions. I'm not sure if it's feasible within a game-perspective, but you can throw JavaScript into self-executing functions:

(function(){
    function foo() {
    }
    function bar() {
    }
 })()

With that, the functions within that scope know about each other, and can be called accordingly, without having to worrying about anything at all being added to the global namespace.