Less Slippery Doom Movement (May 2018 ZScript rewrite)

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.
User avatar
Jekyll Grim Payne
 
 
Posts: 1065
Joined: Mon Jul 21, 2008 4:08 am
Preferred Pronouns: He/Him
Graphics Processor: nVidia (Modern GZDoom)
Contact:

Re: [CODE] Less Slippery Doom Movement (Dec 2013 update)

Post by Jekyll Grim Payne »

Hey, sorry for resurrecting it like this, but it's actually something I've wanted for a while. But I have a question: is there any way to tie this to the moment of landing after a jump?
This may be too specific, but the thing is that slippery movement itself suits Doom just fine. However, it makes any jumping puzzles feel horrible, weird and discouraged me from making them ever. If there was any way to make the doom guy NOT slide after landing but do it in any other case, that would be amazing. For now I can't wrap my head around it though.
User avatar
doony
Posts: 161
Joined: Wed May 27, 2009 8:34 pm
Location: more than a year developing a gameplay mod
Contact:

Re: [CODE] Less Slippery Doom Movement (Dec 2013 update)

Post by doony »

this is wonderful, a better relistic experience playing the game without mario physics, the control flows solid and precise, thank you very much, if I was a doomworld user I would definitively vote this for the best mod of the year as far 2016 goes

(edit)
oh, this is from 2013?
User avatar
scalliano
Posts: 2848
Joined: Tue Jun 21, 2005 1:16 pm
Location: Ireland

Re: [CODE] Less Slippery Doom Movement (Dec 2013 update)

Post by scalliano »

Combine this with the GZShmup mod and you're golden.

EDIT: Ah, just saw the date.
agenten
Posts: 14
Joined: Sun Dec 04, 2016 10:34 am

Re: [CODE] Less Slippery Doom Movement (Dec 2013 update)

Post by agenten »

Is it in poor taste to necrobump this just to tell you how much I appreciate it? This is almost EXACTLY what I need for my TC. Thank you 2013 Nash, from 2017 me.
(of course I would love to see an engine-supported solution that works in netplay--an Actor accel/deccel property in Decorate would be ideal, if only...)

scalliano wrote:Combine this with the GZShmup mod and you're golden.

EDIT: Ah, just saw the date.
I still second this.
User avatar
Nash
 
 
Posts: 17434
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: [CODE] Less Slippery Doom Movement (Dec 2013 update)

Post by Nash »

You're welcome agenten!

I have an updated, ZScriptified version that works(tm) in netplay just fine, but I'm currently ultra busy (moving houses)... I'll be sure to post it up here ASAP
User avatar
Zen3001
Posts: 412
Joined: Fri Nov 25, 2016 7:17 am
Location: some northern german shithole

Re: [CODE] Less Slippery Doom Movement (Dec 2013 update)

Post by Zen3001 »

Nash wrote:You're welcome agenten!

I have an updated, ZScriptified version that works(tm) in netplay just fine, but I'm currently ultra busy (moving houses)... I'll be sure to post it up here ASAP
I hope you upload it here soon and haven't forgoten about it.
while you do that here is what I made by trying to zscript my first time, I#m also not a really good prgrammer so there might be issues I didn't notice.

Code: Select all

class AirControledDoomPlayer : DoomPlayer{
	Default{
		Speed 8.75;
	}
	override void MovePlayer(){
		Super.MovePlayer();
		if (floorz == pos.z){
			A_ScaleVelocity(0.45);
		}else{
			A_ScaleVelocity(1);
		}
	}
}
Jekyll Grim Payne wrote:Hey, sorry for resurrecting it like this, but it's actually something I've wanted for a while. But I have a question: is there any way to tie this to the moment of landing after a jump?
This may be too specific, but the thing is that slippery movement itself suits Doom just fine. However, it makes any jumping puzzles feel horrible, weird and discouraged me from making them ever. If there was any way to make the doom guy NOT slide after landing but do it in any other case, that would be amazing. For now I can't wrap my head around it though.
can work with zscript, If you can find a state or function for landing all you need to do is add A_Scalevelocity to it, I couldn't find any so here's what I did:

Code: Select all

	bool onfloor;
	
	override void MovePlayer(){
		Super.MovePlayer();
		if (floorz == pos.z){
			if (onfloor == False){
				A_ScaleVelocity(0.1);
				onfloor = True;
			}
		}else{
			onfloor = False;
		}
	}
Try only making it work when no movement key is pressed, it feels weird when the player loses all it's velocity for a moment and instantly start walking with full velocity again.
User avatar
zrrion the insect
Posts: 2411
Joined: Thu Jun 25, 2009 1:58 pm
Location: Time Station 1: Moon of Glendale

Re: [CODE] Less Slippery Doom Movement (Dec 2013 update)

Post by zrrion the insect »

I ended up doing something similar with zscript, but to avoid having to mess with player speed to counteract the velocity scaling I added a check in there that doesn't scale velocity if the player is pressing any of the movement keys.
User avatar
Zen3001
Posts: 412
Joined: Fri Nov 25, 2016 7:17 am
Location: some northern german shithole

Re: [CODE] Less Slippery Doom Movement (Dec 2013 update)

Post by Zen3001 »

zrrion the insect wrote:I ended up doing something similar with zscript, but to avoid having to mess with player speed to counteract the velocity scaling I added a check in there that doesn't scale velocity if the player is pressing any of the movement keys.
wouldn't that make the movement slippery when you're moving in different directions?
Turret49
Posts: 92
Joined: Sat Aug 29, 2015 1:40 pm

Re: [CODE] Less Slippery Doom Movement (Dec 2013 update)

Post by Turret49 »

Sorry for the bump here, but I'm having some problems.. is there any workaround for low friction sectors with this? Whenever I enter a slippery sector (easy example would be the ice in the hub map of Joy of Mapping 5), this script makes it turn into mud, as low friction sectors lower the amount of speed the PlayerPawn can accelerate per tic, while this script is constantly taking speed away.
User avatar
Nash
 
 
Posts: 17434
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Less Slippery Doom Movement (May 2018 ZScript rewrite)

Post by Nash »

Mod is now fully re-written in ZScript. First post.
User avatar
Zen3001
Posts: 412
Joined: Fri Nov 25, 2016 7:17 am
Location: some northern german shithole

Re: Less Slippery Doom Movement (May 2018 ZScript rewrite)

Post by Zen3001 »

can you upload it dropbox or something? I don't have the permission to download these forum files after breaking some rules.
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed
Contact:

Re: Less Slippery Doom Movement (May 2018 ZScript rewrite)

Post by wildweasel »

I've been messing with this in my usual load order and have discovered a bug: if the player takes any damage, the "anti-slip" is temporarily dropped; this means things like being shot by Chaingunners or standing on damaging floors will cause you to be able to run abnormally fast for as long as you're continuing to take damage.
User avatar
Nash
 
 
Posts: 17434
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Less Slippery Doom Movement (May 2018 ZScript rewrite)

Post by Nash »

wildweasel wrote:I've been messing with this in my usual load order and have discovered a bug: if the player takes any damage, the "anti-slip" is temporarily dropped; this means things like being shot by Chaingunners or standing on damaging floors will cause you to be able to run abnormally fast for as long as you're continuing to take damage.
Ack, that's not good. I actually deliberately disabled the anti-slip when you were taking damage because I thought it was weird that a Baron slamming his fists in your face would make you barely move from the impact, but I suppose that wasn't a good idea after all...
User avatar
BROS_ETT_311
Posts: 218
Joined: Fri Nov 03, 2017 6:05 pm

Re: Less Slippery Doom Movement (May 2018 ZScript rewrite)

Post by BROS_ETT_311 »

Nash wrote:
wildweasel wrote:I've been messing with this in my usual load order and have discovered a bug: if the player takes any damage, the "anti-slip" is temporarily dropped; this means things like being shot by Chaingunners or standing on damaging floors will cause you to be able to run abnormally fast for as long as you're continuing to take damage.
Ack, that's not good. I actually deliberately disabled the anti-slip when you were taking damage because I thought it was weird that a Baron slamming his fists in your face would make you barely move from the impact, but I suppose that wasn't a good idea after all...

Ah, so that's what that is. Maybe it's possible to implement a damage threshold so that the "anti-slip" enables when the player receives hit points above a certain limit. Not sure if this would create more issues though...On another note, is there a way to factor in player movement while in mid-air? For instance, I've noticed this especially while playing The Trailblazer. The mod uses a system that pretty closely mimics bunnyhopping a la Quake. However, introducing nashmove causes the player's mid-air speed to scale up drastically while simultaneously conflicting with the on ground momentum, making it so you can't stack up your velocity per jump.
***p.s. Love your work! Both of you!
-cheers
User avatar
Apeirogon
Posts: 1605
Joined: Mon Jun 12, 2017 12:57 am

Re: Less Slippery Doom Movement (May 2018 ZScript rewrite)

Post by Apeirogon »

wildweasel wrote:I've been messing with this in my usual load order and have discovered a bug: if the player takes any damage, the "anti-slip" is temporarily dropped; this means things like being shot by Chaingunners or standing on damaging floors will cause you to be able to run abnormally fast for as long as you're continuing to take damage.
Sound reasonable. Because who in, sane state, would stand still when someone shoot at him/dissolve in suspicious liquid?!
Nash wrote:// TO DO: math here is shit and wrong, please fix
You mean this "friction hopping", right?!
Post Reply

Return to “Script Library”