Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Fake hitscan enemies. Am I a mad man?

Discussion in 'Game Design' started by Not_Sure, Jul 5, 2021.

  1. Not_Sure

    Not_Sure

    Joined:
    Dec 13, 2011
    Posts:
    3,546
    Working in my Doom/Metroidvania and I had a mechanic in mind for hitscan enemies to make them fair, but I think I just realized I’m nuking this and made an easier solution.

    What if hitscan enemies lied about being hit scan?

    What if instead I had them “shooting” invisible colliders that increased in speed and size as they hone in on you.

    All the while they will be taking shots that miss, if a collider hits you, they do the animation of shooting and hitting you.

    So the player will be able to “dodge” hit scanners, but it becomes increasingly more difficult.

    Does this sound frustrating or fun?

    Should players be made aware of how this mechanic works?

    Any suggestions on how to make hitscan enemies more fair and fun?
     
  2. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    It sounds like a waste of time. Gamers just want to feel like it is fun. Why not make a prototype and the community can try the idea?
     
    Not_Sure likes this.
  3. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,193
    Faking it seems fine. And I don't think you need to tell the player anything. As to the specific approach you use, that seems less important.

    I have gun turrets in some levels. They'll always perfectly track the player's position, but firing involves applying a random amount of "error" to the aim direction. So, even though the gun is perfectly aimed at the player, any given raycast will have some rotational error applied to it, which may result in a miss.

    Another thing I do is that the first few shots a turret fires (after being idle for long enough) are guaranteed to miss. This encourages a play style where you can fairly safely rush out from cover, but you need to return to cover and hide for a couple of seconds to get the Turret to forget you. Even if players don't realize that, it still means players don't immediately die if they turn a corner and see a turret. The turret will shoot at them, the player will freak out and run for cover, but the shots will actually all miss. Only if they stand around do the shots start being accurate again.

    Anyway, I expect that faking your raycasts in one way or another is a completely standard thing to avoid making AI enemies too impossible. You could also just decide that any given bullet does or doesn't hit the player, even if the raycast was accurate, at random.
     
  4. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    Agree with hippo, it's a lot better to play ideas rather than ponder them.

    I'd just focus on getting an enemy to detect the player, then shoot the player. Have a some variables for "how many shots until will hit" or "time to target", etc. Keep it simple. Adjust for fun using the simplest method possible, post playtesting.

    i'd love to play more of your ideas in feedback friday. the grappling hook was fun, felt like a good start to something
     
    Not_Sure likes this.