making player not accelerate/decelerate when moving
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.
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.
-
- Posts: 93
- Joined: Wed May 10, 2017 4:10 pm
making player not accelerate/decelerate when moving
I started a simple game project that tries to recreate a more basic raycasted FPS like Wolfenstein 3D or Blake Stone. I already have a couple very basic grid-based maps made and player.ViewBob set to zero, but for that last authentic touch I need to make it so when moving forward/backward and strafing, the player is either moving or completely still, no smooth gradients in velocity.
I have a fair knowledge of DECORATE but I am not finding any code after doing research, that makes this possible. I am only guessing SetActorVelocity may be what I am looking for.
Side note: My maps are in UDMF format and I'm currently using flats as placeholder wall textures since my map geometry makes better sense to have textures be 64 x 64 instead of 128 pixels tall. If this will present any sort of problem to GZDoom upfront, or if there is any better way to do it, feel free to let me know.
I have a fair knowledge of DECORATE but I am not finding any code after doing research, that makes this possible. I am only guessing SetActorVelocity may be what I am looking for.
Side note: My maps are in UDMF format and I'm currently using flats as placeholder wall textures since my map geometry makes better sense to have textures be 64 x 64 instead of 128 pixels tall. If this will present any sort of problem to GZDoom upfront, or if there is any better way to do it, feel free to let me know.
-
- Posts: 2254
- Joined: Mon Jan 06, 2014 11:32 pm
Re: making player not accelerate/decelerate when moving
Unless I am misremembering, the Wolfenstein 3D TC was able to do this. I'd check that out and see how to reproduce it.
-
- Posts: 93
- Joined: Wed May 10, 2017 4:10 pm
Re: making player not accelerate/decelerate when moving
I downloaded it and played it, you are correct. However all the code appears to be in pk7 files (the source pk3 only has the graphics, sounds and other resources.)
I looked up how to extract and view pk7 files. I tried 7-Zip like the Doomworld thread I found suggested, it didn't work.
I guess I'm on my own with this..
I looked up how to extract and view pk7 files. I tried 7-Zip like the Doomworld thread I found suggested, it didn't work.
I guess I'm on my own with this..
-
- User Accounts Assistant
- Posts: 5989
- Joined: Thu Feb 26, 2004 3:02 pm
- Discord: Caligari87#3089
- Github ID: caligari87
Re: making player not accelerate/decelerate when moving
Just rename the .pk7 to .pk3. Also look up NashMove on the forums here; it sort-of does what you're requesting, or at least as close as it's possible to get in the Doom engine with how player movement is handled under-the-hood.


-
- Posts: 93
- Joined: Wed May 10, 2017 4:10 pm
Re: making player not accelerate/decelerate when moving
Caligari87 wrote:Just rename the .pk7 to .pk3. Also look up NashMove on the forums here; it sort-of does what you're requesting, or at least as close as it's possible to get in the Doom engine with how player movement is handled under-the-hood.
I renamed two of the PK7s to PK3 and clicked one, it just opens Slade as if I hadn't opened any file. I switched them right back to PK7.
Also I am not finding Nashmove anywhere easily on the forums, what is it?
-
- Posts: 1237
- Joined: Tue Jul 15, 2003 4:18 pm
Re: making player not accelerate/decelerate when moving
vAethor wrote:I downloaded it and played it, you are correct. However all the code appears to be in pk7 files (the source pk3 only has the graphics, sounds and other resources.)
I looked up how to extract and view pk7 files. I tried 7-Zip like the Doomworld thread I found suggested, it didn't work.
I guess I'm on my own with this..
The .pk7 files are just renamed from .7z
I'll see if I can put together a quick sample when I get a chance... I think this can be done more easily in ZScript now.
-
- User Accounts Assistant
- Posts: 5989
- Joined: Thu Feb 26, 2004 3:02 pm
- Discord: Caligari87#3089
- Github ID: caligari87
Re: making player not accelerate/decelerate when moving
Here, Nashmove is the informal name but apparently harder to search by: viewtopic.php?f=105&t=35761
I think most mods that adjust player movement to be less "slippery" use this code as a base. There's probably a simpler / more comprehensive way to do it via ZScript instead of DECORATE/ACS.

I think most mods that adjust player movement to be less "slippery" use this code as a base. There's probably a simpler / more comprehensive way to do it via ZScript instead of DECORATE/ACS.

-
- Posts: 93
- Joined: Wed May 10, 2017 4:10 pm
Re: making player not accelerate/decelerate when moving
I did find tzkmove.pk3, and it looks like it has everything I need. REALLY slow default speed though.
I really hope tzkmove.o doesn't have any crucial details though, since it's compiled ACS and I can't read it.
I really hope tzkmove.o doesn't have any crucial details though, since it's compiled ACS and I can't read it.
Last edited by vAethor on Tue Aug 29, 2017 7:12 pm, edited 1 time in total.
-
- Posts: 1237
- Joined: Tue Jul 15, 2003 4:18 pm
Re: making player not accelerate/decelerate when moving
Agreed... Using Nash's package is far easier than coding it for yourself.
-
- Posts: 93
- Joined: Wed May 10, 2017 4:10 pm
Re: making player not accelerate/decelerate when moving
AFADoomer wrote:Agreed... Using Nash's package is far easier than coding it for yourself.
Ugh, TZKmove IS compiled. I don't know where to go next.
Edit: I also looked everywhere for the Nashmove ACS script and found close to nothing. I am really frustrated!
-
- Posts: 1237
- Joined: Tue Jul 15, 2003 4:18 pm
Re: making player not accelerate/decelerate when moving
Does it not have a 'source' folder or something like that?
The ACS would look like this, or similar:
The ACS would look like this, or similar:
Code: Select all
Script "MovementLoop" ENTER
{
While (TRUE)
{
SetActorVelocity(0, 0, 0, 0, 0, 1);
SetActorProperty(0, APROP_Speed, 8.0);
}
}
-
- Posts: 93
- Joined: Wed May 10, 2017 4:10 pm
Re: making player not accelerate/decelerate when moving
AFADoomer wrote:Does it not have a 'source' folder or something like that?
The ACS would look like this, or similar:Code: Select all
Script "MovementLoop" ENTER
{
While (TRUE)
{
SetActorVelocity(0, 0, 0, 0, 0, 1);
SetActorProperty(0, APROP_Speed, 8.0);
}
}
There are 2 tzkmoves. The non-compiled one includes the compiled one (tzkmove.o) at the beginning. Being pessimistic at the moment I assumed the meat of what I needed to know was locked away in the compile, but I can give the ACS source another look.
I don't know ACS very well, but I suppose I could play around with values and see what happens, until I get it right.
-
- Posts: 1237
- Joined: Tue Jul 15, 2003 4:18 pm
Re: making player not accelerate/decelerate when moving
The .o is the compiled version, yes, but the .acs (or whatever) is the original uncompiled code.
The two lines of "SetActor..." code I posted above were literally copy/pasted out of the Wolf3D TC's ACS.
The two lines of "SetActor..." code I posted above were literally copy/pasted out of the Wolf3D TC's ACS.
-
-
- Posts: 17281
- Joined: Mon Oct 27, 2003 12:07 am
- Twitch ID: nashmuhandes
- Github ID: nashmuhandes
- Location: Kuala Lumpur, Malaysia
Re: making player not accelerate/decelerate when moving
I fixed the link on NashMove, nobody told me the link wasn't working!
And yeah I should probably rewrite that thing as a drop-in ZScript mod that works like SpriteShadows.
And yeah I should probably rewrite that thing as a drop-in ZScript mod that works like SpriteShadows.
-
- Posts: 93
- Joined: Wed May 10, 2017 4:10 pm
Re: making player not accelerate/decelerate when moving
Alright, I'll have a look at it. Thanks Nash.
Right now I'm experiencing that embarrassing moment where you realize you don't know nearly as much about scripting as you thought you did.
Edit: I searched "Nash" on the forums and STILL can't find an easy way to access his ACS source. Can I get a link?
Right now I'm experiencing that embarrassing moment where you realize you don't know nearly as much about scripting as you thought you did.
Edit: I searched "Nash" on the forums and STILL can't find an easy way to access his ACS source. Can I get a link?