Valuable - brandoncimino/fortune-fountain-g GitHub Wiki

Valuables are items that can be thrown into the well in exchange for karma.

Technical Design

The types of valuables are enumerated in ValuableType.cs.

In a (probably poor and definitely misguided) attempt to mimic Java-style enums, ValuableType.cs is combined with ValuableModel.cs and ValuableDatabase.cs:

ValuableType.cs

Enumerates the different types of valuables. Should be used as parameters and variable type whenever possible, as it is strict, consistent, and easy to refactor.

Corresponds to the Java.lang.Enum.name() method.

ValuableModel.cs

Contains all of the "extra stuff" that a Java-style enum would have beyond just ValuableType.cs. Should never need to be instantiated outside of ValuableDatabase.cs.

ValuableDatabase.cs

Maps each ValuableType.cs to an instance of ValuableModel.cs.

Game Design

Fortune Fountain Classic

Penny

A basic penny.

Dollar

A golden dollar coin.

Silver

A 1 troy-oz bar of silver.

Gold

A 1 troy-oz bar of gold.

Gem

Various colors of gemstones.

  • Each valuable has 1 3D model and 1 texture.

  • The first 5 grabbed (i.e. added to the player’s hand) generate 1 GameObject each - i.e. 5 Pennies in hand == 5 Penny GameObjects.

  • After that, it takes 5 valuables to generate 1 GameObject - i.e. 10 Pennies in hand == 6 Penny GameObjects. To denote that this new Penny GameObject is "special", it is colorized.

  • This pattern continues exponentially - after 5 "valuable x5" GameObjects are generated (meaning 30 valuables are in the player’s hand), valuable GameObjects are generated whenever 25 valuables are grabbed, with a new color used at each "magnitude".

  • It was important for this system to be flexible and reversible: for example, being able to determine the number of GameObjects required to represent an arbitrary number of valuables was important, or be able to change the number of GameObjects used for each "magnitude".

Fortune Fountain G

We can still use this "magnitude" system, as with Fortune Fountain Classic, but instead of having the "magnitudes" represented by colorized versions of the same model, we can have the magnitudes use different items of the same type of "value store":

  • Valuables would be changed from one specific real-world item (such as "Penny") to be a type of real-world store of value, such as "Coin".

  • Previous valuables would be combined - "Penny" and "Dollar" would become different magnitudes of "Coin"; "Silver" and "Gold" would become different magnitudes of "Metal".

  • Each magnitude would require a unique model and/or texture.

  • For now, the separation of magnitudes would be purely visual - essentially, we would now be using different models to represent the magnitudes rather than just colors - but this could be expanded in the future, such as having certain bonuses apply only to certain magnitudes.

New Valuables

Valuables have tier, while throwables have a magnitude.

  1. Coin

    1. Penny

    2. Dollar

    3. Piece of Eight

    4. Doubloon

  2. Metal

    1. Silver

    2. Gold

    3. Platinum

    4. Uranium

  3. Gem

    1. Glass

    2. Garnet

    3. Salt

    4. Painite

  4. Fiduciary

    1. Gift Card

    2. Bond d.

  5. Scrip

    1. IOU

    2. Arcade Token

    3. Bottle Cap

    4. Gasoline

  6. Collectible

    1. Stuffed Animal

    2. Trading Card

    3. Painting

    4. Sculpture

  7. Livestock

    1. Rabbit

    2. Chicken

    3. Cow

    4. Camel

  8. Speculative

    1. South Sea Lottery Ticket

    2. Stock

    3. Cryptocurrency

⚠️ **GitHub.com Fallback** ⚠️