Search Unity

retro fps-Differing angles for sprites

Discussion in '2D' started by shogunstudios, Nov 24, 2013.

  1. shogunstudios

    shogunstudios

    Joined:
    Nov 20, 2013
    Posts:
    18
    So me and a few friends were toying with the idea of making a retro fps loaded with easter eggs.

    We wound up deciding on unity as the program to use due to it's support over a wide area of other programs. However none of us know how to use unity. I however know how to use blender well. Well at least well enough for making retro style fps games.

    As in concept we planned on having the game combine retro graphics with some modern fps features like looking down iron sights, Hitboxes for headshots,grenades having their own button rather than switching to them manually, turrents, ect

    We looked at several tutorials on 2d sprites. We didn't find anything on use of showing sprites from other angles.

    So any help for beginners?
     
  2. unitylover

    unitylover

    Joined:
    Jul 6, 2013
    Posts:
    346
    Are you trying to make a 2D or 3D game?
     
  3. Neurological

    Neurological

    Joined:
    Jun 25, 2012
    Posts:
    350
    I think he is doing something like Doom 1/2, so is still 3d but all enemies items and such are 2d billboarded sprites.

    Well to the OP, since I'm doing the same thing I asked few things on unity answers that you may find usefull on what you are trying to do:

    http://answers.unity3d.com/questions/404947/8-directional-sprite-in-3d-world-how-to-retrieve-d.html

    http://answers.unity3d.com/questions/401695/8-directional-sprite-in-3d-world-how-to-retrieve-a.html
     
  4. shogunstudios

    shogunstudios

    Joined:
    Nov 20, 2013
    Posts:
    18
    Just what I needed. Now to figure out how I should implement hitboxes. What I was thinking was to have a 3d model (invisible to the player of course) Consisting of 3 sections. Head,body,and legs. Now how would I combine that and the scripts.
     
  5. Neurological

    Neurological

    Joined:
    Jun 25, 2012
    Posts:
    350
    You can skip the need of a 3d model, all you need are colliders, maybe an animated skeleton to fit the sprite anim and child the colliders to the bones.

    As for the sprite you have to manage it separatly. I can tell what I do, but you may have other alternatives. I keep one collider as the bounding box of the monster, I don't use hit detection on body parts so for me the job is easier, but anyway I child the sprite to the collider, mind that the sprite face always the camera and isn't related to the collider position. I calculate sprite animation direction from the collider direction, so in reality is the collider "walking" around the map and not the sprite.

    Now in your case is different, as you want the hit detection always facing player too like the sprite, so you can use the billboard effect on both sprite and your colliders, but still you need a reference for the monster direction, so you would still parent the sprite + colliders to somethign else that move the monster.

    Probably is the worst explanation you have ever read, but sadly can't show you screenshots of inside the editor as my pc is dead, and on this laptop can't open anything.
     
unityunity