Skip to main content
Clarification, grammar
Source Link

using Using a rule engine for weba text-based web game

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...?

using rule engine for web text game

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.

I decided to use a rule engine to adjust player data when needed. 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 the question is - Is my approach viable for the 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...

Using a rule engine for a text-based web game

I have a database table that stores basic player data for the game. 

It looks like this:

_________________________________________________________
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 and browser based.

I decided to use a rule engine to adjust player data when needed.

It executes after every player event - 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 might be a lot of similar rules - for example, quest accepting.

So my question is - Is my approach viable for a web and text based game?

I am not sure how such things are usually implemented in games, such rules be hard coded, or they are stored another way?

Source Link
lapots
  • 157
  • 1
  • 7

using rule engine for web text game

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.

I decided to use a rule engine to adjust player data when needed. 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 the question is - Is my approach viable for the 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...