XNA Creators Club Online
Page 1 of 1 (3 items)
Sort Posts: Previous Next

Weapon rotation

Last post 21/06/2009 3:11 by Sir Cmpwn. 2 replies.
  • 11/06/2009 22:55

    Weapon rotation

    Hi all
    I am making a game where I want to include several different kinds of weapons in a 2D side scrolling perspective.  The player is going to control with the right thumbstick pointing in the direction of the shot.  Each weapon will be unique and will have its own animations for recoil and such.  My idea is to draw the player's back arm first, then their body, and then draw the front arm.  I would then switch out the arms as appropriate for each weapon.  Is this the best way to go about it?
    -- Sir Cmpwn
  • 12/06/2009 12:09 In reply to

    Re: Weapon rotation

    Generally, no.

    It is AN approach, and it will work, but you can't do subtle effects on the sprites this way.

    Things like highlights on the character body when a weapon with a big muzzle flash is fired.

    It is a trade off.  By having the weapon as a seperate sprite you get much more control of the direction of fire but less quality in the graphics.

    It is up to you which you prefer, I have done both in the past and much prefer having lot's of lovely sprites, but then again I didn't have to draw them ;>


    Information is not knowledge, knowledge is not wisdom, wisdom is not truth, truth is not beauty, beauty is not love, love is not music, music is the best! Wisdom is the domain of the Wis (which is extinct).
  • 21/06/2009 3:11 In reply to

    Re: Weapon rotation

    When did I say sprites? ;)

    If you check out this http://forums.xna.com/forums/p/32987/191925.aspx#191925 post I discuss how to have 2D and 3D models coexist.  But I want to know how to combine the animated models (3D) of the body and the rotated arms with various weapons.  And because of the multitude of weapons I want to include and various behaviors of each, I want the arms to have the weapons on them and just swap those out.  It also doesn't need to be perfectly combined with arms and body ect, but it just needs to look that way.  A good example of this technique is in Valve's Half-Life 2:Episode 1.  If you watch the developer commentary, at the moment you get the crowbar, there are 3 models: the one laying around, the one that Barney yanks up, and the one he holds out.
    -- Sir Cmpwn
Page 1 of 1 (3 items) Previous Next