=============================================================================== Title: Tollerton's Physics Mods v0.51 Filename: tphys051.zip Author: Rich Tollerton Alias: TR-Apollo, occasionally Apollo, Praedator, and Publius Clan: Trilogy Email address: rtollerton@mail.trib.net =============================================================================== Type of file: QuakeC patch Distribution style: unified GNU diff Base: Quake v1.06 QuakeC source code Legalese: This package is to only be distributed in public, free form, except by Walnut Creek CDROM, which may distribute this package for profit. This package may be used as a base or included in other packages, as long as the author receives expressive written permission from Richard D. Tollerton II to do so. Disrespect these rules and get stoned to death. You grok? =============================================================================== Background: Imagine you are running to your right and you throw a rock directly in front of you. Which direction does the rock go? Well, down, of course, but also it moves *diagonally*: foreward and to the right. It's simple vector addition: If you are moving 5 m/s to the east and you throw the rock 5 m/s to the north relative to you, the rock moves [5<90] + [5<0], or 5m/s to the north and 5 m/s to the east, or 5*sqrt(2) to the northeast. (No, you don't have to know *any* of this.) Quake is flawed in this respect. Instead of moving along with the player, as it should, rockets, grenades, and nails move straight ahead, totally ignoring the player's real velocity. And that is precisely what this patch sets out to fix. ------------------------------------------------------------------------------- Description: Tollerton's Physics Mods v0.51 is a simple set of changes to the firing code of nailguns, super nailguns (perforators), rocket launchers, and grenade launchers. Instead of keeping the projectile's motion relatively fixed, the player's own velocity is added to the projectiles, making a more realistic representation. This modification is set and unset by two impulse commands, for easy changing. Other than the weapons changes and the MOTD, no code is changed, so it will work great for single-player or deathmatch play. Now it's possible to run, jump (or a combination of both) to make your rockets, grenades and nails go faster and higher. In the start map, I've been able to run, jump, and fire a grenade off over the lava, and the grenade actually bounced off the wall and came right back at me! ------------------------------------------------------------------------------- Installation: I'm distributing this as a GNU unified diff for a) size reasons - uncompressed, most diffs are under 10k, compared to a 400k progs.dat; and b) The README on cdrom.com says not to include progs.dat, and I'm a stickler for rules. Here are the steps to compile, if you are installing from scratch on a regular Quake system: 1. Get a suitable QuakeC compiler. id's qcc compiler source code is at ftp://ftp.cdrom.com/pub/idstuff/source/qcc.tar.gz; a Win32-compliant qcc is in ftp://ftp.cdrom.com/pub/idgames2/quakec/utils/qccwin32.zip, along with other compiled qcc's and sources. 2. Get QuakeC sources, version 1.06 *only*! The particular ZIP I used is at ftp://ftp.cdrom.com/pub/idgames2/idstuff/unsup/progs106.zip. Unzip this file into a new directory called v106qc. 3. Get a suitable version of GNU diff. Sources are at ftp://prep.ai.mit.edu/ pub/gnu/diffutils-2.7.tar.gz; a suitable DOS executable is at ftp://ftp.cdrom.com/pub/simtelnet/gnu/gnuish/patch212.zip . Unix (and variants) users, you probably already have one of these. 4. Move the files tphys05q.pat in this archive to the parent directory of the new directory you unzipped progs106.zip to (the one above v106qc). 5. Assuming the patch executable is either in your path or in that new directory, change to that directory and type in: patch < tphys051q.pat which will change the original QuakeC code to my own. 6. Change to the v106qc/ directory and type 'qcc' to compile the progs.dat. If qcc is not in your path and assuming your qcc is in the parent directory, type '..\qccdos' or `..\qccwin32' instead, depending on your operating system. If it's somewhere else, just type the absolute pathname of its filename. 7. Create a new directory inside your Quake directory and copy the new progs.dat there. (I suggest using tphysics.) 8. Assuming the directory is tphysics, type in 'quake -game tphysics' to start playing with my mods! If you are upgrading from version 0.5: Use tphs051u.pat instead. If you are using QuakeWorld: Use tphs051w.pat instead. The patch wishes the original QuakeWorldC sources to be in a qw/ directory; I suggest you put them there. ------------------------------------------------------------------------------- Usage: In version 0.51, the new physics code is automatically enabled on startup. A 2-second message is displayed whenever a player enters the world, showing the mod, build date, and a notice (see below). ------------------------------------------------------------------------------- Current Bugs: I've noticed that in a *few* instances, the grenades get stuck on a surface and bounce like mad till they explode. No known fix (could be the base 1.06 source code, I'll try to look into it). It may appear to the player that a rocket just *can't* move that diagonally. Well, the player is right, but for the wrong reason. No [mortal] man can strafe just as fast as he runs foreward *and* carry a rocket launcher *and* fire it *without* falling over, IMHO. In other words, you try strafing that fast, then come back and tell me why it looks weird. Circle-strafing is hopelessly messed up under this system. With nailguns, since the nails move at a diagonal tangent to the circle the player is making, the nails will just make a smaller circle (instead of the center point that it makes under the old code). This *should* be correctable by the player if e moves a little backwards as well. With grenades, the new code makes them move much more outwards in a radial fashion, as opposed to making a more-or-less tight circle. How this affects playability is unknown as of yet, since I have not had the chance to test this on a public server (nor on single-player for that matter), but my rough guess is that it will make fighting somewhat more easier (but more dangerous) for the grenade-player. A patch of progdefs.h is included in this release for unknown reasons. I won't mess with it for now, since the cost in patch size is negligible, and I don't know what side effects removing it could bring. Ignore any files ending in ~ after the patch. They're just backup files. ------------------------------------------------------------------------------- Changes from versions 0.5 to 0.51: - Ooops! the IMPULSE command used to enable the newphysics code could be used by *anybody* on the system, and only the server console would be notified. Starting with v0.51, the newphysics code is hard-coded. - Ack, the instructions for installing the patch were wrong - you were supposed to copy the patch to the directory *above* v106qc. That's been fixed. - Changed from the 'unofficial' v106pac.zip to progs106.zip for the QuakeC sources. (They're actually the same, but I changed the filenames anyway.) - Added UNTESTED support for QuakeWorld. I'm no genius on getting a mini master server running, and I don't want to mess with it, so if someone could please tell me if my patch works, please do so. - Various cosmetic changes to documentation; I took out the History section of this document because this Changes section supersedes it. ------------------------------------------------------------------------------- Notes: I would like this modification not to be used in other QuakeC code without my permission (as it says in the MOTD). Well, since I used Zoid's MOTD code without his permission, I guess you may be able to under reverse morality, but iff (if and only if) you send me your modification in your next release as part of the first private test group. I have thoroughly commented a good portion of the weapons code, both to explain what I've done and to explain what I'll probably do in the future. Go ahead, take a look. If you notice, most of the weapons (except the grenade launcher) require just a 1-line change for 90% of the effect, because of the way QuakeC stores its vectors - individual x, y, and z components. Thanks Mr. Carmack sir! No, that 'iff' above is not a typo. It's a long story about why I have so many aliases, which I will not get in to at the moment. ------------------------------------------------------------------------------- Acknowledgements: mute of R2, TR-USteppin, Quakeus, and other folks at #random for beta testing, suggestions, and comments. There probably are others, but my memory precedes me, or lack thereof :) id Software, or course. Even though I've poked a few holes through their code (at least I think I have - I can trick myself quite cleanly at times), my changes are testament to Quake's flexibility and power as a programming and playing system. David 'Zoid' Kirsch - for the MOTD code I shamelessly copied. Thanks for the awesome CTF mods too :) -------------------------------------------------------------------------------