Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Prior to 2.3.0, I had this script going that allowed a player to fly similar in fashion to how Tails flies in Sonic 3. The difference is that it is push and hold, instead of tap like mad. It worked okay, though the player was capable of flying pretty high pretty quickly. I used this little deficiency to my advantage for a little bit.
Now, it's a bit fucked up. Here's how:
Jump in the air, and start flying while you still have upward motion. You'll fly higher as per normal.
Let go for a bit until you have downward momentum. Previously, you can recover and rise again. Now, it only stops descent, preventing you from rising again until you fall and land.
When messing with the wad, set sv_aircontrol to 0.2.
XutaWoo wrote:Perhaps you could boost the thrust if downward momentum is too high?
I tried this, actually, then it went to a half-broke state. Sometimes, it did the same thing, and sometimes, the player shoots out like a cannon in the air -- not what I want to do, either.
So, I was wondering, why should it be considered a "bug" for gravity to be consistent? I always thought it was screwy that Doom doubled gravity if your current vertical velocity happened to be one specific value, once I found out it did that. Hence, the reason I changed it in the first place. I think that restoring the quirky Doom behaviour should have been done as a compatibility flag rather than as an "always on" thing, but I couldn't think of any specific counterexamples for why that was bad. Until now.
randy wrote:So, I was wondering, why should it be considered a "bug" for gravity to be consistent? I always thought it was screwy that Doom doubled gravity if your current vertical velocity happened to be one specific value, once I found out it did that. Hence, the reason I changed it in the first place. I think that restoring the quirky Doom behaviour should have been done as a compatibility flag rather than as an "always on" thing, but I couldn't think of any specific counterexamples for why that was bad. Until now.
randy wrote:So, I was wondering, why should it be considered a "bug" for gravity to be consistent? I always thought it was screwy that Doom doubled gravity if your current vertical velocity happened to be one specific value, once I found out it did that. Hence, the reason I changed it in the first place. I think that restoring the quirky Doom behaviour should have been done as a compatibility flag rather than as an "always on" thing, but I couldn't think of any specific counterexamples for why that was bad. Until now.
I don't want to sound harsh - but changes like this one is what gives ZDoom a somewhat questionable reputation in certain circles - and I can fully understand why these people think like that.
I didn't add a compatibility option because I really didn't expect hacky scripts like this one. All I noticed was that in several Doom maps with the altered formula it was possible to jump over gaps you were not supposed to jump over and then finally a map was posted at Doomworld that just happened to work while it didn't on any other port.
But yes, if it really affects existing mods it needs to be compatibility optioned.
Graf Zahl wrote:I don't want to sound harsh - but changes like this one is what gives ZDoom a somewhat questionable reputation in certain circles - and I can fully understand why these people think like that.
I didn't add a compatibility option because I really didn't expect hacky scripts like this one. All I noticed was that in several Doom maps with the altered formula it was possible to jump over gaps you were not supposed to jump over and then finally a map was posted at Doomworld that just happened to work while it didn't on any other port.
But yes, if it really affects existing mods it needs to be compatibility optioned.
So if this script is so "hacky" (given that the gravity seems like a bit of a hack in the first place), do you have any other alternatives to what I am trying to achieve?
ON second thought, maybe a different approach is better: The original double gravity when there's zero vertical momentum only gets applied when the last tic before this one the actor was standing on solid ground. That would solve the problem with being able to run over wide gaps but wouldn't interfere with flying or jumping or other gravity related actions - and it would avoid yet another compatibility option while preserving proper gravity in most cases.
Graf Zahl wrote:I don't want to sound harsh - but changes like this one is what gives ZDoom a somewhat questionable reputation in certain circles - and I can fully understand why these people think like that.
Be that as it may, I still want to know what they were thinking when they wrote that. So a player arrives at a particular height one tic earlier than they otherwise would have while falling. What's the point?
Graf Zahl wrote:ON second thought, maybe a different approach is better: The original double gravity when there's zero vertical momentum only gets applied when the last tic before this one the actor was standing on solid ground.
That would probably be satisfactory. Alternatively, it would probably be sufficient and easier to subtract the speed of gravity from a player's stepheight when they're falling. The end result of preventing players from running across gaps ought to be the same. (Rather than "losing" a tic of falling time at the start of the fall, you "lose" it when stepping onto something instead.)
Xaser wrote:What will this do to maps that have been built around the idea that you're supposed to run over these wider gaps?
Not that I can name one off the top of my head, mind you, but something is bound to come up.
Doom Raider.
Of course none of this is actually helping the (relatively new) problem of how hacky the script even is -- at least, in Graf's own words. There has to be a better way than continually thrusting a player in the air in such a delicate fashion.
Graf Zahl wrote:I don't want to sound harsh - but changes like this one is what gives ZDoom a somewhat questionable reputation in certain circles - and I can fully understand why these people think like that.
Be that as it may, I still want to know what they were thinking when they wrote that. So a player arrives at a particular height one tic earlier than they otherwise would have while falling. What's the point?
No idea. Of course the original code was written without jumping in mind. So it was probably just a minor tweak to shorten the distance the player could cross when running through the air.
Graf Zahl wrote:ON second thought, maybe a different approach is better: The original double gravity when there's zero vertical momentum only gets applied when the last tic before this one the actor was standing on solid ground.
That would probably be satisfactory. Alternatively, it would probably be sufficient and easier to subtract the speed of gravity from a player's stepheight when they're falling. The end result of preventing players from running across gaps ought to be the same. (Rather than "losing" a tic of falling time at the start of the fall, you "lose" it when stepping onto something instead.)
Actually not because the added gravity gets applied per tic so if the actor falls for 10 tics it means a difference of 10 map units, not 1.
If this is being looked at, can the other problem that has raised its head a number of times relating to jumping be looked at with it? ie the timing of the jump. To recap:
In most games, provided you haven't actually started falling off something, you can still jump. In Zdoom, if your centre point has passed off the edge of a platform, you cannot jump but you haven't actually fallen off the platform yet. This makes it very difficult to time jumps properly sometimes (when running towards the edge of a platform) and, as often as not, you just end up falling off the edge of the platform - despite pressing jump before you start dropping.