dimanche 5 avril 2015

Which pattern could I use for a game with complex rules?

I'm creating a 2D turn-based multiplayer (no AI) board game in Java using the MVC pattern in which there are a lot of rules and conditions, I can't figure out a good pattern to implement them, for example:



  • The player can choose a character from a pool of 12: They have similarities between them but each character could move differently, could use different items, etc.

  • The movement ability, which could already be different based on the character, could change during the game by using items (for just one turn) or after some events (for all the game). For example moving by 3 cells instead of 2.


All these rules could be different based on the selected game-mode which could also change the winning conditions and some game strategies.


Which patterns could be suitable for this? Especially the fact that different characters could have different behaviors depending also on the gamemode and the state of the game.


I know there are already a lot of questions on game patterns on SO but I could not find something suitable to this.


Aucun commentaire:

Enregistrer un commentaire