Code Monkey home page Code Monkey logo

ironwail's Introduction

What's this?

A fork of the popular GLQuake descendant QuakeSpasm with a focus on high performance instead of maximum compatibility, with a few extra features sprinkled on top.

Does performance still matter, though? I'm getting 1000 fps in QS on e1m1

On most maps performance is indeed not much of a concern on a modern system. In recent years, however, some mappers have tried more ambitious/unconventional designs with poly counts far exceeding those of the original id Software levels from 25 years ago. It's also not uncommon for players of such an old game to be using hardware that is maybe not the latest and greatest, struggling on complex maps when using traditional renderers. By moving work from the CPU to the GPU (culling, lightmap updates) and taking advantage of more modern OpenGL features (instancing, compute shaders, persistent buffer mapping, indirect multi-draw, bindless textures), this fork is capable of handling even the most demanding maps at very high framerates. To avoid physics issues the renderer is also decoupled from the server (using code from QSS, via vkQuake).

Bonus features

  • ability to play the 2021 release content with zero setup: if you have Quake on Steam, you can unzip the latest Ironwail release in any folder (that doesn't already contain a valid Quake installation) and simply run the executable to play the game, including any add-ons you have already downloaded
  • new Mods menu, for quick access to any add-ons you've already installed
  • ability to change weapon key bindings using the UI, not just the console
  • ability to use the mouse to control the UI
  • alternative HUD styles based on the Q64 layout (classic one is still available, of course)
  • real-time palettization (with optional dithering) for a more authentic look
  • classic underwater warp effect
  • more options exposed in the UI, most of them taking effect instantly (no vid_restart needed)
  • support for lightmapped liquid surfaces
  • lightstyle interpolation (e.g. smoothly pulsating lighting in ad_tears)
  • reduced heap usage (e.g. you can play tershib/shib1_drake and peril/tavistock without using -heapsize on the command line)
  • reduced loading time for jumbo maps
  • slightly higher color/depth buffer precision to avoid banding/z-fighting artifacts
  • a more precise hackwork-around for the z-fighting issues present in the original levels
  • capped framerate when no map is loaded
  • ability to run the game from a folder containing Unicode characters

System requirements

Minimum GPU Recommended GPU
NVIDIA GeForce GT 420 ("Fermi" 2010) GeForce GT 630 or newer ("Kepler" 2012)
AMD Radeon HD 5450 ("TeraScale 2" 2009) Radeon HD 7700 series or newer ("GCN" 2012)
Intel HD Graphics 4200 ("Haswell" 2012) HD Graphics 620 ("Kaby Lake" 2016) or newer

Notes:

  1. These requirements might not be 100% accurate since they are based solely on reported OpenGL capabilities. There could still be unforeseen compatibility issues.
  2. Mac OS is not supported at this time due to the use of OpenGL 4.3 (for compute shaders), since Apple has deprecated OpenGL after version 4.1.

ironwail's People

Contributors

4lt avatar alexey-lysiuk avatar andrei-drexler avatar andrey-budko avatar bangstk avatar calinou avatar daftmugi avatar diordany avatar ericwa avatar erysdren avatar fpiesche avatar josiahjack avatar kduske avatar kurtloeffler avatar macil avatar maikmerten avatar neogeographica avatar novum avatar ottohatt avatar perpixel avatar protocultor avatar sezero avatar skitt avatar smcv avatar sndein avatar svdijk avatar swim32 avatar temx avatar tyfighter avatar vsonnier avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ironwail's Issues

[Feature request] md5/md3 support

This would be great to have for modders looking to bring their own models into the mix. The problem with mdl's is they've got very visible vertex wobbling going on, while there's practically no visible distortion for md3's and none at all for md5.

[Feature Request] Scale Crosshair with rest of HUD

It always seemed a bit odd that the HUD scale slider never effects the size of the crosshair. It would probably be more intuitive to have the slider also effect scr_crosshairscale in addition to the other HUD elements.

Hitching

at 250fps I seem to be getting a lot of weird stutters, easiest to notice when dropping, so ramps and especially elevators. If I try to move in the E1M1 elevator its like im doing little bunny hop stutters.

wrote that then realized to be helpful I should try and install the original quakespasm and it has the same issue, read up on it a bit and found out its due to physics issues, which is exactly what this is supposed to be fixing(according to the readme)

Tried changing max_hostfps to 72 and that fixed the issue, then changed it back to 250 and the issue was also gone.

Restarted the game(exited) and issue returned until doing max_hostfps 72 then max_hostfps 250

So its not decoupling the physics unless the max_hostfps command is used.

win10: Required extension GL_ARB_bindless_texture not found

can anyone confirm that this will actually work with Skylake iGPUs? Or is this just a Windows intel driver issue?
Tried the test2 binary and a current version compiled usind MSYS2.

iGPU is Iris Graphics 540
GFX driver version: 27.20.100.9466
Win10 21H1

[Bug] Running out of edicts

Max_edicts is currently set to 8.192. This is apparently too low for some more demanding maps which would crash to console when running out of edicts. This happened to me at the end of "Necrobestial Analbuttsex" (nbabs.bsp / Violent Rumble).

Default value should either be at least doubled (16.384) or ideally even be made unlimited/dynamic. (In general, it's best to have all internal limits either maxed out or unlimited to avoid having to keep increasing values when newer, even more demanding maps are eventually released.) This also goes for particle count, for example.

[Feature Request] Enable title demo playback toggle

I think the one thing Quakespasm has missed out on for a long time is its removal of the original title demos playing back on startup. Could we perhaps see an in-menu toggle for this, so we don't have to worry about constantly adding the -fitz parameter all the time?

[Bug] Client pitch angle is incorrectly restored on load game

Description

Client pitch angle is incorrectly restored on load game. This bug is present in most Quake engines, and derives from the original ID software code.

Cause

Host_Spawn_f sets viewangles from edict_t::v.angles, which is correct for first-time entry to a map and for general entities. The actual player angles on the server are stored in edict_t::v.v_angle, however, so when restoring from a load game, the incorrect pitch angle (in particular) will be set: it will be 0.3 * the correct angle, but in the opposite direction.

Steps to Reproduce

  • Start any map.
  • Look down.
  • Save the game while looking down.
  • Load the game from this save file.
  • You will be looking up at 0.3 of your angle.

Suggested Fix

In Host_Spawn_f, replace this block of code:

for (i = 0; i < 2; i++)
MSG_WriteAngle (&host_client->message, ent->v.angles[i], sv.protocolflags );

With this:

for (i = 0; i < 2; i++)
{
if (sv.loadgame)
MSG_WriteAngle (&host_client->message, ent->v.v_angle[i], sv.protocolflags);
else MSG_WriteAngle (&host_client->message, ent->v.angles[i], sv.protocolflags);
}

The new code correctly determines if the player is being spawned from a load game, and if so it writes the correct angle.

Display monster counts > 3 digits in intermission

Since it's getting more common for maps to have over 1000 enemies, it'd be nice to have the score screen properly display these numbers. Currently it only displays the last 3 digits, so if you had 1234 enemies it would display the total as 234.

[Bug] r_showbboxes doesn't work

For some reason, r_showbboxes 1 doesn't work in this engine, it doesn't display anything, while it does in QS/QSS/vkQ (for vkQ it was fixed fairly recently).

bad %z usage in common.c and gl_rmisc.c

https://github.com/andrei-drexler/quakespasm/blob/b3214a851d1ff0d1f881c191ac18078d7ca08dd8/Quake/common.c#L179
https://github.com/andrei-drexler/quakespasm/blob/b3214a851d1ff0d1f881c191ac18078d7ca08dd8/Quake/gl_rmisc.c#L637
Fix:

diff --git a/Quake/common.c b/Quake/common.c
index b93fa97..16f0751 100644
--- a/Quake/common.c
+++ b/Quake/common.c
@@ -176,7 +176,7 @@ void Vec_Grow (void **pvec, size_t element_size, size_t count)
 		else
 			new_buffer = malloc (total_size);
 		if (!new_buffer)
-			Sys_Error ("Vec_Grow: failed to allocate %z bytes\n", total_size);
+			Sys_Error ("Vec_Grow: failed to allocate %zu bytes\n", total_size);
 
 		*pvec = 1 + (vec_header_t*)new_buffer;
 		VEC_HEADER(*pvec) = header;
diff --git a/Quake/gl_rmisc.c b/Quake/gl_rmisc.c
index a419e62..4ea5db2 100644
--- a/Quake/gl_rmisc.c
+++ b/Quake/gl_rmisc.c
@@ -634,7 +634,7 @@ static void GL_AllocDynamicBuffers (void)
 		GL_BufferStorageFunc (GL_ARRAY_BUFFER, dynabuf_size, NULL, flags);
 		buf->ptr = GL_MapBufferRangeFunc (GL_ARRAY_BUFFER, 0, dynabuf_size, flags);
 		if (!buf->ptr)
-			Sys_Error ("GL_AllocDynamicBuffers: MapBufferRange failed on %z bytes", dynabuf_size);
+			Sys_Error ("GL_AllocDynamicBuffers: MapBufferRange failed on %zu bytes", dynabuf_size);
 	}
 
 	dynabuf_offset = 0;

Feature Request: Having a proper official name for the fork

First of all, I would like to say thank you for creating this fork of QS. As someone with a low end laptop, I struggled playing some of the more detailed maps (like AD_Tears in Arcane Dimension etc.) at 60 fps. Your fork is the only one that runs such maps at 60+ fps for me. Keep up the great work :)

The feature request isn't really a request for a "feature" per se but a small suggestion to have a proper name for the fork to increase its popularity. I say this because this fork deserves more recognition for how much of performance it improved and it would be a shame if the port went under the radar of most players (and the more recognition means hopefully improving the chances of QS or QS-Spiked devs considering to add the optimization features this offers).

[Bug] r_shadows no longer has an effect

Although not perfect, I enjoyed the r_shadows option in Quakespasm, helped immerse the models a bit more into the levels. However it seems to no longer work.

A pipe dream would be a shadow system similar to KEX Quake. And the realtime lighting of FTEQW is pretty cool too! What can I say, I am a shadow addict haha.

array index out of bounds in R_DrawAliasModel_Real()

https://github.com/andrei-drexler/quakespasm/blob/b3214a851d1ff0d1f881c191ac18078d7ca08dd8/Quake/r_alias.c#L453

fix:

diff --git a/Quake/r_alias.c b/Quake/r_alias.c
index ec4baf3..571b433 100644
--- a/Quake/r_alias.c
+++ b/Quake/r_alias.c
@@ -450,7 +450,7 @@ static void R_DrawAliasModel_Real (entity_t *e, qboolean showtris)
 	{
 		tx = blacktexture;
 		fb = whitetexture;
-		lightcolor[0] = lightcolor[2] = lightcolor[3] = 0.5f;
+		lightcolor[0] = lightcolor[1] = lightcolor[2] = 0.5f;
 		entalpha = 1.f;
 	}
 

[Bug] Particle trail density on projectiles tied to framerate

The particles emitted by projectiles that leave trails (grenades, rockets, gibs etc) are created at a higher frequency when playing at higher framerates. This can lead to the particle limit being hit very easily - if you don't mess with heapsise - so no more particles are generated, not to mention it looks ugly to see a solid line of particles.

As far as I can tell this bug exists in every engine, but it's only a problem when playing at high FPS, which is particularly apparent in this one. It would be nice to finally see a fix for it.

FPS uncapped
FPS capped at 72

Old Quit Messages?

Would be nice to have the oldschool taunt messages when you try to quit the game. Could you perhaps add those back?

extreme performance case FYI

Got a performance test case if you're interested.

It's this conversion/episode thing that is in prerelease: https://www.quaddicted.com/forum/viewtopic.php?id=1171

Lots of big environments, and not fully vis'ed yet I think (or vis'ed at all). When launching it these args are recommended: +gl_farclip 128000 +sv_protocol 999 -heapsize 600000

If you use the console to do "map tavistock" and look toward the open area, with Ironwail I get about 5 FPS with r_softemu 3 or 10 FPS with r_softemu 0. Compared to 25 FPS with Quakespasm-Spiked.

Might just be the way it goes because of the quirks of this thing, and perhaps not relevant to most Quake maps, but maybe it's interesting?

By comparison at the start of ad_tears I get 240 FPS with r_softemu 3 and 320 with r_softemu 0.

elementary OS 5.1.7, based on Ubuntu 18.04.6
CPU is a quad-core i7-920 at 2.67 GHz
GPU is a GeForce GTX 560 Ti

Ironwail built from 0.4.0 source, just with "make" from inside the Quake subdir.

[Feature Request] Support for CSQC

Client-side QuakeC is currently supported by QuakeSpasm-Spiked and vkQuake and is necessary for things like custom HUDs in AD and Alkaline, and AD's custom particle system. This is the one major feature stopping me from automatically using this for everything by default.

Mjolnir seam

Not sure if it's an engine issue or the original 3d mesh of Quake is buggy but I noticed a ugly seam in the Mjolnir (demo4 of hipnotic 1st expansion pack):
image

Implement a versioning system that takes into account commit hashes

Perhaps this should belong to sezeros quakespasm tree, but in any case, can we have a versioning system sitting outside "version.h" hardcoded strings? Something that'd update "IRONWAIL_VER_SUFFIX" during compiling time with the result of a git describe --always output?

n.b.: I'm not a computer programmer in any way, but its tiresome to build different quakespasm versions and being unable to tell witch git ccommit I'm testing....

[Bug] Software Emulation Color Inconsistencies

Something else I noticed when comparing Ironwail's software colors versus vanilla is that the colors also seem a bit off. I know it's a bit of a nitpick, but I might as well mention it.

[Bug] Water transparency not working

In latest build (v0.3.0), water transparency (r_wateralpha) does not seem to work when changing the CVAR value, same with other liquids (r_lavaalpha, r_slimealpha, r_telealpha). Apparently, it's the same with r_novis.

[Feature] PK3 support

I am aware this is a QSS feature, but since this build already includes some code from QSS/vkQuake, I am trying my luck:

Any chance of getting PK3 support? Newer releases like AD, Alkaline or DOTM are quite huge and the outdated pak format offers almost no compression at all. However, with PK3, file size can be reduced by 50-70%.

IMO it's one of QSS's most useful features and shouldn't break vanilla compatibility if it was implemented. In Quakespasm and vkQuake, authors don't want to implement it, so this is kind of my last hope of getting the feature in Quakespasm without having to use QSS.

[Feature Request] freelook cvar

Allows for control of mouse looking by cvar in addition to by the "+mlook" command. The implementation simply replaces most instances of "if (in_mlook.state & 1)" with "if ((in_mlook.state & 1) || freelook.value)". The exception would be the check that writes "+mlook" to the config file. The "freelook" cvar would also take over the menu option.

The name was standardised as "freelook" in Quake II onwards, so this standard should be followed for player-expected behaviour. The default value is 1, and it should have CVAR_ARCHIVE.

The primary benefit of this feature is to enable mouse looking to be enabled by default on first run.

[Bug] Wateralpha doesn't work on some maps

udob2 in ironwail
vs Quakespasm:
udob2 in QS

Like I said, not all maps are the same, for some it just works.
udob1_4 in ironwail

Here the pool in the middle is func_illusionary, while the surrounding ones are worldspawn water brushes, so the problem isn't with transparency on liquid textures in general.
d1m7 in ironwail

Shares config with quakespasm

This seems to share a config with quakespasm which causes all sorts of fun Resolution related issues, I ended up having to force close and delete the config settings, I'm guessing they have different names for a couple options in the same config.

r_skyfog is not capped

In Ironwail, if you set r_skyfog over 1, the sky starts to reappear, whereas in other engines it caps at 1.

Example, skyfog at 2 :
image
vs in vkQ (where it looks the same at 1 and anything above that).
image

This is on 0.4.0.

Map Crash in 0.4.0

Playing Leptis Magna in Arcane Dimensions. The map crashed to the console while fighting the big boss with this message:

packet overflow
sz_getspace: overflow

Dual Monitor Focus

To be fair this issue is present in quakespasm but thought id mention it, the focused window is not the game window on initial startup until the game window is clicked on with mouse.

Confirmed that it doesn't happen with only one screen.

[feature request] discord rich presence integration

after starting retrojam7 in my favoritest quake source port ever, i alt-tabbed to discord to reply to a message (in linux, if it matters).

to my horror, discord was cheerfully reporting that i was playing Castle of Starthoo โ€” with nary a mention of quake because the displayed label was truncated! worse yet, after changing maps (and seeing the window title update) discord continued informing everyone that i was playing Castle of Starthoo!

unsure of why i found this so embarrassing (but panicking nonetheless) i scrambled to change ironwail's title in discord to display as just "Quake" โ€” and noticed two other entries in the activity status history for ironwail. i guess discord has thought it's been a new game every time i've started ironwail with a unique window title.

anyway, this got me thinking: it would be incredibly sick to have discord rich presence integration, imo. the quake icon instead of the question mark block, the current map name (and other info) formatted all fancy, etc...

UHD 620: GL_DynamicsBuffersBeginFrame: sync failed ( 0x04911B) after loading a map

I tried to run the gl-test2 binary on a UHD 620 iGPU, bindless_texture is supported, but it will bail out with the above error. Current git version fails with the same error.

win10 Enterprise (20H2)
Driver 27.20.100.8681 I think I'll not be able to upgrade the GFX Driver. This system has some enterprise 'snake oil' programms running, but vanilla quakespasm and vkquake have no issues.

[Bug] Vanishing Geometry

I am not enough of an expert to know if this is an engine-related bug or a map-related bug. But I found some nearby geometry which seems to vanish depending on my distance from it in a custom map: https://youtu.be/CXo08_FyqxA

This is from Brendy's hard driven map...
Download: https://archive.org/details/brendy2
Discussion : https://www.quaddicted.com/forum/viewtopic.php?id=1186

I did have an model replacement pack on top to add some of the Remaster models and a few other things.

[Feature] Model Distortion for Software Emulation

I'm forever greatful that you're adding software rendering emulation to your fork of Quakespasm. It's something I've been wanting for a long time.

Something that is missing though is that distinct model distortion, particularly noticeable on weapons (and probably on other models as well).

Here's the shotgun for example.

What it looks like in Ironwail:
image

What it looks like in the original renderer (1024x768):
image

avoid -Wdeclaration-after-statement in gl_model.c and gl_rmain.c

Fix:

diff --git a/Quake/gl_model.c b/Quake/gl_model.c
index 93e6003..1c1aea6 100644
--- a/Quake/gl_model.c
+++ b/Quake/gl_model.c
@@ -1715,7 +1715,7 @@ Mod_FindUsedTextures
 void Mod_FindUsedTextures (qmodel_t *mod)
 {
 	msurface_t *s;
-	int i, count;
+	int i, count, bit;
 	int ofs[TEXTYPE_COUNT];
 	int mark = Hunk_HighMark ();
 	byte *inuse = (byte *) Hunk_HighAllocName ((mod->numtextures + 7) >> 3, "used textures");
@@ -1727,7 +1727,7 @@ void Mod_FindUsedTextures (qmodel_t *mod)
 		byte *val = &inuse[s->texinfo->texnum >> 3];
 		if (!t)
 			continue;
-		int bit = 1 << (s->texinfo->texnum & 7);
+		bit = 1 << (s->texinfo->texnum & 7);
 		if (!(*val & bit))
 		{
 			*val |= bit;
diff --git a/Quake/gl_rmain.c b/Quake/gl_rmain.c
index cc66bf6..5912051 100644
--- a/Quake/gl_rmain.c
+++ b/Quake/gl_rmain.c
@@ -370,14 +370,15 @@ void R_EntityMatrix (float matrix[16], vec3_t origin, vec3_t angles)
 	}
 	else
 	{
+		float sy, sp, sr, cy, cp, cr;
 		pitch = DEG2RAD(pitch);
 		roll = DEG2RAD(roll);
-		float sy = sin(yaw);
-		float sp = sin(pitch);
-		float sr = sin(roll);
-		float cy = cos(yaw);
-		float cp = cos(pitch);
-		float cr = cos(roll);
+		sy = sin(yaw);
+		sp = sin(pitch);
+		sr = sin(roll);
+		cy = cos(yaw);
+		cp = cos(pitch);
+		cr = cos(roll);
 
 		// https://www.symbolab.com/solver/matrix-multiply-calculator FTW!
 

[Feature Request] 2D Pixel Aspect Ratio Scaling

As you might know, Quake was originally made with 320x200 resolution in mind, and this is reflected in most if not all of Quake's 2D assets (HUD, menu gfx, console/message text). The thing about 320x200 that this is a resolution that utilizes non-square pixels (1.2:1 ratio). A lot of Quake source ports tend to not acknowledge this at all, rendering all 2D assets with square pixels instead.

Here's a comparison done in DOS Quake for the sake of consistency.

320x200 (non-square pixels, how it's meant to look)
528814705_Hud1
528698778_Menu1

320x240 (square pixels, how most source ports do it)
327965424_Hud2
1590411782_Menu2

Perhaps adding a cvar like scr_2dpixelaspect (and a toggle in the settings) would work for this? I do hope you'll take this into consideration, as it's a very overlooked feature that makes an important difference in displaying Quake's artwork.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.