Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Experience / Leveling system #12

Open
nskins opened this issue Aug 21, 2016 · 3 comments
Open

Experience / Leveling system #12

nskins opened this issue Aug 21, 2016 · 3 comments

Comments

@nskins
Copy link
Owner

nskins commented Aug 21, 2016

There should be a system for the player gaining experience and leveling up stats. Perhaps, in general, entities will be assigned a level depending on the total of the stats?

One possible solution for the player is a class system. The player's class would contain the following:

  1. A function that defines the amount of experience needed to reach a level. Traditionally, such a function would be exponential.
  2. An array of hash objects (like Equippable's stat_change) that define the change in stats at each level. Alternatively, a linear progression would be simpler but more limiting.
  3. Other neat things.

To be continued...

Send pull requests to the level-system branch.

@mjvcallibrity
Copy link

Some other thoughts on how this might be implemented.

Somewhere in the code a constant could be defined that describes the various level tiers. EXPERIENCE_LEVELS = {1: 100, 2: 500, 3: 1200, 4: 2500, etc., etc.}

Then you could keep a running tally of experience points and run checks when trying to purchase a weapon, or perform some sort of action to see if the player's current level is greater than or equal to the level necessary to own a weapon or perform a specific action.

Also, when a player fights a monster and wins, exp goes up, but if player flees or dies, they lose exp. This way a player's level could stay fluid throughout the game.

Just some thoughts. I'm still familiarizing myself with goby and how all its parts work together.

@jrambold
Copy link

Hi I saw the help wanted tag on this and thought I'd try a hand at how this could be implemented. I'll probably have some questions about the range of stat increases going through.

@nskins
Copy link
Owner Author

nskins commented Jul 18, 2018

See #139.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants