Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should create Players and Player object #36

Closed
bjarneo opened this issue May 26, 2015 · 9 comments
Closed

Should create Players and Player object #36

bjarneo opened this issue May 26, 2015 · 9 comments

Comments

@bjarneo
Copy link
Collaborator

bjarneo commented May 26, 2015

Should create Players and Player object.

Players should be initialized once to hold all players object. It should also have all the methods related to findPlayer, getPlayersList etc.

The Player object should have the x, y etc. And it should probably inherit the playerConfig. This object should be initialized in socket.on("welcome", function(us

Perhaps it also should be packed in webpack, so the code could be shared on the client and server side?

Thoughts?

@bjarneo
Copy link
Collaborator Author

bjarneo commented May 26, 2015

*between client and server

@krtr
Copy link
Contributor

krtr commented May 27, 2015

Also we can take into account entity-component-system pattern. It's commonly used pattern in gamedev but I'm not sure if it won't be overkill

little tutorial/demonstration
http://vasir.net/blog/game-development/how-to-build-entity-component-system-in-javascript

@krtr
Copy link
Contributor

krtr commented May 27, 2015

I think that when we start playing with oop it would be nicer if we would write classes with es6 (babel or typescript or whichever compiler which can compile down to es5). OOP code in es6 looks much clearer than es5

@bjarneo
Copy link
Collaborator Author

bjarneo commented May 31, 2015

I like this ECS system. I'll take a closer look at it.

@huytd
Copy link
Collaborator

huytd commented May 31, 2015

I agree. We should write classes with ES6 :D

@krtr
Copy link
Contributor

krtr commented May 31, 2015

But for es6 we need compiler which is impying build system. Which one you prefere? I'm suggesting gulp

@huytd
Copy link
Collaborator

huytd commented May 31, 2015

Yes, Gulp is much easier to use. I think.

@krtr
Copy link
Contributor

krtr commented May 31, 2015

@huytd i can setup gulp with babel also I'll create issue for this

@huytd
Copy link
Collaborator

huytd commented May 31, 2015

👍

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

No branches or pull requests

4 participants