POLYTEX engine Notes (4/12/95):

POLYTEX programmed by Ken Silverman

Ŀ
                            POLYTEX KEYS:                                  

	ESC                Quit

	Up / Down          Forward / Backward
	Left / Right       Turn (change longitude)
	PGUP / PGDN        Look up/down (change latitude)
	, / .              Rotates screen
	Rt.Ctrl            Use with Left / Right for strafe
	A / Z              Move up / down
	0 (keyp.)          Hold to reset angles to right side up
	Rt.Ctrol+0 (keyp.) Hold to reset angles so you look straight down

	- / + (left)       Hold down to change window size
							 (Supports sizes from 16*16 to 1600*1200 - uses VESA)
	Keyp. Enter        Switch between texturized plane mode, solid plane mode,
								 and wire frame mode
	Sh.Keyp.Enter      Switch between solid, line, and dot sprite drawing mode.

	V                  Select a new tile for the plane under mouse cursor
	- / + (keypad)     Change shade of plane under mouse cursor
	Tab / L. Enter     Copy / Paste tile number

	3 / 7 (keypad)     Change repeating size
	F                  Flip the direction of the texturizing

	N                  Load Hard-coded board #1
	L                  Load board
	Alt-S              Save board

	F12                Screen capture

	Note: Right now I have polygon objects disabled since they slow down the
	frame rate a lot.  You can enable them by renanming *.x3d *.3d.

ͻ
͹
͹
͹
͹
͹
͹
͹
͹
ͼ

Ŀ
                        POLYTEX Revision History:                          

10/26/94  - Added this revision thing.

			 - Some known problems in POLYTEX4.EXE at this point are:

					* Not splitting planes in the BSP yet.
					* Converting boards from Build to Polytex - ceiling and floor
						  planes with holes in them (sectors inside sectors) convert
						  wrong sometimes.
					* Overflow with far away planes.
					* Calculation of normal vectors using collinear points -
						  screwing up texture mapping.
					* Clipmove lets you escape through concave corners sometimes.
					* Clipmove does not work yet on sharp edges.
					* Clipmove sometimes bumps you out into nowhere land.
					* Pixels screwed up at edges of planes.
					* Drawing the screen front to back would be nice.

			 - Added 3D BSP tree that is calculated right after a board is
					loaded.  You should see a bunch of white pixels at the top of
					the screen that disappear as each new part of the BSP tree is
					calculated.  When all the white disappears, the calculations
					are done.

			 - George / Scott - Be sure to try these things:

				  1. If you press Shift+N and then you turn freely WITHOUT
						  changing your position, it should appear as if you are at
						  the center of a SPHERICAL earth.  I could use this trick
						  for making spherical parallaxing skies.

				  2. Try copying *.ART, *.MAP, and PALETTE.DAT from the Build
						  directory into a temporary directory with all the Polytex
						  files.  To view a Build map in Polytex, simply type
						  "polytex4 boards" for example.  My "boards.map" map seems
						  to work great in polytex4.  I would recommend trying
						  small maps at first.

10/27/94  - Added plane splitting in BSP - BSP works great now!

			 - Fixed most overflow problems with far away planes.

			 - Fixed the "calculation of normal vectors using collinear points
						  screwing up texture mapping" bug

11/16/94  - Improved conversion of BUILD maps to POLYTEX.  Works perfectly
					for walls and masked walls (no transluscence yet).

			 - Keypad enter now selects between: 1. Texturirzed plane mode
															 2. Solid plane mode
															 3. Wire-frame mode

			 - Added gamma correction - Use ALT+(keyp. +/-) to change.

			 - New algorithm that makes the pixels not look fuzzy any more.
					Side effect:  Rarely, when you're close to a polygon, it will
					look slightly warped at certain angles.

			 - Some maps that look good and work well in POLYTEX are:
									 Ken: BOARDS.MAP
								  BLOOD: L2.MAP,L3.MAP,M2.MAP,QSEXMX.MAP
									DUKE: N8.MAP,POOL.MAP

				I recommend these maps because they are small, which makes them
					run faster (since I'm still doing back to front drawing) and
					they don't have any BUILD->POLYTEX map conversion bugs.

12/25/94  POLYTEX5!  Here are the great new features:

			 - Perfect pixel boundaries on edges of polygons for texturized
					graphics.  Too bad this new algorithm makes polytex a few
					frames a second slower for now.

			 - Made wire-frame mode use super screen coordinate precision.

			 - Fixed texturization overflow bugs in super hi-res modes.

			 - Supports VESA modes up to 1600*1200.

			 - Made nice clean rotation functions.

			 - Added full support for ugly, non-convex polygons with holes.
					This makes the ceilings and floors of complex build maps
					convert correctly.

			 - Made polygon splitting routine for both the BSP tree and screen
					clipping clip perfectly! - that is, without degenerate lines.

			 - Made "Reverso" mode!  Press 'R' to see the back sides of planes
					instead of fron sides of planes.  If you go outside a map in
					reverso mode, you will see the building as it should look
					from the outside.  (It's easy to escape with my vast array of
					movement clipping bugs)

			 - Added Zooming feature.  It's really cool since you can change
					the 90 degree viewing range to any angle instantly!  This
					is DEFINITELY worth trying!  Press Shift -/= to adjust zoom.

12/28/94  - Programmed CUBES.EXE.  It uses many of the same routines as
					POLYTEX5.EXE.  It is not optimized in the least, and it's
					still not that slow!  Even the routine that draws to the
					screen is still in C.  Unfortunatly it crashes a lot.  Since
					CUBES and POLYTEX and much the same, if I fix it in one, it
					will be easy to fix it in the other.

2/1/95    - Optimized cacheing system.

2/19/95   - Added polygonal sprites.  Sprites can be converted from 3d Studio
					using my basic program, read3ds.bas, if they are saved in the
					asc format.  My read3ds program rescales all x,y,z coordinates
					to fit in 16-bit integers.

			 - In Polyspri.exe, sprites can rotate and explode.

			 - Now, both board polygons and polygonal sprites have 3 modes of
					display:

							Board polygons (KP.ENTER to toggle)
						 1: Texturized mode (default)
						 2: Solid mode
						 3: Wire-frame mode

							Polygonal sprites (Shift+KP.ENTER to toggle)
						 1: Solid mode (default)
						 2: Wire-frame mode
						 3: Dot mode

			 - Copied sprite doubly-linked list code from Build. (Insertsprite,
					deletesprite, etc.)

3/12/95   - Optimized cache space using my new best-fit 2D caching system.

3/19/95   - Split polytex into more modules.  Here are the files needed to
					compile and an explanatation of each:

					game.c      - This is the code that you re-write
					polytex.obj - Ken's C code
					polytex.h   - Variables that Ken wants to share with you
					p.obj       - Ken's Assembler code


3/22/95   - Moved 2d cacheing algorithm from polytex.obj into cache2d.obj

			 - Like totally cleaned up the game.c and polytex.h code.

3/23/95   - If you save a map in polytex format, it will store the BSP info
					in the file so polytex does not have to recreate the tree when
					loading.

			 - If for some reason, polytex locks up, I made the SCROLL LOCK key
					do a clean exit directly from the keyboard handler.

			 - Fixed the 9 texture-direction variables, so that:
					(plane[].ox,plane[].oy,plane[].oz) is the texture origin
					(plane[].ux,plane[].uy,plane[].uz) is the U vector offset
					(plane[].vx,plane[].vy,plane[].vz) is the V vector offset
						Note that the U and V vectors are no longer absolute points
					but offset to the O origin.  This saves some additions and
					subtractions in the texture mapping calculations.

4/18/95   - Cleaned up polytex solid plane mode edge screen pixel accuracy.

5/22/95   - Fixed diagonal filling bugs for texturized planes.  No more
					lightning bolts.

			 - Fixed BSP tree crashing when loading certain boards.  For some
					reason, there were some sprites where ((cstat&48) == 48).
					This type of sprite doesn't exist yet.
