Phoenix Quake Readme File

http://www.planetquake.com/qer/

Author: Jason Wilkins (aka The Phoenix)

E-mail: fenix@io.com

This software is in development.  Please read the readme file everytime
you download a new version for known issues, bug fixes, and new features.

Major Issue: Mods that have custom textures are not supported by this
release.  If you have a mod, you, or the author, will have to write
shaders for your textures.  I will put default shader creation into
the code once I figure out what the default shaders should look like.

If you are the author of a mod, and want support for your mod, then
send me your list of textures and I'll write some shaders for you.

-- Installation --

In the source code distribution, I put a copy of the zip file containing
the binary (pQER_bin_x.zip) so that it will be easier to install.

Unzip that archive into your Quake directory.  You should now have a
'phoenix' directory as well as the executable (pQER_glquake_x.exe) and
a batch file (pQER.bat).  To run the game, run the batch file.  It will
make sure that pQER_glquake_x.exe looks in the correct directory for some
files it needs.

If you want to run Phoenix Quake with a mod you will have to copy the
contents of the 'phoenix' directory to your mod's directory and then
run it as you normally would.


-- About the Source --

This has been developed and tested on a TNT card with the latest reference
drivers from nVidia, as well as a Voodoo 2 card with the latest version
of the MiniGL from 3Dfx, as well as the standalone OpenGL implementation
(copy 3dfxvgl.dll to your quake directory and rename it opengl32.dll).

If you did not get source with this distribution, it is freely available.

The source will not compile as it is.  To cut back the size I deleted all
the sub-directories and most binary files.  To compile it you will have to
download a fresh source release and unzip it into the source directory
without overwriting any of my files.  Or, the reverse, drop my WinQuake
directory into a directory with the original WinQuake directory and tell 
windows to overwrite everything.

You can quickly get a look at all my modifications by looking for fenix@io.com
using 'Find in Files' in MSVC or 'grep' on Linux (btw, I have not tested 
this code on Linux, if you get it to work, send me a line).


-- Release Notes --

Release 6:
	Jan 16th, 2000

	- Plan: I added a lot of features.  I plan on redocumenting 
	  everything and creating a seperate developer's guide with
	  the next release.  I probably left out stuff in this work log.
	  It is also easier to read something if its divided into sections.

	- New: Added shader extension to load maps from bsp files

	  map $bsp#texture_name

	  It will take the name from whichever bsp file is being loaded
	  at the moment.  If no BSP is being loaded then you will get
	  a ? texture.

	- New: Shaders on BSP maps.  Shaders for texture maps in BSP files
	  are loaded from the file bsp.shader.  The shaders are named after
	  the name of the texture map in the BSP file (including any + or *
	  modifier).

	  For example, the shader for the 'quake' texture that appears in the
	  start hall in start.bsp is:

	  quake
	  {
		  {
			  map $lightmap
		  }
		  {
			  map $bsp#quake
			  blendfunc filter
		  }
	  }

	  The only shaders that I have written any differently than this
	  (which is the way that Quake originally draws everything), are
	  the water, teleporter, lava, and slime shaders.  I attempted to
	  duplicate the same effect that was in the original Quake, but
	  could quite get it right.  So, the surface of lava and such may
	  not quite look right.

	  *water0
	  {
		  {
			  map $bsp#*water0
	                  tcMod scale 64 64
                          tcMod _wave 1 sin 0 .125 0 .125
		  }
	 }

	- Issue: Speed.  Unfortunately, I have halved the speed of the engine.
	  This mostly comes from having disabled multitexture.  Sorry. I will
	  be putting it back in when shaders have become more stable.  I also
	  believe that I am doing a lot of unneeded state changes, but I do
	  not think I can fix that until I get shaders working on everything.
	  Models and a few bits and pieces are all thats left.
	  Also, texture managment could be a lot better.  In general, speed 
	  will decrease, until features are stable enough that I feel 
	  confident that I am not optimizing buggy code.

	- Issue: Right now, animation is not handled by AnimMap.  The result is
	  that animated textures are achieved by changing the shader, and
	  not by animation in a single shader.  Frames of animated textures
	  start with '+',  and if you plan on playing with shaders I would
	  recommend you don't change the animated textures because they will go
	  away in the next release.

	- Issue: This is an itty bitty issue.  The a texture on the E1M3 exit
	  gateway is misaligned.  I don't know if its my fault.

	- Issue:  3Dfx cards, using the stand-alone OpenGL driver (not the MiniGL)
	  are no longer completely screwed up.  But, if you are using the
	  OpenGL stand-alone driver, Make sure that you run with

	  r_vertex_arrays 0

	  (they are off by default)

	  The 3Dfx stand-alone driver has some serious issues with
	  vertex arrays.  It is not invarient between rendering from vertex
	  arrays and glBegin/glEnd.  You can actually tell a slight change
	  in things like the console text when you enable/disable vertex
	  arrays.

	  There are strange color clipping artifacts that affects models
	  and shows up on polygons that are partially off the edge of the screen.
          It turns them slightly yellow.  The vertex array path in the 3Dfx
	  stand-alone apparently does not do clipping properly.

	  This also effects everything on the screen when you face in certain
	  directions or stand in certain places.  It is really ugly, and I hope
	  that they will fix it soon.

	- New: Enabled support for Quake 2 style skyboxes, but you have to
	  recompile to see them.  Find #define QUAKE2_SKY in glquake.h and
	  uncomment it.  My test environment maps are in phoenix/gfx/env

	- New: Added shader extension to load files from a wad file.

	  map $gfx.wad#disc

	  specifies to load the disc picture from gfx.wad

	  The basic form is

	  map $filename.wad#name

	  My implementation is pretty basic right now, so you have to
	  specify gfx.wad, otherwise, it will not work.

	  I will be extending this to other files that contain images
	  so, at some point these will work as well:

	  map $player.mdl#skin1

	  map $e1m1.bsp#door_1

	- Thanks: Dark Angel from QuakeForge for getting me the
	  stuff I needed to get started on Rogue and Hipnotic support.

	- New: Added new cvar that allows you to customize when the
	  turtle icon appears (it appears if your frame rate gets
	  low).  It adds a little but of extra feed back (besides
	  r_speeds) if you are checking a level for slow spots.

	  scr_turtle_fps 10

	  The default is 10 FPS, but you could set it to 45 or 60
	  depending on how hardcore you are about high FPS

	- New: Added an extension to shaders because I found that the
	  way I was doing the console background was not the same as
	  Q3A, but I like my console background so I added a tcMod to
	  handle it.

	  tcMod wave <div> <waveform> <base> <amp> <phase> <freq>

	  Its like the water/slime effect in Quake 1.  Turb in
	  Quake 3 looks better when you can't control how your geometry
          is tesselated.  But, this one looks really neat if you setup
          your polygons for it.  This is why I have 'r_subdivide_console'
	
	- New: Console stretching like in Quake 3.  Instead of sliding
	  up, the console squishes up.  To turn it on, use:

	  scr_console_stretch 1

	  to turn it off

	  scr_console_stretch 0

	- Fix: Apparently, there is a bug in the original glQuake that
	  erases the status bar if you enable the cvar gl_clear.  I
	  fixed it.

	- New: Thanks goes to Chris Moore who provided a new and better
	  looking Quake symbol for the Phoenix Quake console background.

	- Fix: I found a way to draw transparent particles without sorting
	  them.  I changed the default value for r_sort_particles to 0, and
	  I may remove the sorting code altogether unless I find a use for it.

	- New: The r_detail cvar was added to control Shaders with the detail attribute,

		  r_detail 1

	  for details to be drawn, 

	  	  r_detail 0

	  for them not to be drawn.

	  You won't see the effects of this until some maps are created that use this.

	- Fixed: Removed the registered version check, this way
	  you can use game modifications with only the
	  shareware version.  It will warn you about this
	  because many modifications may want media from the
	  registered version (like the registered-only monster
          models and sounds).

	- New: Read-only console variables.  I made a single
	  cvar for the express purpose of testing this new
	  feature.  I dare you to try and set the cvar:

	  phoenix

	- New: verbose command line completion.  If you hit tab
	  then you will get a list of all commands and cvars that
	  match what you have typed so far.

	- New: Better console line editing.  You can edit it like
          you do most command lines.  You can toggle overwrite and
	  insert mode using the 'insert' key and delete text
          using the 'delete' key.  The state insert mode is
	  stored in the cvar:

          con_insert_mode 1

          You can use this to set your default value.  1 for insert
          mode, 0 for overwrite mode.

	  Thanks go to Radix (radix@planetquake.com) for getting me
	  started on this.

	- New: added cvar from the software dos and winquake in
          order to control the warping effect underwater because its
	  so ugly in glQuake.

	  r_waterwarp 1

	  1 to turn on, 0 to turn off.

	  I'll try to fix the water warp effect later.

	  Thanks go to Radix (radix@planetquake.com) for getting me
	  started on this.

	- New: cvar for variable console size.

	  scr_con_height 0.5

	  0.15 only shows you a few lines, 1 makes it full screen.  To
	  prevent you losing the console, it will not let you show less
          than one line of output.  1/2 of the screen is the default.

	  Thanks go to Fett (erich@heintz.com) for the idea and some
	  code.

        - Fixed: An odd problem with interpolation where an object that
	  was momentarily off screen, would zip from his previous position
          to his new position when it came on screen again.

          Thanks to David Perks (dperks@eznet.co.uk) for bugging me
	  about this unti I fixed it.

	- Fixed: The interpolation code no longer interpolates large
	  distances like teleportation.

Release 5:
	Jan 2, 2000

	Happy New Year!

	- New: The beginnings of Quake 3 style shaders are here!

	  The new source files are shaders.c and shaders.h.  Look for
	  a couple of alternate function names that begin with SHADER_
	  as well.  These are so I don't have to convert everything
	  over at once.

	  The only thing that uses shaders right now is the console
	  background.  To mess with it, write a new shader named 'console'.
	  I'm not going to explain how to write shaders here (for that, look
	  up the shader docs on FilePlanet).  I am just going to go into which
	  shader commands Phoenix Quake currently supports.

	  * 'map' is supported, you can load 24 and 32 bit TGA files.  My
	    first extension to Q3A standard shaders is the ability to
	    load lump files (.lmp).  They can contain some basic Quake 
	    graphics like the old console background and menus.

	  * All 'tcMod' commands are supported.

	  * All 'blendfunc' commands are supported.

	  * 'nomipmaps' is supported.

	  * 'nopicmips' is not implemented, but it doesn't give a warning if you
	    use it.

	  You can have up to 5 stages, and 7 tcMod commands in one stage.

	  The shader script is in the file phoenix/scripts/gfx.shader, in 
	  case you want to play around with it.  As a bonus, I've included
	  the shader for the Quake 3 console (to help show equivalent operation
	  of my shaders and Q3A's shaders) and also a fallback to the old
	  console (for those that don't like change).

	- New: Please read the license for the pictures in the phoenix/gfx directory.

	- New: I added two new cvars (a long time ago actually) that allow
	  'tcMod turb' shader effect to look much better on the console.
	  The turb, for turbulance, effect is what is used for water and
	  lava type effects.

	  Instead of drawing the console as one rectangle, these cvars
	  break it into however many rectangles you like because the turb
	  effect looks better with more vertices to distort.

	  Here they are:

	    r_console_subdivide_x 5
	    r_console_subdivide_y 5

	  The value is how many rows and columns you want the console to be
	  divided into.  I made the default 5x5 so that most effects will
	  look decent with the defaults.

	- Changed the start dialog a little bit.
	
	- Added two new cvars to control the line and text at the bottom of the
	  console.  These where added because the old method of putting the
	  version on the console became obsolete.  Also, the line makes the
	  console easier to see if you have a low console alpha.

	  r_console_string "Phoenix R5 (http://www.planetquake.com/qer)"

	  This controls the string printed at the bottom of the console, I am 
	  using it here to print out version information.

	  r_console_line_color 0xFFFF00FF

	  Controls the color of the line and text at the bottom of the console.

	  I doubt I'll keep this format, but the color is like it is in HTML,
	  except instead of a # (pound) you have a 0x.

	  The format is 0xRRGGBBAA, where each color hexadecimal from 00 - FF.
	  The default is yellow.  Right now you should keep the Alpha value FF,
	  because the line and text are not blended.  Because of the alpha test,
	  anything below BB will dissappear instantly instead of fade.

	- I would like to thank Steve Tylor, the author of AfterShock, a Q3A
	  renderer.  I used his tokenizing routines almost verbatim, and used
	  the rest of AfterShock's parsing code as a reality check against my
	  own.

	  For information about Aftershock, visit:
	
            http://www.planetquake.com/aftershock

	- Issue: There is a very serious issue with this release and the
	  3Dfx stand-alone driver renamed from 3dfxvgl.dll to opengl32.dll.
	  Issue one is that it will crash if you enable vertex arrays
	  (r_vertex_arrays 1).  So, make sure it is off.  Worse, the texture
	  maps disappeared, so everything looks scewed up.  The mini-driver
          works better for me, so if you have trouble, and you really want
	  to run this release, try it.  It doesn't appear to want
	  to scroll/rotate/stretch or anything with tcMod except turb.   I
          think that the texture stack is not implemented on the MiniGL (turb
	  does not use the texture stack).

	- Fixed: I fixed mirrors to work on my TNT card.  They do not work on
	  my Voodoo 2 card yet.  On original glquake, mirrors do not work at all
	  on any of my card or drivers.  Mirrors where a novelty feature in the
	  original glquake, here is how you use them:

	    r_mirroralpha 0.3

	  Is the same as the other alpha commands.  1 will look like a non-reflecing
	  surface, 0 is a perfect mirror.  The stain glass window in the easy hall
	  on the start map is a mirror.

	  On my TNT, mirrors work if I'm running 800x600, but not if I'm running
	  1152x864.  I'm working on fixing this, this is just to let you know 
	  that if mirrors do not work, try to reduce your resolution.

	- Fixed: Particles flickered when you pause the game.  I fixed this by
	  changing the sorting algorithm so that it does not change the order of
	  the particles if they are already sorted.

	- Fixed: There was a problem with particles drawing against water, lava,
	  slime and mirrors.  I fixed the problem by making particles the last
	  thing that gets drawn.  This was a problem in the original glquake
	  only with mirrors, it became more obvious when I made the particles
	  fancier.

	- Fixed:  If you paused it when looking into a mirror the view point would
	  switch to that of you inside the mirror.  This was a bug in the original
	  glquake.

Release 4:

	Dec 29, 1999
	
	- Fixed problem where console was not transparent on my NVIDIA TNT card.

	- Three new cvars control the properties of particles
	  (they make up explosions smoke trails, flying blooy goo, etc.).

	  r_particle_alpha

	    Controls how transparent the particles are. 1 is opaque and 0 is
	    completely invisible (invisible particles make scrags and death
	    knights a lot more difficult because its hard to see their attacks).
            Original glquake had opaque particles (although a lot of the code to
	    make them transpaparent was already there).  I changed the default
	    to 0.3 which is mostly transparent, but when you have 500 particles
	    on top of each other 0.3 becomes opaque pretty quick.

	  r_particle_scale

	    Makes the particles bigger or smaller.  The number is how much bigger 
	    than the original size you want them.  1 is the same as original glquake.
	    5 is what I changed the default to and that would be 5 times bigger.  You
	    can make them HUGE, but unless you have a very fast video card it will hit
	    your frame rate very hard.  My TNT has trouble with anything above 10, and
	    it drops the frame rate to like 2 FPS if you try something insane like 100
	    and fire the rocket launcher.

	  r_sort_particles

	    Transparent or extra large particles will not look correct unless they are
	    sorted from most distant to closest before they are drawn.  I added the this
	    boolean cvar so you can turn off sorting if you are using settings that are
	    more like the original Quake.  I use an very fast algorithm to sort them
	    so this should not be a problem. 0 turns off sorting, any other value turns
	    it on.

Release 3:

	Dec 28, 1999

	- To support debugging autodetection of drivers that do not support
	  vertex arrays I added the cvar r_vertex_arrays to enable and
	  disable vertex arrays.

	  To turn them off

		r_vertex_arrays 0

	  To turn them on

		r_vertex_arrays 1

	  You should not notice any difference!  If you do then tell me. 

	- The transition to vertex arrays continues.  A big problem was
	  fixed concerning the fact that 3Dfx cards using the MiniGL do
	  not support vertex arrays.  If things in the game are invisible
	  then add the following line to a file called autoexec.cfg in your
	  quake/ID1 directory, and e-mail me telling me what video card
	  you are using.

	  r_vertex_arrays 0

	- The transparency of the console can be varied using a new cvar

	  For total tranparency use

		r_console_alpha 0 

	  For total opacity try

		r_console_alpha 1

	  You can set it anywhere in between, e.g. the default value is .6

		r_console_alpha .6

	For some reason this feature works on my Voodoo 2 card, but not my TNT.

	I would love to hear from you about whether console transparency works
	and what type of card you have.

Release 2:

	Dec 27, 1999

	- Added my handle and release number to the console background and
	  the startup flash screen

	- Fixed problem with transform interpolation causing projectiles
	  to face the wrong direction
	
	- Fixed problem with transform interpolation that caused torchs and
	  crusified zombies to start in the wrong place and slowly migrate
	  to their correct position

	- Started on converting everything to use vertex arrays.  These changes
	  should not see any difference yet.  The new vertex array code is in
	  the new source files gl_rva.c and gl_rva.h

	- Added a junk.c to save functions I completely replace so I can reference
	  them later if something goes wrong.

	- Cleared up the 'control path does not return a value' warnings


Release 1:

	Dec 25, 1999

	- Added Animation and Movement Interpolation
	  Turn these on and off at the console with the new cvars

		r_interpolate_model_animation
		r_interpolate_model_transform

