I have a database table that stores a basic player data for the game.
It looks like this. (sample):
_________________________________________________________
player_id | player_level | player_class_ref | player_exp
P1 8 W1 68349518
_________________________________________________________
level | required_exp
1 100
...
8 80000000
____________________
The game itself is text-based but web and browser based.
I decided to use a rule engine to adjust player datadata when needed. It
It executes after every player event - like for example, killing a monster or finishing a quest.
The sample rule looks like this
when
player_exp > closest_level_exp
then
player_level + 1
player_exp = abs (closest_level_exp - player_exp)
There are might be a lot of similar rules - for example for, quest accepting and others.
So themy question is - Is my approach viable for thea web and text based game?
Because I am not sure how such things are usually implemented in games. Should, such rules be hard coded, or they are stored another way...?