News | Forum | People | FAQ | Links | Search | Register | Log in
Coding Help
This is a counterpart to the "Mapping Help" thread. If you need help with QuakeC coding, or questions about how to do some engine modification, this is the place for you! We've got a few coders here on the forum and hopefully someone knows the answer.
First | Previous | Next | Last
How I've Implemented Before 
Is to have two pieces of music playing at once and crossfade their volumes linked to another variable - usually something simple like player % health.

Both of the pieces of music work in theory when played at full volume together, but won't sound too good. The idea is that one piece is the 'action' music and the other the 'calm'.

Action starts at 0 volume and calm at 1 (full). As the player health drops and rises you switch the volumes - the lower their health, the higher the volume of the action music.

Never done this in Quake, although it wouldn't be difficult - could be done purely in qc, although you'd need to do some proper music editing using midis to turn off/on instruments and get the two identically sequenced but different sounding tracks. 
That Is 
The lower the player health, the higher the volume of the action music and the lower the volume of the calm music. 
Interesting 
I guess that's how the heartbeats work in some games too, except with volume and speed. 
Hmm 
The variable I would use would be the quantity of mobs that have the player targeted as their enemy.

Or even total mob health as a percentage.

Probably with some kind of distance from player function as well. So that if you leave a single mob behind you won't constantly have battle music playing. 
 
/is playing oblivion
/a small crab emerges from a pond 25 yards away
EPIC BATTLE MUSIC 
@shamblernaut 
Nice to see you got your modification working. 
 
Probably with some kind of distance from player function as well.

Shamblernaut walks over a bridge. There are fish below.
Combat music ensues.
Shamblernaut finishes crosses the bridge. Combat music wanes.
Close call! Major skirmish averted! 
 
do rottfish target the player out of the water? 
Rotfish 
Monsters in Quake can't trace line-of-sight through water by default. wateralpha didn't exist in the original Quake. Preventing fish from alerting on players they can't attack is the main reason not to alter this behaviour.

ijed: There's a bit of a challenge in Quake that you can't modify the volume of a sound while it is playing. You'd have to build some kind of drum machine/sequencer in QuakeC and manually repeat the samples at different volumes - maybe like the procedural music in Left 4 Dead. I worry that variations in the frame rate would make that a bit wobbly.

Related joke: How do you know a drummer is knocking at your door? A: He speeds up 
Forgot About That :) 
Constructing it by hand would allow you to do the knocking drummer effect though - upping the tempo as well as or instead of the sound volume changeover.

And there's always the classic HL1 method - ambient sounds only, and whenever a big fight starts play a short, scripted, one shot piece of music. 
Quakespasm-IRC-0.1 
download link: https://db.tt/5jcVUJfD
screenshot: https://db.tt/5jcVUJfD
Hey

If possible I'd like to ask for some help compiling for windows and osx. I already have the linux version compiled and working (binaries included in the dropbox link provided).

Also feedback will be greatly appreciated.

Cheers,

Snaut. 
 
wrong screenshot link? 
Yeppers 
Dat Texture Filterering 
 
@snaut 
You might consider cross-compiling for Windows and testing the build under Wine, since you seem to understand all of that.

Which would keep you in driver's seat, which is seat anyone wants to be sitting in.

Here is a cross-compiling tutorial for CodeBlocks: http://forums.codeblocks.org/index.php?topic=3343.0

CodeBlocks Cross-compiling Wiki Entry: http://wiki.codeblocks.org/index.php?title=Code::Blocks_and_Cross_Compilers

Video Tutorial on cross-compiling: https://www.youtube.com/watch?v=3-yw-aD8CTI

Then you can make tweaks any time you want and build a Windows binary whenever you like. 
Add: 
The Quakespasm team may already have a way of cross-compiling up a Windows build. 
Thanks Baker 
Yeah, I'll sort it myself. I was trying to avoid clogging up my system with too many dev apps and libs, but last night I started down that road anyway.

Thanks for the links too. I'll dig a little deeper into it. 
@snaut 
QS has some build_cross_*.sh scripts in the Quake directory, they'll need to be edited depending on your Linux distro/version.

The cross compile scripts I use for windows builds on my jenkins setup are here: https://github.com/ericwa/quakespasm-build-scripts (somewhat specific to my jenkins/ubuntu 14.04 setup. IIRC I started with build_cross_win32.sh and modified it a bit to work on that system.)
Pretty much all I installed with apg-get was the "mingw32" package plus "build-essential". 
New Link With Windows Binary 
https://www.dropbox.com/s/iko14xmbe0gvwwq/Quakespasm-IRC-0.1.zip?dl=0

requires dlls, they're packaged in the source code if you don't have them 
Hi Guys 
is it possible to add the monster count to the scoreboard of game(s) Return to Castle of Wolfenstein and/or Sin and its MP 
Removing Keys With A Trigger/Fake Key 
So, i'm looking to have the player collect a key in my map and then later be teleported in front of the door the key is supposed to open.
As part of this sequence, the door opens *jazz hands* for "effect" very slowly, beginning as soon as the player has been teleported. Unfortunately, this means that the player never actually touches the door to remove the key!

Basically, is it possible to either use some kind of entity setup to remove the key from the player without having them touch a door, or is it possible to create an entity that *looks* like a key, but isnt?
Thanks! 
Answered It Myself 
I looked into it, and on the advice of others, decided that it wasn't possible to directly remove the key from the player in vanilla quake.

Instead, I settled for a solution where the player moves over an invisible door that is instantly removed when they touch it. That door takes the key from them at the appropriate time :D 
Well 
That can be done by entity hacking: http://www.celephais.net/board/view_thread.php?id=37116&start=377

(It's in there somewhere). 
Trigger_earthquake 
I want to use the earthquake trigger, but I only need it once.
So I use the killtarget option but it doesn't seem to work that way.
The killtarget is allready used for starting and stopping the earthquake within a given time.

I only need it once, but when I use the killtarget on it, it just goes on triggering the earthquake all the time.

What is going on there? 
The Shake 
Is not being turned off, and it probably works independently of the trigger itself, being a looped function.

Try triggering the earthquake entity again instead of killtargeting it.

Should work, but I don't know what code base you're using. 
First | Previous | Next | Last
You must be logged in to post in this thread.
Website copyright © 2002-2024 John Fitzgibbons. All posts are copyright their respective authors.