• WhiskyTangoFoxtrot@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      3 minutes ago

      They probably thought that all their NPCs would be human when they started the game, so they named their NPC class Human. Then they decided to add dogs, but needed them to do a lot of the same things the human NPCs did, so they made the Dog class a subclass of Human.

      • jaybone@lemmy.zip
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 hour ago

        See you just said mammal. Why not have them both extend from that? Then they define a property or a method which modifies how they jump over a fence.

    • BehindTheBarrier@programming.dev
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      2 hours ago

      In modern games, I think it’s fairly common to have a common 3d skeletons share names. So you can make animations like the one above apply to any character even if they have differences. It doesn’t mean that dog extends human, but it may mean that a dog model shares a lot of common “bones”, that are used for movement, with a human model.

      So when a human animation is applied to the dog, you can see it warp to start position of the animation, move, and then then stop at the end position as a standing human, before warping back to idle animation (when it turns back into the dog shape)

      Related, weapons in Destiny also share the same components across weapon types, and bugs have caused one weapon type to be used for another weapon, making funny things happen. Like how a hand canon (pistol) stretches like a bow because it’s model got used in place of the bow model at the start of this clip:

      https://www.youtube.com/watch?v=0YZa9vv5U0M

    • ulterno@programming.dev
      link
      fedilink
      English
      arrow-up
      0
      ·
      2 hours ago

      Yeah, seems weird.
      Normally one would use multiple horses and some ropes for that. No idea how you would manage that with a single dog