Skip to main content
Share Your Experience: Take the 2024 Developer Survey

New answers tagged

7 votes
Accepted

Decouple game entity from its owner when logic depends on it

The crux of the issue appears to be that you are tying the identity of an object to the implementation. In it's simplest form a players ID could just be an integer (player 0,1,2,3...). Hence instead ...
DavidT's user avatar
  • 206
2 votes

Decouple game entity from its owner when logic depends on it

This is a job for Interfaces An interface is basically a class which has no implementation. It is a contract which a class can implement. (The link is for C# - but this pattern exists in most object-...
Tim C's user avatar
  • 474
1 vote

Checking combat on the server to prevent cheating - how to keep two codebases in sync?

In highly multiplayer contexts (such as this), it's best to keep as much logic on the server as possible. If I understand your explanation correctly, the important logic happens on the client with ...
Spencer Rosas-Gunn's user avatar

Top 50 recent answers are included