maandag 23 juli 2018

#3 - Implementing an attribute system


As mentioned in my earlier blog I have chosen to implement an attribute system in my game Cycling the board game.

The goal in this game is to cross the finish line first. This is determined (basically) by rolling a dice (d6) each turn and moving the amount of squares. Each player has a slightly different dice, based on the player’s skill, where players with a higher skill have better dice (e.g. better odds to throw a high number).

When the dice is rolled, bonuses to the dice roll are applied based on the player’s attributes and the game world. For example, if the player is on a mountain square and has a high value for attribute Climbing, he could get some bonus points this turn to add to his dice and move further.

This is the first time I have implemented such a system and I am happy to hear any feedback from you how this could be done better.

To implement this system, I took the following steps:

  1. Added a new enum AttributeTypes with a list of all (12) attributes
  2. Create a new Class “Attribute”.  This Class consists of an AttributeType (one of the twelve) and an int to store the value (1-20) for this attribute.
  3. Added a new Class “AttributeManager” and added an instance of this class to each player. This Class consists of a list of all Attributes for the player and contains functionality to check for bonuses based on the attributes and the game world.


The system works pretty well, but somehow doesn’t feel right, maybe because it is too complex, maybe because it is just the first time I am doing this. I also wonder how this would be done in a more complex game like Football Manager for example.

Thank You for reading and please let me know your thoughts on the subject in the comments!

PS. I have not implemented the actual functionality to use the attributes to add bonus points to the dice, that will be the subject of my next blog probably.

Geen opmerkingen:

Een reactie posten