For those who think Doom can be a bit too relentless when it comes to your enemies' damage output...
Introducing: i-frames!
A very simple mod that adds old-school looking invincibility frames, nullifying any* damage you take after you've taken a hit, be it a tiny scratch or being hit with a cannonball 10 times your own size!
Should be compatible with other gameplay mods, and the duration is customizable - going up to a whole second!
* strictly against enemy/object attacks. World hazards (such as damaging floors, crushers, quakes) and self-damage bypass i-frames.
Consider it a tiny experiment of mine, as well as zscript practice. Please excuse my abhorent code...
Feel free to use the idea/code in your own project - credits would be appreciated, but not nessesary!
Download 1.0 here!
Universal i-frames
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.
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.
- Caligari87
- Admin
- Posts: 6225
- Joined: Thu Feb 26, 2004 3:02 pm
- Preferred Pronouns: He/Him
- Contact:
Re: Universal i-frames
Really clever idea, I like it.
Some fun tweaks might be an option where the length of i-frame scales to the amount of damage (5 damage = 1 second, 10 damage = 2 seconds, etc), or a maximum "DPS" rate (e.g. you only take a maximum of 5 damage every second, so you can be guaranteed to survive at least 20 seconds from 100% health)

Some fun tweaks might be an option where the length of i-frame scales to the amount of damage (5 damage = 1 second, 10 damage = 2 seconds, etc), or a maximum "DPS" rate (e.g. you only take a maximum of 5 damage every second, so you can be guaranteed to survive at least 20 seconds from 100% health)

-
- Posts: 279
- Joined: Mon Jun 06, 2016 11:26 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Widnows 11
- Graphics Processor: nVidia with Vulkan support
Re: Universal i-frames
A thought for another option: When you're in iframes and not taking damage, if you're hit by something that does a larger amount of damage, you still take the difference.
So like, if you're hit for 5 from something, then 20 from something, then 10 from something, then 50 from something all within the length of an iframe, it's 5 + 15 + 0 + 30 so by the end of the iframe you've taken the total amount of damage of the largest hit (50).
There's some fun tactical strategy to "get hit by the soft attacks so you can tank a bigger attack" in a lot of games, but honestly, that doesn't feel very Doom to me. In my head at least, using it as a sort of throttle that doesn't give you absolute invulnerability, but instead just kinda... limits you to one hit at a time, but lets in the biggest one, feels pretty good.
I do also like the idea of iframe duration being related to how much damage the hit does, so chainguns and plasma guns are still effective without having to have very short durations for heavier attacks.
An *idea* is that each attack could add an amount of invisible 'shielding' to you equal to its damage, so a hit for 1 damage adds 1 shielding (reducing all attacks by that mount as long as that shield still exists) and the next hit is 20, doing 19 damage and adding 19 shielding (with a separate timer). The 1 shielding from before still exists, giving you 20 total shielding, but when the first shield drops, you're down to 19 shielding briefly (and if a 20 damage hit lands during that period, it does 1 damage, and adds 1 shield) With that, basically the higher the DPS you're under, the more damage resistance you have, but since shielding amount is equal to damage done (or, by way of settings, a multiplier/divisor) it still lets a reasonable amount of damage through over time. Then if you combined that with "iframe duration is proportional to damage" like mentioned before, as an additional option, you could then make it so that weapons like miniguns basically do nothing because their iframes fade so quickly, and it only really protects you from having like 20 minigunners hitting you all at once, a rocket tossed down at you would still slam you hard, but a single rocket would give you a half second or so of brief reprieve to figure out what you're doing next.
So like, if you're hit for 5 from something, then 20 from something, then 10 from something, then 50 from something all within the length of an iframe, it's 5 + 15 + 0 + 30 so by the end of the iframe you've taken the total amount of damage of the largest hit (50).
There's some fun tactical strategy to "get hit by the soft attacks so you can tank a bigger attack" in a lot of games, but honestly, that doesn't feel very Doom to me. In my head at least, using it as a sort of throttle that doesn't give you absolute invulnerability, but instead just kinda... limits you to one hit at a time, but lets in the biggest one, feels pretty good.
I do also like the idea of iframe duration being related to how much damage the hit does, so chainguns and plasma guns are still effective without having to have very short durations for heavier attacks.
An *idea* is that each attack could add an amount of invisible 'shielding' to you equal to its damage, so a hit for 1 damage adds 1 shielding (reducing all attacks by that mount as long as that shield still exists) and the next hit is 20, doing 19 damage and adding 19 shielding (with a separate timer). The 1 shielding from before still exists, giving you 20 total shielding, but when the first shield drops, you're down to 19 shielding briefly (and if a 20 damage hit lands during that period, it does 1 damage, and adds 1 shield) With that, basically the higher the DPS you're under, the more damage resistance you have, but since shielding amount is equal to damage done (or, by way of settings, a multiplier/divisor) it still lets a reasonable amount of damage through over time. Then if you combined that with "iframe duration is proportional to damage" like mentioned before, as an additional option, you could then make it so that weapons like miniguns basically do nothing because their iframes fade so quickly, and it only really protects you from having like 20 minigunners hitting you all at once, a rocket tossed down at you would still slam you hard, but a single rocket would give you a half second or so of brief reprieve to figure out what you're doing next.
Re: Universal i-frames
interesting. should work well with other old school mods.
Re: Universal i-frames
Cool mod, thanks for sharing.