Skip to content

Commit

Permalink
Quake VR v0.0.3 (#11)
Browse files Browse the repository at this point in the history
* Add generic and Oculus touch default bindings

* Bump version number

* Particle code refactorign

* Particle code refactoring

* New particle system

* copyright, particle experimentation

* Added "Troubleshooting" and "Fan Coverage" section to README

* Add "Fan Coverage" section in README

* Wip particles, make boss 1 easier£

* Initial texture manager for particles

* Particles!

* TODO

* Support snap turn increments of 5 degrees

* Lightning particles

* Fix compilation with gcc and clang

* Progress on particles

* Add spark particles to buttons, add pow function to QuakeC, improve melee damage calculations (reward hard hits, quad multiplier), add quad cheat

* remove qboolean

* Optimization hints

* Add particle and particle multiplier cvar

* Code cleanup

* Implement haptics!

* fist range

* Add gun smoke effects, pass muzzle position to QuakeC, fix laser crosshair

* Update readme
  • Loading branch information
vittorioromeo authored Mar 7, 2020
1 parent edd38a2 commit 2ec4eaa
Show file tree
Hide file tree
Showing 167 changed files with 2,984 additions and 1,713 deletions.
92 changes: 46 additions & 46 deletions Misc/fitzquake080.txt
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@

================================================================================

Fitzquake version 0.80, May 26, 2005
Fitzquake version 0.80, May 26, 2005

Filename : fitzquake080.exe
Author : John Fitzgibbons
Email Address : [email protected]
Author's Homepage : http://www.celephais.net/
Fitzquake Homepage : http://www.celephais.net/fitzquake

Fitzquake is a modified glquake based on the source code released by id
Software. My primary focus is fixing a lot of the rendering bugs which made
glquake inferior to the software renderer. My secondary focus is adding
Fitzquake is a modified glquake based on the source code released by id
Software. My primary focus is fixing a lot of the rendering bugs which made
glquake inferior to the software renderer. My secondary focus is adding
conveniences for mappers and general users. I am also slowly adding support for
new modding or mapping features such as skyboxes, fog, and colored light.
new modding or mapping features such as skyboxes, fog, and colored light.

While I have made extensive changes to the code, I pretty much use the same
OpenGL features that the original glquake uses. Therefore, if you can run
glquake, you can probably run Fitzquake.
While I have made extensive changes to the code, I pretty much use the same
OpenGL features that the original glquake uses. Therefore, if you can run
glquake, you can probably run Fitzquake.

I am not finished working on this project, so bug reports and feature requests
are welcome.
are welcome.

Acknowlegements
--------------------------------------------------------------------------------
Expand All @@ -30,8 +30,8 @@ LordHavoc (code and assistance)
Bengt Jardrup (feedback, assistance, testing)

additional thanks to: Aardappel, SmallPileOfGibs, FrikaC, Vondur, Topaz, Tomaz,
Tonik, Radix, EvilTypeGuy, NightBringer, MH, Maddes, Fett, Craig Wills, Heffo,
Riot, Gleeb, people in #flipcode, and others for their tutorials, code, testing,
Tonik, Radix, EvilTypeGuy, NightBringer, MH, Maddes, Fett, Craig Wills, Heffo,
Riot, Gleeb, people in #flipcode, and others for their tutorials, code, testing,
and assistance.

Copyright / Permissions
Expand All @@ -40,19 +40,19 @@ Copyright / Permissions
Copyright (C) 1996-2001 Id Software, Inc.
Copyright (C) 2002-2005 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 2 of the License, or (at your option) any later
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 2 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
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
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.

History
Expand Down Expand Up @@ -113,27 +113,27 @@ changes in 0.80
- fixed bug where imagelist and r_speeds2 would report the same megabyte counts in both 16bpp and 32bpp mode, even though texture bpp should match (and does match) framebuffer bpp. The numbers are now different and accurate for each bit depth.
- removed cvars "vid_config_x," "vid_config_y," "vid_wait," "vid_nopageflip," "_vid_wait_override," "_vid_default_mode," "_vid_default_mode_win," and "vid_stretch_by_2," none of which glquake ever used.
- removed cvar "vid_mode" and commands "vid_describemode" and "vid_nummodes," because of the new video mode handling.

cvars:

- gl_texture_anisotropy. Controls the amount of anisotropy in texture filtering. If 1 or less than 1, texture filtering is normal (isotropic.) If greater than 1, increasing degrees of anisotropic filtering are used, up to the hardware maximum. Set value to 2 for 2x anisotropic, 4 for 4x, etc. Default 1.

- host_timescale. Scales the passage of time on client and server. Set to 0 or 1 for normal speed, less than 1 for slow motion, and greater than 1 for fast-forward. If greater than 0, overrides host_framerate. Default 0.

- max_edicts. Sets the maximum number of entites on both the client and server. Default 1024. Acceptable values range from 256 to 8192. Set to 600 to mimic standard quake. Changes won't take effect until the next time a map is loaded. Note: if a client connects to a server, and the client's maximum is lower than the server's, the client will probably crash if it ever sees an entnum higher than its local max_edicts. Warning: you may need to increase -heapsize if you want a high max_edicts value.

- r_drawworld. If 1, draw world as usual. If 0, don't draw the world. Default 1. (compare r_drawentities)

- r_showbboxes. If 1, draw a wireframe bounding box around each entity. Note that these are the server-side per-edict physics bounding boxes, not the client-side per-model rendering bboxes. If 0, disable this feature. Default 0.

- r_showtris. If 1, draw wireframe outlines for every triangle in the scene. Like in Quake 3, the lines will be visible even through solid geometry. If 2, draw the outlines only on visible surfaces (like r_showtris 2 in Medal of Honor.) If 0, disable wireframe overlay. Default 0.

- vid_bpp. Sets the color depth of the screen in fullscreen mode. Windowed mode ignores this setting. Can be 16 or 32. Default 16. (Changes won't take effect until the next call to vid_restart.)

- vid_fullscreen. If 1, fitzquake will run fullscreen. If 0, fitzquake will run in a window. Default 1. (Changes won't take effect until the next call to vid_restart.)

- vid_height. Sets the vertical screen/window resolution. Default 480. In windowed mode, cannot be less than 200. (Changes won't take effect until the next call to vid_restart.)

- vid_refreshrate. Sets the refresh rate of the screen in fullscreen mode. Windowed mode ignores this setting. Possible values include 60, 70, 72, 75, 85, etc. Default 60. (Changes won't take effect until the next call to vid_restart.)

- vid_width. Sets the horizontal screen/window resolution. Default 640. In windowed mode, cannot be less than 320. (Changes won't take effect until the next call to vid_restart.)
Expand All @@ -145,7 +145,7 @@ commands:
- "cycle <cvar> <value> [<value> [<value> ...]]" to cycle a cvar through a list of values.. Note: this command will get stuck on a list that contains the same value more than once, such as "cycle blah 1 2 1 3". If you're doing anything that complex you can just use aliases.

- vid_restart. Tries to set a video mode that matches the values of vid_width, vid_height, vid_fullscreen, and, if vid_fullscreen is 1, vid_bpp and vid_refreshrate.

- vid_test. Like vid_restart, except that after switching to the new mode pops up a confirmation dialogue. This is useful if you are not sure what modes your monitor can handle, so you don't get stuck with a blank screen. The dialogue has a time limit so that if you don't press a key within 5 seconds, it will revert to the previous mode.

changes in 0.75
Expand Down Expand Up @@ -182,13 +182,13 @@ changes in 0.75
- removed cvar gl_ztrick. The depth buffer is now cleared every frame.
- removed cvar gl_keeptjunctions. Extra verts created by qbsp to eliminate tjunctions are now always kept.
- removed "sliding on monsters' heads" fix, becuase I decided I don't like the idea of changing gameplay, even if the original behaviour is clearly a bug. Since this bug can be fixed in quakec also, I feel safer leaving it as it was.

cvars:

- gl_overbright. default 1. This variable controls overbright lighting on the world polygons. (For lighting on models, use gl_overbright_models.) If 1, overbright will be enabled and lighting will resemble software Quake. If 0, overbright will be disabled and lighting will resemble GLQuake.

- r_oldskyleaf. default 0. If 0, surfaces inside sky leaves will be skipped by the renderer. If 1, they will be drawn whenever they are in your PVS, just like any other surface.

- r_oldwater. default 1. If 1, use the old GLQuake method of subdividing the water surface to enable a warping animation. If 0, use the new render-to-texture method. Note: in general, r_oldwater 0 looks better and runs slower. So experiment to see if the performance hit is acceptable to you.

- r_skyalpha. default 1. Sets the alpha of the front sky layer. Note that if sky alpha is less than 1.0, the sky will be drawn in two passes even if you have multitexture.
Expand Down Expand Up @@ -239,33 +239,33 @@ Changes in 0.70
- removed support for GL_EXT_shared_texture_palette (special 8-bit texture format)
- removed VCR code. command line switches "-record" and "-playback" no longer supported.
- removed support for command line switch "-gamma" -- just use the gamma cvar, or idgamma or something.

cvars:

- r_stereo. default 0. If nonzero, the scene will be rendered once in red, and again in cyan, with the two views shifted slightly. If you have 3D glasses you can appreciate this (assumes that the left eye is red and the right eye is cyan.) The value of r_stereo sets the eye separation. If your glasses have red on the right eye, use a negative value to flip the views.

- r_stereodepth. default 128. Sets the distance at which the two views will converge when stereo rendering is active.

- scr_conwdith. default 0. Sets the virtual console width, where smaller numbers means larger text. Values larger than window width, or smaller than 320, will be clamped to that range, and all values will be rounded to a multiple of 8. If 0, the window width will be used. Note that values that divide evenly into the window width will make the text look nicest.

- scr_menuscale. default 1. Sets the scale factor for menus and other centered overlays. If 1, images will be drawn at 1:1 scale. If 2, images will be double size. Menus will never be drawn smaller than 1:1, and never larger than the size of the window. Note that integer values will make the text look nicest.

- scr_sbarscale. default 1. Sets the scale factor for the statusbar. If 1, images will be drawn at 1:1 scale. If 2, images will be double size. The statusbar will never be drawn smaller than 1:1, and never larger than the width of the window. Note that integer values will make the text look nicest.

- host_maxfps. default 72. sets the maximum frames per second fitzquake will render (also the maximum number of server frames per second.) Clamped to the range 10 - 1000. Set to 72 to mimic standard quake.

- r_quadparticles. default 1. If 1, particles are drawn as GL_QUADS instead of GL_TRIANGLES. Quads use 4 verts instead of 3, but the fillrate cost is 1/2 that of triangles. Depending on your card, either one may be faster. This cvar has no effect on the appearance of particles.

- r_speeds. default 0. Values of 1 and 2 will give you increasing amounts of information. When you see two numbers separated by a slash, the first number is polys, and the second number is passes.

commands:

- gl_info. Displays opengl info which was previously displayed during initialization: vendor, renderer, version, and extensions

- imagelist. Displays a list of loaded textures, and their dimentions.

- gl_texturemode. Now accepts a number (1 through 6) as well as the name (gl_nearest, etc.)

- gl_describetexturemodes. Lists all texturemodes.

Changes in 0.65
Expand Down Expand Up @@ -293,7 +293,7 @@ Changes in 0.65
- optional 2x overbrightening on models. (see cvar "gl_overbright_models")
- optional quake2-style noclip. (see cvar "sv_altnoclip")
- new icon

cvars:

- con_logcenterprint: If 1, centerprint messages will be logged to the console in sp/coop. If 2, they will also be logged in deathmatch. Default 1.
Expand All @@ -306,7 +306,7 @@ cvars:

- r_flatlightstyles: If 1, styled lights (torch flicker, etc.) will be displayed as a steady light. If 2, the peak intensity will be used instead of the average intensity. Default 0.

- sv_altnoclip: If 1, enable the alternative noclip movement which resembles quake2 and is not constrained to the horizontal plane. Set to 0 to retain quake's original noclip behavior. Default 1.
- sv_altnoclip: If 1, enable the alternative noclip movement which resembles quake2 and is not constrained to the horizontal plane. Set to 0 to retain quake's original noclip behavior. Default 1.

Changes in 0.60
---------------
Expand Down Expand Up @@ -358,7 +358,7 @@ Changes in 0.60
- carets indicate that you are scrolled back, like in quakeworld/quake2
- left arrow, right arrow, pgup, pgdn keys now auto-repeat
- quadrupled the length of the console history
- commands:
- commands:
- "game <gamedir>" to load a mod.
- "reset <cvar>" to reset a cvar to default. Note that this is the engine default, not the default.cfg value
- resetall. resets all cvars.
Expand Down
6 changes: 3 additions & 3 deletions QC/boss.qc
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ void() boss_missile7 =[ $attack7, boss_missile8 ] {boss_face();};
void() boss_missile8 =[ $attack8, boss_missile9 ] {boss_face();};
void() boss_missile9 =[ $attack9, boss_missile10 ] {boss_missile(0, '100 100 200');};
void() boss_missile10 =[ $attack10, boss_missile11 ] {boss_face();};
void() boss_missile11 =[ $attack11, boss_missile12 ] {boss_missile(1, '100 100 200');};
void() boss_missile11 =[ $attack11, boss_missile12 ] {boss_face();};
void() boss_missile12 =[ $attack12, boss_missile13 ] {boss_face();};
void() boss_missile13 =[ $attack13, boss_missile14 ] {boss_face();};
void() boss_missile14 =[ $attack14, boss_missile15 ] {boss_face();};
Expand Down Expand Up @@ -202,11 +202,11 @@ void(float r, vector p) boss_missile =
// VR: Predicted direction attack.
if (r == 0)
{
vel = 700 + random() * 200;
vel = 450 + random() * 150;
}
else
{
vel = 300 + random() * 200;
vel = 100 + random() * 150;
}

offang = vectoangles (self.enemy.origin - self.origin);
Expand Down
32 changes: 32 additions & 0 deletions QC/buttons.qc
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
// button and multiple button

void(entity e) VRButtonPressHaptic =
{
if (cvar("vr_body_interactions") == 0)
{
haptic(e.touchinghand, 0.0, 0.3, 75, 1.0);
}
else
{
haptic(0, 0.0, 0.3, 75, 1.0);
haptic(1, 0.0, 0.3, 75, 1.0);
}
}

void() button_wait;
void() button_return;

Expand All @@ -20,8 +33,17 @@ void() button_done =

void() button_return =
{
local vector porg;

porg_x = self.absmin_x + ((self.absmax_x - self.absmin_x) / 2);
porg_y = self.absmin_y + ((self.absmax_y - self.absmin_y) / 2);
porg_z = self.absmin_z + ((self.absmax_z - self.absmin_z) / 2);
particle2 (porg, '0 0 0', 5 /* sparks preset */, 64);

self.state = STATE_DOWN;

SUB_CalcMove (self.pos1, self.speed, button_done);

self.frame = 0; // use normal textures
if (self.health)
self.takedamage = DAMAGE_YES; // can be shot again
Expand All @@ -35,11 +57,19 @@ void() button_blocked =

void() button_fire =
{
local vector porg;

if (self.state == STATE_UP || self.state == STATE_TOP)
{
return;
}


porg_x = self.absmin_x + ((self.absmax_x - self.absmin_x) / 2);
porg_y = self.absmin_y + ((self.absmax_y - self.absmin_y) / 2);
porg_z = self.absmin_z + ((self.absmax_z - self.absmin_z) / 2);
particle2 (porg, '0 0 0', 5 /* sparks preset */, 64);

sound (self, CHAN_VOICE, self.noise, 1, ATTN_NORM);

self.state = STATE_UP;
Expand All @@ -60,6 +90,8 @@ void() button_touch =
return;
}

VRButtonPressHaptic(other);

self.enemy = other;
button_fire ();
};
Expand Down
Loading

0 comments on commit 2ec4eaa

Please sign in to comment.