I'm implementing a higher-res dithering matrix (8x8=64 units) for the sky horizon color fading effect. As can be seen in the first image, the higher-res dithering matrix significantly smooths out the color banding. However, this requires a slightly bigger color fading table, so when this improvement is finished, all sky horizon fading maps will have to be recompiled.
Afterwards I'm going to implement this same higher-res matrix in the fog renderer, to smooth out the egregious color band...
2024-08-24 18:58:29 +0000 UTC
View Post
While working on the palette changes, I realized that those changes will have to be very extensive, so I disabled their work-in-progress code to not delay this release any further.
This version has autosaves for when shutting down the game during gameplay, and those autosaves will be loaded automatically when starting up the engine again. This sub-feature is disabled by default, and can be enabled by setting the autosave_onshutdown cvar to 1. For the next version, ...
2024-08-01 23:56:38 +0000 UTC
View Post
Before working on generating intermediary colors as mentioned in the previous post, I'm going to work on implementing texture colorization and palette cycling.
Texture colorization is what vanilla Quake does to the player's skin when customizing the shirt and pants colors, and there are several ways to achieve that. Vanilla Quake's software renderer does that by creating a modified color shading map for players, and GLQuake's hardware renderer does that by creating a copy of the player'...
2024-07-25 15:55:03 +0000 UTC
View Post
TGA palette support was already implemented, now I just need to test it.
The only feature still missing in the TGA palette support is intermediary color generation, for palettes generated from TGAs without enough colors to fill the palette. For example, if a 24-bit color TGA image's pixels has only 16 colors, the other 238 colors in the palette must be generated by the engine. The generated colors must be intermediary colors, to help with smoothing out the color blending effects, but I ...
2024-07-25 12:10:37 +0000 UTC
View Post
I'm going to create optional autosaves for when shutting down the game, and autoloading them when starting the engine. This will be created in a way that won't conflict with engine crash cases.
Also, I've done some changes to the palette system:
• Don't use the monitor gamma value for compiling textures, use a dedicated cvar instead.
• Don't warn about the color gamma used by the texture compiler when loading textures.
2024-07-20 17:56:12 +0000 UTC
View Post
The autosaving system in Retroquad is really good, but now I'm adding a few extra features to make it even more perfect:
First, backtracking. If the player dies a couple seconds after an autosave was created, it's logical to conclude that the conditions that triggered the latest autosave weren't safe enough for the player. In this case, the autosave system should revert the latest autosave to the one previously used, which should be safer for the player since the timing between ...
2024-06-29 16:49:55 +0000 UTC
View Post
I've done a more polished version of this test area for raytraced dynamic lights, with the ceiling and floor textures scaled at 50% to increase the lightmap resolution by 400% (2 x 2 times), and thanks to the pseudo-deviance, the result was very smooth.
The current version of the EricW's BSP and Light compilers already supports generating higher-res lightmaps without scaling the textures, but they're not a good solution for Retroquad.
A good solution is to implement it by selectiv...
2024-06-24 19:30:00 +0000 UTC
View Post
This version includes the fully optimized pseudo-deviance filter in the raytraced sampling of the dynamic lights.
And I figured out a way to significantly improve the performance in complex maps with large open areas. Maps that were running with a low dynamic resolution have a better dynamic resolution now, and many maps are running with smoother framerates. I'll try to record a gameplay video this weekend.
2024-06-20 22:46:58 +0000 UTC
View Post
The raytracing cache for the pseudo-deviance filtering of raytraced dynamic lights has been implemented, which helped to speed up the raytracing a lot.
Since the pseudo-deviance essentially expands the lighting a bit, I also need to implement some padding on the boundaries of the surfaces' raytracing data, to ensure that the pseudo-deviance is properly filtered across the surfaces' edges. The code for this is mostly done, but there's a bug in it somewhere.
I noticed a major drop i...
2024-06-18 21:18:07 +0000 UTC
View Post
People who examined Retroquad's source code may have noticed that I wanted to implement a texturemapping mode called "crossfading." It's a texturemapping mode that should smooth out texture transitions in a manner similar to terrain blending in the Quake 3 Arena engine. However, there's a number of reasons why it's difficult to implement:
Now, let me apologize for the lack of updates lately. I still haven't finished my answer to the allegations against me in my lawsuit, but I found out that the 15-day deadline won't be set until the judge gives me an order to reply, so there's still some time.
There's so much going on... I don't know how to put everything in a concise manner, but the points are:
1) My sister decided to counter-sue me, by saying that I need to pay moral damages to her. To achieve that, she's us...
2024-06-12 23:14:52 +0000 UTC
View Post
A lot of work was done under the hood. The most noticeable changes are that soft-depth and semitransparent objects will receive raytraced dynamic lighting on their backfaces now, because they shouldn't block lighting traces (see the first two screenshots), and that dynamic light sampling on external BSP models (e.g. ammo boxes) was actually giving less light than it should under colored dynamic lighting, which made those models looks darker under colored dynamic faint lights, but this was fix...
2024-06-12 21:35:09 +0000 UTC
View Post
I've fixed a bug where offscreen BSP entities weren't occluding traces.
In this video, you can see the bug. When the button on the wall goes offscreen, it stops blocking the light, and its shadow disappears.
This bug happened because Retroquad was only tracing against entities that passes the R_BmodelCheckBBox check, and this function clips entities against the view frustum. Now I'm using a different check on the traces.
2024-05-15 17:52:52 +0000 UTC
View Post
I've implemented curved dynamic intensity into the pseudo-deviance algorithm of the raytraced dynamic light sampling. It's almost as smooth as full deviance, while preserving isolated single-point shadows. When comparing all algorithms, the curved dynamic deviance is clearly the best one, so there's no need for the others.
Also, I've fixed the issue with the pseudo-deviance at the edges of the surfaces. Together with the above changes, the pseudo-deviance looks visually complete now.
2024-05-06 15:13:58 +0000 UTC
View Post
This is a WIP version, for the reasons explained in the previous post.
Here's a list of the changes, from the top of my head:
• I've tried implementing PNG support again, but the PNG libraries keeps crashing ntdll.dll for some unknown reason.
• Several changes were made to start fixing the per-span Z-fighting in the BSP renderer, but I had to backtrack them due to a texture offset bug in rotated BSP entities while in overdraw mode. I'm still trying to tr...
2024-04-26 23:51:15 +0000 UTC
View Post
Here's a real life update.
There's a lawsuit I've opened over a year ago to be able to sell the house inherited by me and my sister from my mom, and this lawsuit is finally progressing.
The other side on this lawsuit (my sister, who wants to keep the whole house for herself) presented a ton of arguments against me, and in a couple weeks I need to give my counter-arguments. It won't be difficult to defend myself against her accusations, which includes blatant lies and contradictory...
2024-04-26 17:56:51 +0000 UTC
View Post
There were some good improvements on the code, including a few optimizations in the BSP renderer. However, a number of bugs still need to be ironed out:
• Due to the recent changes in the rendering of BSP entities, raytraced lighting is not working in some of them. I'm not sure why.
• The textures in some surfaces of rotated BSP entities are sliding and rotating according to the differences in position and angles between the BSP entity and the camera. This is ...
2024-04-17 21:29:25 +0000 UTC
View Post
Vanilla Quake's software renderer does have a pretty bad case of Z-fighting, which only happens between different BSP entities (be it external BSP entities, such as item boxes, or entities built internally into the map, such as doors and moving platforms).
Vanilla Quake only performs worldspace geometry clipping between individual BSP entities and the world, while worldspace geometry intersections between multiple BSP entities are ignored by the renderer. This makes the screenspace per-...
2024-04-07 15:14:29 +0000 UTC
View Post
I found out that the clipping of BSP entities to the world geometry can crash the engine. While this clipping is responsible for the lack of Z-fighting between BSP entities and the world, it's useless for fixing Z-fighting between different BSP entities.
All things considered, I'm removing this clipping from BSP entities, and adding per-pixel depth tests instead (which alphamasked and alphablended BSP entities already does). This will fix both issues, and may simplify the code a little....
2024-04-05 20:51:53 +0000 UTC
View Post
This version fixes a couple bugs:
The weapon switching animation in first person view still wasn't being properly reset when toggling the third person camera, because the fix introduced in version 0.21.2 was incomplete. Now it's fully fixed and tested.
Entities were being seen thru opaque liquids, because the wrong drawing mode was being used in opaque liquids featuring soft depth. Now the proper opaque drawing mode is being used, which also fixes issues with the ...
2024-03-22 20:20:50 +0000 UTC
View Post
This version fixes a bug with the screen color effects (underwater view, etc.) being not cleared when restarting or changing levels.
I've also tried to fix some other stuff, but I'm completely out of time this month.
2024-03-08 03:05:23 +0000 UTC
View Post
This version features a more robust version of the fix introduced in the last version.
2024-03-03 17:33:25 +0000 UTC
View Post
This version fixes a vanilla Quake bug that corrupted strings in savegames in a way that broke autoloading.
Some savegames created with previous versions of Retroquad will not work with autoloading, but can still be loaded manually. Re-saving them won't fix the issue; their string corruption will only go away when re-saving after changing the level or restarting the level from the beginning.
2024-02-21 14:31:38 +0000 UTC
View Post
This release adds support for autoloading, which automatically reloads the latest savegame that was used in the current level instead of restarting the level from the beginning. This feature completes the purpose of autosaves, which is to automatically preserve player's progress within the map.
When you die and press the button to restart the level, the engine will automatically detect the latest savegame used within the map in the current gameplay session, and reload it instead of rest...
2024-02-11 15:39:26 +0000 UTC
View Post
I'm looking into ways to smooth out the diagonal shadows in the surface lighting caches when they're expanded from the lightmap data.
First, the good news: Since Retroquad splits the colored lighting into two separate 8-bit surface caches (one for brightness, and other for hue & saturation), I can implement the smoothing into the brightness alone, which will be enough to make the lighting look smooth while ensuring that its impact on the performance of the colored lighting will be l...
2024-01-26 12:34:27 +0000 UTC
View Post
The raytracing on concave edges is properly fixed, and I've also implemented an optimization to precompute all surface coordinates in model space during load time. A NAN issue with the centroid generation was also fixed.
Now I can focus more on some gamecode features.
2024-01-10 14:29:18 +0000 UTC
View Post
I've managed to fix this issue with lightmap points in the edges being obscured by neighboring brushes that forms concave edges with the brush of the current surface. The previous attempted solutions made the edges of the lightmaps too hard, but this new solution keeps the edges smooth.
Now that a good solution for this was implemented, I'm going to optimize the raytracing code more by precomputing some coords during load time.
2024-01-09 15:21:27 +0000 UTC
View Post
This version fixes 3 bugs:
- Walls were not receiving raytraced lights when the shooter touched them head on; dynamic lights from muzzleflashes were being spawned beyond the player's collision box, which made them get inside walls and be skipped by the raytracing algorithm.
- Rotating doors were not receiving light properly; while rotating fans could receive light mostly fine, rotating doors changes the direction of the axis of the planes being lit in a way that wasn't being ...
2024-01-07 23:03:31 +0000 UTC
View Post
This version has the improved raytracing that's able to cast shadows from BSP entities to the world.
Moving BSP entities can cast shadows upon one another, but only if they don't rotate.
I've optimized the raytracing code for collision against BSP entities, but there are still numerous calls for AngleVectors that could be optimized in some way.
Despite that, there seems to be no noticeable difference in performance with r_light_tracing enabled or disabled. I...
2024-01-06 23:39:50 +0000 UTC
View Post
This is my current test setup. An entity casting a big dynamic blue light over two rotating fans with a single world brush in between.
The fan above must block the rays onto the world brush in the middle, and both the upper fan and the world brush in the middle must block the rays onto the lower fan. Finally, both fans and the world brush must block the rays onto the floor.
However, as you can see, nothing about the rotating fans is working properly yet.
2023-11-22 14:52:21 +0000 UTC
View Post