# Calculating Expierence - Logic? Formula?

## Recommended Posts

Hi!

How is XP calculated? For example, to reach level 4, the player should reach 200 XP and to reach level 5 player requires 450 XP.

Is there a formula? Is there a tutorial available online? Any source where I can learn how XP is calculated?

Can you give me a simple example from any existing game where the XP increases whether the player wins or loses?

Thanks!

##### Share on other sites

Xp is is usually decided by the goal, design and testing of the game. There is no predefined rules, it is something that you keep working on as you advance.

Let's say for example you want the player to feel like each level is twice as powerful as the last:

A enemy gives 10XP and has 6HP. Player Damage: Lv1 1dmg, Lv2 2dmg, Lv3 4dmg, Lv4 8dmg. Exp needed follows the same pattern: Lv1 10xp, Lv2 20xp, Lv3 40xp, Lv4 80xp.

Lv1 player kills enemy in 6 hits, Lv2 3 hits, Lv3 2 hits -oops. Now my goal is messed up; I am not getting what i want. So I change the enemy HP to 8 because it is a power of two.

Lv1 8 hits, Lv2 4 hits, Lv3 2 hits, Lv4 1 hits.

Good so damage is what I want now, except when I test the game I notice something: Lv2 defeats 1 enemy to level. Lv3 2 enemies, Lv4 4 enemies, Lv5 8 enemies.

Meaning it took exactly the same amount of hits to reach level 2 as it took to reach level 5. This means I missed my goal, the player feels as weak as in the beginning.

This happened to me in one of my first RPG games, using larger and more complex numbers. Players felt that they weren't really leveling up. I fixed it by reducing the amount of XP needed for the next level. It was something that could only be fixed by testing what amount of XP felt right.

Maybe if you can tell us what the goal of leveling up is, for you, we can help you find a formula.

Edited by Scouting Ninja

##### Share on other sites
18 minutes ago, Scouting Ninja said:

Xp is is usually decided by the goal, design and testing of the game. There is no predefined rules, it is something that you keep working on as you advance.

Let's say for example you want the player to feel like each level is twice as powerful as the last:

A enemy gives 10XP and has 6HP. Player Damage: Lv1 1dmg, Lv2 2dmg, Lv3 4dmg, Lv4 8dmg. Exp needed follows the same pattern: Lv1 10xp, Lv2 20xp, Lv3 40xp, Lv4 80xp.

Lv1 player kills enemy in 6 hits, Lv2 3 hits, Lv3 2 hits -oops. Now my goal is messed up; I am not getting what i want. So I change the enemy HP to 8 because it is a power of two.

Lv1 8 hits, Lv2 4 hits, Lv3 2 hits, Lv4 1 hits.

Good so damage is what I want now, except when I test the game I notice something: Lv1 defeats 1 enemy to level. Lv2 2 enemies, Lv3 4 enemies, Lv4 8 enemies.

Meaning it took exactly the same amount of hits to reach level 1 as it took to reach level 4. This means I missed my goal, the player feels as weak as in the beginning.

This happened to me in one of my first RPG games, using larger and more complex numbers. Players felt that they weren't really leveling up. I fixed it by reducing the amount of XP needed for the next level. It was something that could only be fixed by testing what amount of XP felt right.

Maybe if you can tell us what the goal of leveling up is, for you, we can help you find a formula.﻿

Hi Scouting Ninja, Thanks for replying...

I'm creating a card game (something like spider solitaire) where the XP increases whether the player wins or loses the game. After the player reaches the XP target, the player is rewarded. The next XP target is displayed that the player should reach, which is more than the previous target.

I don't think the game I'm creating is that complex. But I would like to learn/study if there are any tips/tricks I should know about.

##### Share on other sites
42 minutes ago, JoAndRoPo said:

After the player reaches the XP target, the player is rewarded﻿.

The XP system you are looking for is one based on skinner box principles. A kind of award system that pushes the player to play more. You can search "skinner box"

Remember skinner box mechanics isn't evil, however if abused can be used to cause harm. As a developer harming your players is like poisoning your own game. You should read up on skinner box tricks as well as how to avoid the pains of implementing skinner box mechanics.

The two links shows some case studies as graphs. You will want to graph between min and max XP, that shows how player reward and costs are related. Also learn what you can about difficulty curves.

The key is to steadily increase the difficulty of leveling up. As humans we actually enjoy this, because in the real world the more we progress, the harder it gets to progress more. Our brains reward us for pushing that little bit more to reach the next goal.

In your case, how many games a player has to play before leveling up. This you will want to compare against how many times a average person can play per day.

Lets take the basic formula from the first link: 1.4 games = 0.7 levels and 1.7 games = 1.2 levels. Using this we can see that the player should either level up +/- 50% into the second game or level up after the second game.

Take a look at the case studies. Do your research and see what you think will work best for your game. There is a lot of studies on incremental systems to read on the net. I recommend: https://www.academia.edu/

##### Share on other sites

A solitaire card game doesn't lend itself to the scaling considerations involved in the traditional RPG feedback loop between character level, player stats, enemy toughness, XP gained per enemy and XP needed per level: the challenge of an "encounter" and the rate at which the player defeats them are fundamentally constant. A higher level player is as strong as a low level one.

Instead of earning pointless levels, experience can instead give the player purely ornamental trophies like special card decks or consumable "items" (peek at a card, swap cards, etc.).

##### Share on other sites

interesting pointers here. thank you

Edited by NeverWing2

##### Share on other sites

Hi! I need a little help/tips regarding Player XP Level Up for a simple board game I'm creating... I have attached a screenshot...

Does it make sense the way I'm calculating Player XP?

##### Share on other sites

Are you sure columns G and J make sense? Hundreds of hours and thousands of games to earn a level? What is the gameplay impact of player levels?

##### Share on other sites
14 hours ago, LorenzoGatti said:

Are you sure columns G and J make sense? Hundreds of hours and thousands of games to earn a level? What is the gameplay impact of player levels?

I just realized after testing the game yesterday night that 15 mins are for 2 players... But in the board game, a total of 4 players can join at a time which increases the gameplay time to nearly 45 min. Jeez!!! 😮

You're right! After you mentioned of columns G and J, the number of times the player has to play to reach the next level is totally insane... 😩

There is something wrong with the logic...  And I managed to talk to a programmer who told me that an algorithm is used to calculate player progression... He sent me this link from Wikipedia - Arithmetic Progression ...

I'm not really good at maths or with formulas... But once someone explains or just show an example of how things are done, I can take it over from there onwards... At the moment it's a bit tough for me to grasp...

Back to the drawing board...

##### Share on other sites
On 10/31/2018 at 6:24 AM, JoAndRoPo said:

I'm not really good at maths or with formulas... But once someone explains or just show an example of how things are done, I can take it over from there onwards... At the moment it's a bit tough for me to grasp...

Back to the drawing board...

Back to the drawing board of game design, not XP formulas!

• There is no mathematically advanced method to calculate experience points you should learn, it's only a matter of finding the right numbers for your game rules, and since there's no need for a human GM to manage XP accounting you don't need nice formulas that a player can remember in the first place.
• To know that the numbers are right, you need a solid understanding of what problems you want to address and what constraints you need to respect.
For example the Skinner box framework mentioned by Scouting Ninja (regulating the pace of rewards depending on how much one plays) and the traditional RPG inflation ratchet mentioned by me (progressively tougher enemies, demanding progressively stronger characters) are only two of the many different and unrelated reasons to use experience points
• Making one more step back, it might turn out that player levels and experience points are not useful for your needs and/or not a good fit for your game; several elements suggest this is the case (a solitaire doesn't offer much progression of any kind, playing is by itself a reward, and few meaningful player rewards are possible)

## Create an account

Register a new account

• ### Game Developer Survey

We are looking for qualified game developers to participate in a 10-minute online survey. Qualified participants will be offered a \$15 incentive for your time and insights. Click here to start!

• 12
• 30
• 9
• 16
• 12