Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This feature comprises of the implementations needed for “loot” to drop from enemies and for it to be picked up by the player character.

What loot currently does and why it needs improvement:

  1. Loot is currently very static and rigid in appearance. When an enemy dies they drop a single sprite of loot that stays on that tile and floats until collected. There’s nothing dynamic about it.

  2. When loot is collected, it just vanishes and there’s only a very loose connection to associated UI elements such as numbers counting up for a second.

...

Loot Pinata’ing and Physics Driven Scattering:

Intended Design:

  • When enemies are destroyed or chests are opened I’d like for them to release their loot as one or more 2D sprite objects object/s which contains a physics collider that will allow it to bounce off walls and dungeon objects and finally come to rest on the floor.

  • Some objects such as treasure will be small and comprise of multiple objects. (eg: 1 treasure value = 1 sprite) With high levels of distance deviation away from the originating tile.

    • Other loot objects such as a key will be singular and not deviate much from the original tile. Dropping to the floor quickly and being picked up just as quickly if the player was still standing there.

  • This physics collider will drop the items to the floor in a dynamic way and these loot objects will bounce a few times before coming to rest on the floor.

  • These Loot objects will bounce off and not occupy environmental tile spaces that contain objects like pillars, walls, and tables.

  • Once the loot object comes to rest it will no longer move around until it is picked up by the player. It will lose its Dynamic Physics once it comes to rest.

  • NOTE: Dropped loot should not interact (ie: Bounce off) the player character or enemies. It should ignore them entirely while in motion.

...

Key Info for helping Developer Implementation:

...

Loot types and associated FSM global variables:

  • Treasure (Gold Color) = Tied to Global Int: Value Treasure

  • Health (Red Color) = Tied to Global Int: Player Health

  • EXP (Purple Color) = Tied to Global Int: Player EXP Total

  • Keys = Tired to Global Int: Chest Keys

Loot UI Destination Locations (In location and Unity Gameobject):

  • Treasure (Gold Color) = Gameobject Location in Unity is named “Treasure Readout”

  • Health (Red Color) = Gameobject Location in Unity is named “UI Willpower Hearts Manager”

  • EXP (Purple Color) = Gameobject Location in Unity is named “EXP Front of Bar - Location”

  • Keys (Key Sprite) = Gameobject Location in Unity is named “Keys Readout”

Locations on screen:

...

Proposed

...

“Exposed Values” for the Designer:

Loot Dropping Values (This is for each type of loot)

  • Spawn Position = A location associated with a game object so a custom spawning position can be made per enemy / chest.

  • Spawned Prefab Object = Will be associated with a prefab.

  • For each Loot loot object = Number of sprite objects spawned per Number associated with dropped loot.

    • EG for treasure: 2 treasure Treasure = 1 loot objectSprite Object. So if killing the enemy drops 20 loot. It drops 10 objects. Collecting each object will grant 2 loot.

  • Gravity Speed of dropped object = How fast it falls.

  • Number of bounces = How many times it bounces as it dropped.

  • Horizonal deviation = How far away from original position it travels.

  • Time to Valid Pickup = How long (measured in a float / fractions of seconds) until the object can be picked up by the player characters collection radius.

...