I am developing a multiplayer online game with node-js and socket.io and I am wondering if I am on the right path considering implementation.
the first approach I took was like this:
- one app class manages logic and socket events
- some small model class for structure and/or database queries
but it's got pretty messy around +2k lines and I am afraid I cant debug it anymore
the second approach i have in mind is :
- one app class
- one class to manage socket events
- DataModel classes that will control the game logic
or another approach :
- sharing socket events to classes and every class manages its own events
Which one should I choose? I think I need an expert opinion. thanks in advance.
via Ashkan Ghodrat
No comments:
Post a Comment