Jump to content
  • 0

Animating recoil on angled weapon sprites


SpaceTrash

Question

Hey so I'm trying to make a bolter sprite I'm working on look like it's kicking back when fired. But currently it just sort of looks like it's wiggling. Can anyone point me at any good examples or guides for how to do this?

Share this post


Link to post

2 answers to this question

Recommended Posts

  • 1

If you're using Decorate or ZScript, add Offset(#,#) after the frame. The left number refers to the x axis and the right refers to the y axis.

 

For example: FRME A 1 Offset (0,32) would be completely centered and are the default values. To shift right, make the zero a positive number and to shift left, make the zero a negative number. To shift up, change 32 to a higher number and  to shift down, use a lower number.

 

Say the angled gun is right handed, you might want the recoil to go down and to the right, and then bring it back to its starting position.

FRME A 1 Offset (2,33) A_FireProjectile
FRME A 1 Offset (3,36)
FRME A 2 Offset (4,40)
FRME A 4 Offset (3,38)
FRME A 3 Offset (2,36)
FRME A 2 Offset (1,34)
FRME A 2 Offset (0,32)

Of course you'll have to play around with the numbers to get it to feel right, but that's the idea.

https://zdoom.org/wiki/Offset

https://zdoom.org/wiki/A_WeaponOffset

 

If you're not using Decorate or Zscript or if you just want to bloat your wad then you can copy the sprite enough times to match the weapon's fire frames and physically move each sprite in Slade to animate the recoil.

Share this post


Link to post
  • 0

I might be too late for this, but I find that a way to help visualise it without having to test a bunch of numbers is to drag the individual firing sprites into roughly the correct position (in the sprite viewing mode you can drag the sprite and adjust it's internal offsets) before fine-tweaking them with numbers, although ultimately you'll still have to do a lot of testing, but it saves some time if you're having trouble imagining it.

 

If you're using Zdoom or GZdoom you can also additionally create blur frames with image editing software to simulate the fast movement, as well as adding tilt to emphasize the kickback, but that may be a bit overkill for your needs. Just throwing the idea out there though if you're up for it.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...