Search Unity

unity 5 brutal doom type- what will be different due to changes in engine

Discussion in '2D' started by shogunstudios, Sep 16, 2016.

  1. shogunstudios

    shogunstudios

    Joined:
    Nov 20, 2013
    Posts:
    18
    So a friend of mine and I were talking about how brutal doom pretty much made doom 1 and 2 even more amazing. essentially this led to a question of making a new game like so.

    After our nostalgia trips we began to think on such and due to my lack of keeping up with unity in my time away I have no clue how it would work with the new UI options. and 2d interface.

    Like in brutal doom I know you got headshots. I know in the 2d engine you can set colliders for such but how could you do that in the 3d engine using planes.

    I also don't know if the creation of sprites for enemies is the same, Going to be honest here. don't know how that was done in older versions either. as for AI and finishing moves wouldn't know how to program that in either. Its been to long. Some pointers in the right direction would be great.
     
  2. LiterallyJeff

    LiterallyJeff

    Joined:
    Jan 21, 2015
    Posts:
    2,807
    SInce it's a 3D game, i would use 3D colliders. You can make 2D enemies with either a quad and texture set to Cutout on the material, or a SpriteRenderer component. They get a script that keeps them oriented to face the camera.

    The new Unity UI system is much easier to work with than the previous GUI system, and there are loads of tutorials from Unity and the community for it.

    You should break your post down into some specific questions and you'll get more detailed responses.
     
    vakabaka likes this.
  3. shogunstudios

    shogunstudios

    Joined:
    Nov 20, 2013
    Posts:
    18
    Sorry bout that. so what about directional sprite. how is that done?
     
  4. LiterallyJeff

    LiterallyJeff

    Joined:
    Jan 21, 2015
    Posts:
    2,807
    The enemy could keep track of the fake "direction" that it is facing. This is not the direction the actual sprite is facing (that always faces the camera), but the direction that the enemy should appear to be facing. That direction is changed when the enemy notices the player or whenever. That fake direction is then compared to the direction towards the camera. The angle between those two directions determines which sprite is shown. Each sprite would be mapped to a numSprites/360 range of angles.

    For simplicity's sake, you could make the enemy's transform always face that "fake" direction, and keep the sprite separate and facing the camera. That will make lots of operations much easier because you can use enemy.transform.forward for all your "which way is the enemy facing" operations.

    Here's a post about getting the an angle between -180 and 180 to a target object.
     
    Last edited: Sep 16, 2016