Skip to content

Globalizing stuff #24

Description

@joskuijpers

As @fatcerberus reported on SphereDev, we could put more classes in the global space.

I am fine with that, but we should be careful.

We should limit the number of classes, probably namespace some, and think about collision.

So no 'Group' class. Maybe 'ShapeGroup' or namespace the graphics in 'Graphics.Shader/.Group/.Shape'.

Also, Logger is a module. No default loading of modules other than engine and console.
Default loading fs is bound to cause problems. Same for manifest and stuff.
We could make an 'engine.getCurrentManifest' or getCurrentGame or .game.

I am not sure what else there was in the post... can't access it.
Oh yeah, don't globalize 'Socket' and 'Server'. It is not something everybody always use and it is odd with datagrams. Keep in in a 'net' module that shall be loaded using require.

Also remember that we can't globalize the map engine as 'Map' because that is used by ES6.

@fatcerberus Could you repost what you wrote on the forums?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions