Forum begins after the advertisement:


[Part 5] Storing the Level Range in a ScriptableObject vs. nested class

Home Forums Video Game Tutorial Series Creating a Rogue-like Shoot-em Up in Unity [Part 5] Storing the Level Range in a ScriptableObject vs. nested class

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #11894
    Terence
    Keymaster

    Question from TripleCreeper3 in Part 5’s YouTube’s comments:

    Don’t you think it would be better to store the level ranges in scriptable objects or even in the character scriptable objects? Maybe it’s because it’s the first time i see nested classes, but it looks weird to store data in a class, like it’s a python dictionary, what’s the reason?

    #11895
    Terence
    Keymaster

    Yes, it is also possible to store the level ranges in ScriptableObjects. Whether you choose a ScriptableObject or a nested class depends on whether your level ranges are reusable. In a game like Pokemon for example, all the species belong to 6 types of level ranges, so if you have something similar, then using ScriptableObjects to represent the level ranges will be best, since then you can reuse these level ranges for different characters.

    But if each of your characters has a unique level range, it may be more effective to make the level range a part of the class, then prefab the whole GameObject.

    Hope this makes sense!

    In Pokemon, different experience formulas are used for different groups of Pokemon with different growth rates. This can replace the Level Range that we use in the tutorial as well. Here is the experience system in Pokemon: https://bulbapedia.bulbagarden.net/wiki/Experience#Relation_to_level

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Go to Login Page →


Advertisement below: