I don't know a good way to implement single and multiplayer in a game without messing up the whole project structure.
Should I create separate classes for single and multiplayer entities or is there a clever programming pattern I can't find for this situation?
Let's make a simple example of my problem.
Let's say I want to make a pong clone with single and online multiplayer, how should I go about this? Make separate classes for both modes?
I read somewhere that the MVC pattern might be a good choice in this case but I'm not sure how to implement it correctly.
Should I create a Player data class and then multiple controller classes for example: PlayerControllerSingleplayer, AIController, PlayerControllerMultiplayerSelf, PlayerControllerMultiplayerOpponent.
And then a PlayerRenderer view class?
I've read some articles about mvc previously but still don't know really much about it or how to do it correctly in my case.
I will be using libgdx and probably kryonet for the networking if that might be important.
Thanks for every piece of advice in advance!