Forum

FitzQuake Mark V - Easy to compile and ...

Discuss programming topics for the various GPL'd game engine sources.

Moderator: InsideQC Admins

FitzQuake Mark V - Easy to compile and ...

Postby Baker » Fri Jun 29, 2012 9:22 am

Download: http://quake-1.com/docs/utils/fitzquake_mark_v.zip (binary + source)

This is in many a ways a super tutorial engine.

1). Every modification is wrapped in #ifdef ... #endif blocks
2). Almost every new feature was written/rewritten from scratch in a logical manner that is easy to follow.
3). Project files: Visual Studio 6, CodeBlocks, Visual Studio 2008 C++ Express. Click compile = done. Zero errors, zero warnings.
4). This engine source is an open invitation to load up on bug-fixes and/or modifications. See quakedef.h
5). Engine compiles into FitzQuake 0.85 by changing a mere 0 to a 1 in quakedef.h.

Excerpt: "Quick list of things to try:

tool_texturepointer 1
tool_inspector 1 (do impulse 9 and change your weapon)
r_texprefix_envmap "window" and load the start map; look at window.
r_texprefix_scrollx "c" and load the start map.

scrollx_ textures can be used for billoards, surfaces that appear to be
continually moving, etc. envmap_ textures work well for metallic trim,
Alpha textures default to "{" like the RMQ Engine but the prefix can be
changed via r_texprefix_fence.

More things to try:

type copy in the console. Paste your text in notepad.
type copyscreen in console. Paste screenshot in graphics editor.
type copy ents in console. Paste text into notepad.
type folder in the console. Quake folder opens.

Type fov 120 or fov 130 and look at your weapon. Looks normal.

type r_waterripple 3 in the console. Look at water. Then ...
type gl_subdivide_size 16 in the console. Look at water again with
r_waterripple on. (Feature works best on water vised maps.)

bind "capturevideo toggle" to a key. Record some video. First time
starts it, second time stops it. Type "folder".


Read me:

Code: Select all
================================================================================

Fitzquake Mark V, June 29, 2012


This is a modification of FitzQuake 0.85 by John Fitzgibbons with bug-fixes,
some developer oriented tools, some user oriented fixes and features and a few
content creation extras (alpha texture support, rotation, scrolling textures,
sphere mapped textures, custom liquid blend colors, r_waterripple).  Includes
Quakespasm "wrong content protection", MH dynamic light speed up.

Source and distribution are GPL version 3 and included with this zip.

Quick list of things to try:

tool_texturepointer 1
tool_inspector 1 (do impulse 9 and change your weapon)
r_texprefix_envmap "window" and load the start map; look at window.
r_texprefix_scrollx "c" and load the start map.

scrollx_ textures can be used for billoards, surfaces that appear to be
continually moving, etc.  envmap_ textures work well for metallic trim,
Alpha textures default to "{" like the RMQ Engine but the prefix can be
changed via r_texprefix_fence.

More things to try:

type copy in the console.  Paste your text in notepad.
type copyscreen in console.  Paste screenshot in graphics editor.
type copy ents in console.  Paste text into notepad.
type folder in the console.  Quake folder opens.

Type fov 120 or fov 130 and look at your weapon.  Looks normal.

type r_waterripple 3 in the console.  Look at water.  Then ...
type gl_subdivide_size 16 in the console.  Look at water again with
r_waterripple on.  (Feature works best on water vised maps.)

bind "capturevideo toggle" to a key.  Record some video.  First time
starts it, second time stops it.  Type "folder".

Everything went through some exhaustive "quality assurance" making sure
all features function right even with FitzQuake niceties like r_showtris.

Although the above extras are nice, the emphais of this mini-project
was implementing a list of bug-fixes that have surfaced in the knowledge
pool in recent days, documenting them heavily in code and applying them
to FitzQuake.


-- Baker

Project files:
----------------
MSVC6, Codeblocks, Microsoft Visual Studio C++ 2008 Express.  Your choice.
CodeBlocks is free (CodeBlocks + MinGW download).  So is 2008 C++ Express.

Easy to compile.


Code Features:
----------------
Every new feature is an #ifdef ... #endif block.  In fact changing a single 1 to
a zero to a 1 builds into FitzQuake 0.85.  Ripping features or unravelling how
they are implemented is a breeze.  See quakedef.h.  Most features can be disabled
by commenting out a single line, I say "most" because a few features depend on
another feature being enabled.  There are few of those.


Engine Features:
----------------

See home page or quakedef.h but this includes a considerable quantity of bug
fixes.  And ...

1)  External .mdl texture support
2)  Support for alpha mask textures (fence textures). Palette color 255.
3)  Single pass video startup (read's config file early)
4)  Texture pointer (in console: tool_texturepointer 1 and point at surfaces)
5)  Entity inspector (console: tool_inspector 1; change weapon different info)
6)  Video capture (bind k "capturevideo toggle" press k to start/stop capture)

(Get the xvid codec.  See home page.)

7)  Record demos at any time.  Record/play demos across maps.  Pause key pauses.
8)  "copy", "copy ents", "copyscreen" ... copy stuff to clipboard.
9)  "folder" command opens relevant folder in explorer.
10) External .ent support and Quakespasm "wrong content protection".
11) Contrast ability using contrast cvar in console (0.5 to 1.5)
12) Rotation support.  And smooth rotation sv_protocol 668.
13) freezeall command.  Freezes everything except players.
14) ping in scoreboard, NAT fix, support for ip:port.  Other network fixes.
15) Never needs max_edicts set.  Never needs -mem set. (Yet uses only 64MB).
16) System clock fix.  Fixes a dual-core/quad-core timing in oldy Quake.
17) [Stencil] shadows on submodels (platforms, etc); flicker fix (polyoffset).
18) MH's dynamic light speed up.  NVIDIA and Intels benefit huge, ATI barely.
19) chase_mode command.  Use in conjunction with chase_active 1.
20) Better weapon positioning and FOV (field of view) never changes appearance.
21) Liquid customization and water ripple support.
22) Scrolling texture support, sphere-mapped texture support.
23) Size console with CTRL + UP and CTRL + DOWN
24) Best weapon command.  Loc support.  Talk macros support.
25) Support for 5 mouse buttons. Windows key or Sticky keys won't annoy you.
26) sv_cheats support.  Set to 0 so no renegade coop friend starts ruining the
   map with noclipping/godmoding and shooting you with rockets.  Wish that
   could stop impulse 9 or impulse -1.  But it can't, that's the progs.
27) r_lockfrustum, r_lockpvs, etc.
   
Up next:  FitzQuake Mark VI ....


Baker's Acknowlegements
--------------------------------------------------------------------------------
The below plus MH, Spike, R00k, JP Grossman, szo and the Quakespasm team,
LordHavoc, frag.machine, goldenboy, Reckless, MDave, Jozsef Szalontai, Avirox,
Phoenix QER, VVD, QIP Quake, FrikaC and listening to Necros and Spirit discuss
engine gripes/limitations and things Bengt Jardrup helped me (or warned me about)
with when I first started engine coding and the constant bedrock of support by
my friends at QuakeOne.com (Mindzfield, Phenom, Solecord, Peg/Polarite, others).
... and obviously John Fitzgibbons ;-)



John Fitzgibbon's Acknowlegements
--------------------------------------------------------------------------------

id Software, LordHavoc, Bengt Jardrup, Baker, Aardappel, SmallPileOfGibs, FrikaC,
Vondur, JPL, Negke, preach, Topaz, Tomaz, Tonik, Radix, EvilTypeGuy, NightBringer,
MH, Tyrann, Spirit, Fett, Maddes, Craig Wills, Heffo, Riot, Gleeb, Speedy,
people in #flipcode, & others for their feedback, tutorials, code, testing,
and assistance.



Copyright / Permissions
--------------------------------------------------------------------------------

Copyright (C) 1996-2001 Id Software, Inc.
Copyright (C) 2002-2012 John Fitzgibbons and others

This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 3 of the License, or (at your option) any later
version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
Place - Suite 330, Boston, MA  02111-1307, USA.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: FitzQuake Mark V - Easy to compile and ...

Postby szo » Fri Jun 29, 2012 9:53 am

Didn't look deep but here's one bug: you still have svn_main.c:localmodels as [5], whereas you need [6] (an old fitz085 bug: see MAX_MODELS)
szo
 
Posts: 132
Joined: Mon Dec 06, 2010 4:42 pm

Re: FitzQuake Mark V - Easy to compile and ...

Postby szo » Fri Jun 29, 2012 10:09 am

A question: Where do you know that sound_nominal_clip_dist was 1500 in dosquake? (Even in the infamous crack.com-leaked quake source it was set as 1000 in snd_dma.c and not changed anywhere else.)
szo
 
Posts: 132
Joined: Mon Dec 06, 2010 4:42 pm

Re: FitzQuake Mark V - Easy to compile and ...

Postby r00k » Fri Jun 29, 2012 4:52 pm

Code: Select all
vec_t   sound_nominal_clip_dist=1500.0; // JPG - changed this from 1000 to 15000
                              // (I'm 99% sure that's what it was in 1.06)
r00k
 
Posts: 1110
Joined: Sat Nov 13, 2004 10:39 pm

Re: FitzQuake Mark V - Easy to compile and ...

Postby szo » Fri Jun 29, 2012 5:02 pm

r00k wrote:
Code: Select all
vec_t   sound_nominal_clip_dist=1500.0; // JPG - changed this from 1000 to 15000
                              // (I'm 99% sure that's what it was in 1.06)

What source code are you referring to? (whoever is that JPG??) The original q1source.zip doesn't have such a note.
szo
 
Posts: 132
Joined: Mon Dec 06, 2010 4:42 pm

Re: FitzQuake Mark V - Easy to compile and ...

Postby raynorpat » Fri Jun 29, 2012 7:05 pm

Isn't that in proquake?
raynorpat
 
Posts: 27
Joined: Tue Feb 26, 2008 12:21 am
Location: USA

Re: FitzQuake Mark V - Easy to compile and ...

Postby szo » Fri Jun 29, 2012 7:18 pm

raynorpat wrote:Isn't that in proquake?

Well, whatever it is, it is hard to be taken seriously given the fact that 1.01-ish source has been actually unofficially available for about 15 years due to that crack.com incident and those sources have no such indication about the original nominal sound clip dist being different back then. (I don't have a link to that source anymore, but see wmquake which is actually based on that source: http://www.ne.jp/asahi/linux/timecop/, http://www.ne.jp/asahi/linux/timecop/so ... .1.tar.bz2)
szo
 
Posts: 132
Joined: Mon Dec 06, 2010 4:42 pm

Re: FitzQuake Mark V - Easy to compile and ...

Postby mh » Sat Jun 30, 2012 1:45 am

I recall seeing that comment in 2002 or thereabouts but have noidea where. There's no reason to doubt it but then again there's no reason to believe it. Confirmation would be good.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Re: FitzQuake Mark V - Easy to compile and ...

Postby mh » Sat Jun 30, 2012 3:13 pm

For centering the window (Windows API version) this will take correct account of the taskbar size and location:
Code: Select all
void VIDWin32_CenterWindow (HWND hWnd)
{
   // get the size of the desktop working area and the window
   RECT workarea;

   if (SystemParametersInfo (SPI_GETWORKAREA, 0, &workarea, 0))
   {
      RECT windowrect;

      if (GetWindowRect (hWnd, &windowrect))
      {
         // center it properly in the working area (don't assume that top and left are 0!!!)
         SetWindowPos
         (
            hWnd,
            NULL,
            workarea.left + ((workarea.right - workarea.left) - (windowrect.right - windowrect.left)) / 2,
            workarea.top + ((workarea.bottom - workarea.top) - (windowrect.bottom - windowrect.top)) / 2,
            0,
            0,
            SWP_NOSIZE | SWP_NOZORDER | SWP_SHOWWINDOW | SWP_DRAWFRAME
         );
      }
   }
}

Otherwise, e.g. a 1024x768 windowed mode will sneak part of the window frame under the taskbar on Windows 7 running at 1600x900.

I'd also suggest using ((in_mlook.state & 1) || freelook.value) with the freelook cvar defaulting to 1.

And gl_flashblend should now default to 0 - the dynamic light fix works and is fast - even on AMD it runs over 1.5 times faster in simple cases (id1 timedemos).
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Re: FitzQuake Mark V - Easy to compile and ...

Postby Dr. Shadowborg » Sat Jun 30, 2012 8:38 pm

Downloading now.

Looks like some awesome goodies in this release. (scrolling textures?! sounds great for doing train fight maps :D )
User avatar
Dr. Shadowborg
InsideQC Staff
 
Posts: 1109
Joined: Sat Oct 16, 2004 3:34 pm

Re: FitzQuake Mark V - Easy to compile and ...

Postby frag.machine » Sat Jun 30, 2012 10:44 pm

Dr. Shadowborg wrote:Downloading now.

Looks like some awesome goodies in this release. (scrolling textures?! sounds great for doing train fight maps :D )


Lava falls! ZOMG!
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2078
Joined: Sat Nov 25, 2006 1:49 pm

Re: FitzQuake Mark V - Easy to compile and ...

Postby Dr. Shadowborg » Sun Jul 01, 2012 7:04 pm

frag.machine wrote:Lava falls! ZOMG!


Hadn't thought of those. :oops: Would work great for water and slime too, not to mention freaky forcefield textures. (I assume BSP transparencies for "glass" apply.) :D
User avatar
Dr. Shadowborg
InsideQC Staff
 
Posts: 1109
Joined: Sat Oct 16, 2004 3:34 pm

Re: FitzQuake Mark V - Easy to compile and ...

Postby leileilol » Mon Jul 02, 2012 12:13 am

I wanted to do scrolling textures (ab)using FTE's scrapped "bulleten" code) for Engoo once in my Nov 2010 featurecreepcodingrush. I never got it to work properly, and how would we define scrolling texture standards? Another prefix to parse in the texture name? like &su8vortex to scroll up 8 texels a sec, &sd3&sr7cheese to scroll down 3 texels and right 7 texels a second, or so...

We don't have surfaceflags so it's the least we can do :P


mh wrote:I recall seeing that comment in 2002 or thereabouts but have noidea where. There's no reason to doubt it but then again there's no reason to believe it. Confirmation would be good.


I wish Carmack gave a 'i don't care okay' about the leaked 1.01 source and the 1.06 qc source. There's even been a couple early Doom source ports that nick out of the leaked Quake source, Doom Legacy especially, in 1998, even with the usual function/struct renaming cover to make it less obvious. When they added a "Quake-style console" it literally IS the Quake console.

Darkplaces and Engoo have clean room "old attenuation" fixes done 2 years ago. In 1.01-1.06 you could hear explosions farther and sometimes their panning would be too directional. 1.07 added "proper" calculation which made the hearing range a bit shorter, but it's not the same spatialization function. This function is also identical in Quake 2 and Hexen II.

Q3's sound spatialization is even SHORTER ranged and i've even tried that in Quake once.
i should not be here
leileilol
 
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Re: FitzQuake Mark V - Easy to compile and ...

Postby mh » Mon Jul 02, 2012 1:40 am

Incidentally... http://gcc.gnu.org/ml/gcc/2001-07/msg01120.html and http://stackoverflow.com/questions/7227 ... er-warning

The Fitz source breaks this in multiple places. OK, most compilers will probably patch it up nowadays, but they don't have to and it should be fixed for better (future) portability.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Re: FitzQuake Mark V - Easy to compile and ...

Postby revelator » Mon Jul 02, 2012 2:18 am

While not as critical nowadays i agree with mh here its also crucial for some tools to parse things correctly that a source file ends in a newline.
This is not only relevant to gcc compilers but affects every compiler though some like msvc wont bitch about it :)
Productivity is a state of mind.
User avatar
revelator
 
Posts: 2542
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Next

Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 1 guest