[Code] Iron Sights for Doom

Post your example zscripts/ACS scripts/etc here.
Forum rules
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.

Got a cool project idea but nothing else? Put it in the project ideas thread instead!

Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.

Please read the full rules for more details.
Post Reply
User avatar
Snarboo
Posts: 2599
Joined: Tue Nov 29, 2005 4:37 am

[Code] Iron Sights for Doom

Post by Snarboo »

I haven't seen iron sights implemented in ZDoom yet despite the existence of [wiki]A_ZoomFactor[/wiki], so I decided to tackle them myself. I'm uploading this as a code base for others so hopefully this will inspire some of you to add this to your own mods. :)

The mod:
Iron Sights

Some notes about this release:
  • I used Perkristian's Smooth Weapon Animations mod as a base for this one. Phi108 is responsible for the original code, with a few minor additions by yours truly.
  • Only the pistol and shotgun have iron sights.
  • I dabbled with two different iron sight styles: silhouette (as seen in Operation Flashpoint) for the pistol and modern "blurred" sights for the shotgun. Despite the fact that I only spent about five minutes on the blur effect, I'd say the shotgun's iron sights are the strongest of the two.
  • Feel free to use this code in your own projects or as a general base.
  • Please give credit where credit is due: Phi108 was responsible for the base code, while Perkristian created most of the shotgun graphics! I simply extended the code, added the original left handed pistol graphics, and created the iron sights. Crediting me isn't necessary.
Some screenshots:
Spoiler:
User avatar
Marisa the Magician
Posts: 3886
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Operating System Version (Optional): (btw I use) Arch
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia
Contact:

Re: [Code] Iron Sights for Doom

Post by Marisa the Magician »

That's impressive, man. :)
User avatar
rollingcrow
Posts: 733
Joined: Tue Mar 02, 2010 8:30 pm
Graphics Processor: nVidia with Vulkan support

Re: [Code] Iron Sights for Doom

Post by rollingcrow »

I like the blurring effect :D
User avatar
WORrior
Posts: 46
Joined: Sun Oct 03, 2010 11:22 pm

Re: [Code] Iron Sights for Doom

Post by WORrior »

Wow, glad to see that mod :) I'd just suggest to remove the crosshair while ironsightening.

(And bottom line: I've recently finished implementing such feature to my upcoming groundbreaking/breathtaking/awesome WAD so hope your one won't develop in the same way as mine... since I'm screwed then ;))

EDIT Better late than never: I think you've stated pretty clear that you consider it finished... anyway, great job. Time to snipe some imps!
Post Reply

Return to “Script Library”