	Q2K4 - Yet another GLQuake-based engine
	<http://snow.prohosting.com/q2k4>


=============
   What is
=============


	Q2K4 is my own port of the original source code. Basically, I
	gathered a lot of fixes, cool features from other engines and 
	even some code from	myself (which you can easily distinguish 
	from the rest because it's really buggy). My goal is to make 
	a cool engine for modding and learn OpenGL programming.
	
	
=============
  Features
=============

version 1.25 (2004-07-11)

	* AVI capture support (code from QuakeDoneQuick team);
	* High resolution textures loading (up to 4096 x 4096 pixels) -
	  adapted from MrG's original code;
	* MP3 load and playback (mono channels only, can be any sample frequency) - 
	  adapted from Heffo's original code;
	* Memory leak bugfix (from original Lord Havoc's code);
	* Movement interpolation fix (from the QER Team);
	* Stencil buffer shadow code from MrG (originally Quake2 code).

version 1.19 (2004-06-12)

	* Lord Havoc's Colored light tutorial
	* Phoenix's interpolation tutorial ( I messed up something and 
	  the large delta prevention code is broken, I'll fix in the
	  next release - I hope :/ )
	* Compiler (MSVC6) warnings fix on the original code
	* Item bobbing and rotation controlled by cvar.
	* Some cvar's changed to save status in config.cfg (r_shadows,
	gl_wateralpha, etc). No more hassle with this.		
	* Muff's improved shadow code	
	* FrikaC's chase camera fix
	* Old mlook command replaced by cvar (in_mlook, default is 1)
	* Quake 2 rotating brush code
	* Lord Havoc's bmodel bound box fix
	* Ugly original GLQuake water warping toggle by cvar (r_waterwarp)
	* Tomaz/Brambo's improved fog code (uses the same cvars as TomazQuake,
	  last configuration is stored in config.cfg)
	* underliquid color-shifted fog 
	* Full bright textures toggled by cvar (gl_fullbright)
	* Sprite orientation fix
	* My own coordinate extension code, allows really BIG maps 
	  (no more 4096 units limits). Network compatibility is automatic
	  for legacy servers, but old clients cannot connect. Still 
	  needs work to fix render limits (see "Known Bugs").
	* PCX/TGA loading code from TomazQuake, changed to support
	texture themes (use r_textdir cvar to change textures, skins,
	console, charset - default is "main")
	* Lord Havoc's MD2 support (+ shadow fix & colored light code 
	  from TomazQuake)
	* Quake 2 skyboxes, controlled by cvars (r_textdir & skyname)


==============
 Instructions
==============

	.: AVI capture :.
	
	Pretty much the same thing as in JoeQuake, except that Q2K4 creates
	a "capture" folder under the current game folder (id1 by default). 
	The same cvars are valid:
	
	- capture_codec
	Contains the fourcc code of video codec's, 0 by default (no compression).
	For example divx or xvid, etc. (You will need to install the desired
	codec first, of course). I strongly recommend: DO NOT USE "0" or Q2K4
	will eat all your hard drive quickly.

	- capture_fps
	Sets on how many frames/sec you wish the video to be captured.
	It's 30.0 by default.
	NOTE: this variable changes host_framerate's value during recording.

	Also, the following commands works in Q2K4 too:
	
	- capture_start <filename>
	Starts capturing an .avi file.

	- capture_stop
	Stops capturing.	

	- capturedemo <filename>
	Starts playing a demo and starts capturing it also with the same name.
	
	As noted in JoeQuake's readme file, it's always a good idea first to
	record a demo and after record the AVI file using capturedemo. And
	lower screen resolutions are better if you don't have a really good
	video card and/or CPU.
	

	.: MP3 load and playback :.
	
	There are no special commands or cvars, just replace any .wav file
	with a mono channel	MP3 (stereo samples are not supported, but hey,
	this is Quake, not WinAmp). Although the engine will resample high
	quality sound automatically, it's a better idea use 11KHz samples
	(default Quake's rate) for space saving. I haven't tested MP3 reading 
	from .pak files	but it should work normally. Also, keep in mind that 
	although the used codec is GPL code, the MP3 compression format itself 
	is not	free. For more details check out http://www.mp3licencing.com.
	
	On a side note, I played with Ogg Vorbis support, but this bloated
	the .exe (I used the static lib version, I can give a try later in
	the DLL version if enough people ask for it or if some lawyer hit my
	door because the MP3 stuff) so I dropped.


	.: Item bobbing and rotation control :.

	You are no more limited to the old boring spinning items! Now
	you can have spinning AND / OR bobbing items. You can even have 
	static items! Just select the desired combination:
	
		- cl_itemfx 0: only rotate, works as original Quake (default)
		- cl_itemfx 1: rotate & bobs item
		- cl_itemfx 2: only bobs the item
		- cl_itemfx 3: no rotation or bobbing (static items)
	
	.: Rotating brushes :.
	
	Now you can have brushes (bmodels) which correctly rotates,
	including their bound boxes. With little effort you can make
	spinning doors, machinery, etc. See the func_rotating.qc file
	for more info.
	
	.: Coordinates extended (no more 4096 units map limits) :.
	
	Stills experimental code, but stable enough to use. Now you
	can make that Everquest-like mod you always wanted. There
	is a issue with the render (some really big maps don't render
	totally), but all the rest works fine. You won't fall off the
	map, trust me. :)
	
	WARNING: Q2K4 network compatibility is partial. This means 
	you can connect to a legacy Quake server using Q2K4, but a 
	legacy client CANNOT connect to a Q2K4 server. 

	.: Artwork theme support :.
	
	Okay, that's a step ahead the original code from the tutorials 
	and other engines. Now there is a new cvar (r_textdir)
	which contains the root directory from which all artwork is
	loaded (for .BSP, .MDL, .MD2 models, and also console background
	and charset). The default value is "main". So, if you want to
	use a new CONBACK.TGA (or .PCX), put it in
	
		<quakedir>id1\main
		
	You can change "id1" to your mod's directory of course, and
	change the r_textdir value for anything different from "main"
	(for example, "rusted" for really old-looking textures). It's
	a good way to make old levels look really different, or to
	make maps change aspect via QuakeC (just setting the cvar
	before calling changelevel()). 
	
	For .BSP models, put the replacement textures in
	
		<quakedir>id1\main\maps
		
	For .MDL models skins, put the replacement textures in
	
		<quakedir>id1\main\progs
		
	Use the same convention from TomazQuake (model name + skin
	number.TGA or .PCX). For instance, use player_0.tga for a
	new player skin.
	
	For .MD2 models skins, the path is:
	
		<quakedir>id1\main\models\monsters\<monstername>
		
	For example, let's say you are using the Quake 2 gunner 
	monster	model in your mod. You must put the skin (skin.pcx) 
	at:
	
		<quakedir>id1\main\models\monsters\gunner

	Of course, you can also use a .TGA replacement of the
	same dimensions. 

	.: Skyboxes :.
	
	Skyboxes are also stored into themes directories, and 
	additionally you can change the sky name through the
	skyname cvar. Q2K4 looks for skyboxes textures into a
	"env" dir under the theme dir. Although you	can load 
	really big textures for skyboxes, they don't look very 
	good and eat a lot of RAM, so keep the 256x256 dimensions 
	for each texture. The naming convention is the same at
	other engines (sky name + "lf", "rt", "up", "dn", "ft" 
	or "bk").

	
==============
 Known bugs
==============


	- skybox PCX support is broken. Works fine with TGA.
	- The coordinate extension code works fine, but the render
	  engine still capping the world coordinates at 8192 units;
	- Once loaded, you cannot change a .mdl or .md2 skin. It's
	  not exactly a bug, but the way Quake works. I may end up
	  creating a way to flush the model cache via QuakeC to
	  avoid this problem;
	- There are conditions when changing the sky box name and
	loading a level makes Q2K4 to crash;

==============
 Legal stuff
==============

	This code is released under the GPL license. This code is NOT
	well tested; I am NOT liable for anything that may (or may NOT)
	happen with your computer, dog, cat, hamster, girlfriend, etc. 


=======================================
 Unknown bugs, contacts, suggestions ?
=======================================


	Mail me: carloshp@centroin.com.br
	  