Increased tick rate for more diverse Rate of fire?

Moderator: GZDoom Developers

Post Reply
BadInfluence
Posts: 5
Joined: Sun Jul 23, 2017 11:52 am

Increased tick rate for more diverse Rate of fire?

Post by BadInfluence »

I'm not far enough along in my own coding skills to really know if this is possible or not, but it'd be a real boon to modders like myself who want more variety in our weapons to be able to use a wider range of fire rates. I have an idea of how, if this is possible at all, to keep compatibility with existing mods and the original game.

The easiest way I can think of is to double it, to what Wolfenstein 3d ran at. So working with 70Hz the game has double the options for rate of fire, within a more diverse range. The trick would be telling the game to interpret the current values used as double what they are right now, effectively still running at 35hz, or 35fps. So using weapons as an example, 1 "frame" as it is designated in the weapons code is actually 2 real frames, with a new allowance for .5 "frames" that are just 1 real frame. This would mean that a gun using 1 real frame would have a ROF of 4200 Rpm, which is insane but useful for more accurately portraying miniguns. It also means that setting a frame to draw for say, 1.5 "frames" is 3 real frames, the usefulness of such a thing is dubious but someone might find a use for it.

Enemy animations would be the same, 1 "frame"= 2 real frames. While full 70fps animations are a bit much, small chunks of animation at this rate could probably be used to good effect, like a more easily telegraphed special attack or something. Somebody out there probably has a use for full 70fps character animations too, if it's an option it's probably going to be used by someone.

Powerups wouldn't need a change, they'd last the proper length of time already with the engine interpreting everything as double it's value at 70Hz, again effectively 35hz as normal.

I apologise if this comes across as if I think this is easy, if possible at all, I have no delusions about the challenges of coding. I'm just trying to figure out how to overcome the one thing that would stop me from using this engine/source port for this particular project. I really don't want to have to abandon parts of it. With all the crazy things this port allows doom to do now it fits the intended theme of an "alternate" timeline game, as if 3d graphics never took off, so the industry stuck with sprites and just upped their res and such. Upgrading older engines because why make a new one when the old one does it just fine?
User avatar
Arctangent
Posts: 1235
Joined: Thu Nov 06, 2014 1:53 pm
Contact:

Re: Increased tick rate for more diverse Rate of fire?

Post by Arctangent »

Yeah, uh, it's really beyond any sort of scope to alter the tick rate, given how much is tied to the assumption that it's locked to 35fps. Like, say, the entirety of the physics. As well as demo support, such as it is.

But there are tricks to fake what you're going for.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Increased tick rate for more diverse Rate of fire?

Post by Graf Zahl »

Sorry, but this is such an integral part of how the game works that it cannot simply be increased.
All the game's internal logic depends on 1/35 of a second and to change this value, everything else would have to changed along with it to still work.
BadInfluence
Posts: 5
Joined: Sun Jul 23, 2017 11:52 am

Re: Increased tick rate for more diverse Rate of fire?

Post by BadInfluence »

I've actually looked into the Half tick trick from GunLabs, the problem is how noticeable the inconsistent ROF is with some of the weapons I'm trying to replicate. I'm really bummed out now because GZDoom has everything else I need for this project, and reworking things to function with this limitation would mess with a big part of it. If there really were half tics for weapons that'd be great, but I doubt that's even possible.
User avatar
Major Cooke
Posts: 8170
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: Increased tick rate for more diverse Rate of fire?

Post by Major Cooke »

Right now, the best way to simulate it is by doing 2 of something in one tic, and only one of it in the following.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”