Page 1 of 2

[Code] Zombie's Resources

Posted: Tue Apr 21, 2015 3:36 am
by The Zombie Killer
This is a thread where I will post any code-related resources that I create, rather than having separate threads for each.
However, my previous resources will not be listed here, as most of them are in the process of being rewritten in C.

ZK-Resources on GitHub

This is the repository where each project's source code can be obtained, however, if you'd rather have prebuilt versions, you can acquire them at the bottom of this post.

Information on Each Project

Footsteps
This is a code library that allows you to have player footsteps in your mod, without the need for DECORATE hacks.
The volume and speed of footsteps depend on how fast you are running, and you can specify different sounds for different floor textures.
There is no requirement to recompile the source code if you want to add new floor textures or sounds to the list, because it's all defined in LANGUAGE.

Credits:
  • Ryan Cordell - The original ACS footsteps library that this was originally based on
  • Ral22 - Supplying me with a full soundset of footsteps
Accurate Chasecam
This resource is an attempt to accurately recreate the built-in chasecam. Improvements over previous attempts at such a thing include:
  • Movement interpolation for the camera
  • Support for chase_dist and chase_height
  • New CVars (chase_active, chase_camtype)
  • Hitscans are used to position the camera, so no more getting stuck in walls
  • Different camera rotation modes (for example, moving the mouse can rotate the camera, but not the player)
A known bug is that the camera positioning hitscan will leave bullet decals on walls. I am awaiting the acceptance of this pull request in order to solve this.


Coming Soon

Flashlight
Half-Life Flashlight
Gravity Gun



Downloads

Footsteps (ZDoom Build)
Footsteps (Zandronum Build)
Accurate Chasecam (ZDoom Only)

Re: [Code] Zombie's Resources

Posted: Fri Apr 24, 2015 4:59 pm
by Reactor
Nice work so far, I really like what you've accomplished so far!

I'd have one request for yer upcoming Half-Life Flashlight code. Can you make it so that certain guns, when drawn, automatically utilize this "flashlight" effect (the idle Prism rifle, when selected by the player, could illuminate dark areas in the same fashion)?

Re: [Code] Zombie's Resources

Posted: Fri Apr 24, 2015 5:05 pm
by Ozymandias81
Reactor wrote:Nice work so far, I really like what you've accomplished so far!

I'd have one request for yer upcoming Half-Life Flashlight code. Can you make it so that certain guns, when drawn, automatically utilize this "flashlight" effect (the idle Prism rifle, when selected by the player, could illuminate dark areas in the same fashion)?
Uhmm, I hope Zombiekillah will do somethin' like this request, it will be very nice to add on Gore instead of having a portable flashlite.

Re: [Code] Zombie's Resources

Posted: Fri Apr 24, 2015 5:16 pm
by Reactor
Well, technically it'd be just implementing the code into the Prism rifle's code (sort of) that the gun illuminates the area ahead when idle. When shooting, it'd illuminate everything as all normal guns do of course :)

Re: [Code] Zombie's Resources

Posted: Sat Apr 25, 2015 6:42 am
by The Zombie Killer
Reactor wrote:I'd have one request for yer upcoming Half-Life Flashlight code. Can you make it so that certain guns, when drawn, automatically utilize this "flashlight" effect (the idle Prism rifle, when selected by the player, could illuminate dark areas in the same fashion)?
I can add this, yes. Which method would you prefer:

1. Defining guns in LANGUAGE that should have the flashlight always on, like this:

Code: Select all

FLASHLIGHT_GUNS = "SuperShotgun:Pistol:Chaingun:BFG9000";
2. A script that will emit a flashlight beam from an actor (you would run this once, in the weapon's "Select" state)

Re: [Code] Zombie's Resources

Posted: Sat Apr 25, 2015 1:39 pm
by Reactor
It doesn't really matter, the only thing is, it should look "fine". The only thing is, it must be automatic, when the gun is drawn and is idle (shooting would engulf the area into light anyways, and while reloading, the prism gets replaced and cannot emit light)

Re: [Code] Zombie's Resources

Posted: Sat May 02, 2015 1:16 am
by The Zombie Killer
The footsteps project has been updated.

New features:
  • Added "fs_volume_mul" cvar
  • Added "fs_delay_mul" cvar
The prebuilt versions in the OP have been updated to this new version as well.
Setting fs_delay_mul to 0.75 will cause the timings to be much closer to previous versions of the footsteps project.

Re: [Code] Zombie's Resources

Posted: Sat May 02, 2015 1:57 am
by Big C
HELLO!

Since I'm guessing there's differences between the old chasecam and this one, could you please remind me what the console variables are?

Re: [Code] Zombie's Resources

Posted: Sat May 02, 2015 3:20 am
by The Zombie Killer
The commands are:
  • chase_active
  • chase_camtype
The chasecam also makes use of the built-in chase_* commands too, which are (off the top of my head)
  • chase_dist
  • chase_height

Re: [Code] Zombie's Resources

Posted: Sat May 02, 2015 3:23 am
by Big C
Danke!

Re: [Code] Zombie's Resources

Posted: Sat May 02, 2015 3:56 am
by Ozymandias81
Nice! Hey ZombaKilla :lol: is there a trick to make the camera workin' into an isometric way? Like Ultima VIII: Pagan one? (I mean exactly the way it acts, not somethin' like PogoStick...)
Spoiler:

Re: [Code] Zombie's Resources

Posted: Sat May 02, 2015 4:22 am
by The Zombie Killer
Not sure about making the camera orthographic, but I know it can be semi-faked. I actually plan to add it as a built in camera type, but just haven't gotten around to it yet.
The camera works by firing hitscans, so you could pretty much just edit the code to fire the hitscan at a fixed pitch, but of course that isn't really what you want.

That reminds me, since my pull request finally got added, I can fix the decal issue with the chasecam.

Re: [Code] Zombie's Resources

Posted: Sat May 02, 2015 9:16 am
by Ozymandias81
Ok Zombie, thankx for your suggestions anyway. I'll see what to do with your codes, my request comes from a project that I've in mind for the future :-D

Re: [Code] Zombie's Resources

Posted: Sat May 02, 2015 9:54 am
by Skrell
The Zombie Killer wrote:The footsteps project has been updated.

New features:
  • Added "fs_volume_mul" cvar
  • Added "fs_delay_mul" cvar
The prebuilt versions in the OP have been updated to this new version as well.
Setting fs_delay_mul to 0.75 will cause the timings to be much closer to previous versions of the footsteps project.
How can i set these values every time i start up gzdoom and zandro? Do i add them to their *.ini files or something?

Re: [Code] Zombie's Resources

Posted: Sat May 02, 2015 10:00 am
by The Zombie Killer
Skrell wrote:
The Zombie Killer wrote:The footsteps project has been updated.

New features:
  • Added "fs_volume_mul" cvar
  • Added "fs_delay_mul" cvar
The prebuilt versions in the OP have been updated to this new version as well.
Setting fs_delay_mul to 0.75 will cause the timings to be much closer to previous versions of the footsteps project.
How can i set these values every time i start up gzdoom and zandro? Do i add them to their *.ini files or something?
You set them in the console, just like any other cvar, and they'll get saved to your ini.