How to handle a player's level and its consequent privileges?

Posted by Songo on Game Development See other posts from Game Development or by Songo
Published on 2013-04-30T11:48:33Z Indexed on 2013/06/29 16:30 UTC
Read the original article Hit count: 336

I'm building a game similar to Mafia Wars where a player can do tasks for his gang and gain experience and thus advancing his level.

The game is built using PHP and a Mysql database.

In the game I want to limit the resources allowed to player based on his level.

For example:

________| (Max gold) | (Max army size) | (Max moves)  | ...      
Level 1 |    1000    |       100       |      10      | ...  
Level 2 |    1500    |       200       |      20      | ...  
Level 3 |    3000    |       300       |      25      | ...
  .
  .
  .

In addition certain features of the game won't be allowed until a certain level is reached such as players under Level 10 can't trade in the game market, players under Level 20 can't create alliances,...etc.

The way I have modeled it is by implementing a very loooong ACL (Access Control List) with about 100 entries (an entry for each level).

However, I think there may be a simpler approach to this seeing that this feature have been implemented in many games before.

© Game Development or respective owner

Related posts about game-design

Related posts about programming