Design structure to use this library for a game
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 6.1k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
Hi, I am building a multiplayer game with this library, and am wondering if anyone could suggest some best design practices for how I can build it. I have a Player object, and a ClientService object that implements WebSocketBehavior.
Should the ClientService have an instance variable of the player it's responsible for? Should the Player object have a WebSocketContext instance variable?
For example, the player dies, and a packet needs to be sent to the client. Should the Player class have a WebSocketContext and send the packet to it's client inside the Player class? Or should it be done in the ClientService class?
Any suggestions on design would be appreciated.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue discusses the Player and ClientService objects, WebSocketBehavior, WebSocketContext, and sending a packet when a player dies. No repository file, test, or concrete implementation target is identified, so a contributor would first need to clarify the intended architecture and scope with the project maintainers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- game-dev, networking
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 15/100