Search Unity

Energy, Damage, and Pickups

Discussion in 'Open Projects' started by brianbiegner, Oct 3, 2020.

  1. brianbiegner

    brianbiegner

    Joined:
    Oct 12, 2019
    Posts:
    3
    Hi, if it's ok I'd like to work on these basic aspects of gameplay (though tied to combat, can be worked on before nailing down how we want that to work). Here's a broad look at what I think that might look like. Possible expansions are things that could be added if people want, but likely not all as to limit the scope. Those would probably reliant on what the combat system demands.

    Energy:
    Energy would be a part of a generic Character, either as an additional component or and expansion of the character class. A character's remaining energy will display as a bar above their head. If the character is reduced to 0 Energy, they enter a death animation. If the protagonist dies, this triggers the game over state.
    Possible Expansion:
    Characters with more max Energy could have larger Energy bar. Especially powerful enemies may have multiple layers of bar.

    Damage:
    Damage will be done through hurtboxes. A hurtbox will have a set amount of damage it will do and can have an owner (though not always). The owner of a hurtbox cannot be damaged by it. When a character is damaged, they will lose some of their Energy, enter a hit stun animation state, and become invincible for a few seconds (assuming they didn't die).
    Possible Expansion:
    Hurtboxes could have an elemental component. If not for an elemental weakness and resistance system, characters may have different hit stun animations based on the type of damage. (characters could be knocked back, set on fire, electrocuted, etc)

    Pickups:
    Pickups would likely be part of a separate system, but would be the primary source of restoring Energy. The protagonist can collect a pickup by walking over it. Though the current focus will be on health, Pickups can likely be abstracted to account for other systems we may include in the future, such as projectile weapon ammo, or collecting key items.
    Possible Expansion:
    Pickups will drop from containers, or drop from enemies upon death.


    Hopefully I'm thinking about this right, and hasn't been talked about before. I'm guessing most of this is sort of a given but I figure it couldn't hurt to write it out, especially as it encompasses what I'm requesting to work on. I didn't see any references to it on the forum or in the code yet so maybe?
     
  2. dkaloger

    dkaloger

    Joined:
    Jul 7, 2019
    Posts:
    39
    i think this is a very important part that hasn't been disused a lot . everything you said is great but i think using bars to display health and energy are inferior solutions to using repeating sprites
     
  3. brianbiegner

    brianbiegner

    Joined:
    Oct 12, 2019
    Posts:
    3
    A pip system for health could also work. The difference would only be in considering health as smaller units rather than a larger value and a percentage. I definitely agree that as long as we're not getting into large numbers (in a way a turnbased rpg might) a simpler system be easier for the player to understand. What that might look like visually would be more in the hands of ui/ux and art direction. For this early stage it should be fine to display it as a bar or maybe some simple sprites.
     
  4. SideSwipe9th

    SideSwipe9th

    Joined:
    Jan 10, 2019
    Posts:
    46
    Because there's a bunch of overlap here with item pickups, you might want to check in on what we're doing over in the Inventory System thread. You also will want to check in on the Character State Machine thread as those guys are almost certainly setting up some of the state systems regarding health and animations.