DarkPlacesEngine / DarkPlaces

The DarkPlaces Quake engine, created by LadyHavoc. Official Git repository (replaces SVN).
https://icculus.org/twilight/darkplaces/
GNU General Public License v2.0
289 stars 41 forks source link

Zirconization #104

Open Baker7 opened 1 year ago

Baker7 commented 1 year ago

This is a 20% Zirconized DarkPlaces Beta. Much more to go ...

dpbeta_qualker2401

https://www.moddb.com/mods/zircon-engine/downloads/zircon-darkplaces-beta-version-1 (source) https://www.moddb.com/mods/zircon-engine/downloads/zircon-darkplaces-beta-version-1-windows-binary (binary)

Kleskby has been working with me on this ...

New bug fixes: 1) .obj maps (Kleskby's QUALKER uses them), the Mod_OBJ_Load added: // Baker: This isn't where but whatever ... loadmodel->lit = true; 2) Kleskby has a non-English keyboard and ALT-TAB didn't work (it worked on my English keyboard) ... fix ... End of CL_UpdateScreen:

ifdef WIN32

if (vid_fullscreen.integer && GetAsyncKeyState(VK_MENU) && GetAsyncKeyState(VK_TAB)) //KleskBY Alt-Tab Fix
{
    ShowWindow(FindWindowA("SDL_app", NULL), SW_MINIMIZE);
}

endif

3) ALT-TAB for Windows is not releasing keys, so if you press forward and ALT-TAB without releasing forward, you are walking forward forever ... fix .. vid_sdl.c for window hide events/minimize/lost focus/gain focus add: Key_ReleaseAll(); // Baker r9004: Release keys on loss of focus/hidden or major sizing change

Detail:

  1. ALT-ENTER support to switch from fullscreen to windowed mode.
  2. Key setup streamlined order, elimination of "???" for unbound keys.
  3. Thin console cursor, no cursor overwrite mode.
  4. Ctrl + Up, Ctrl + Down adjust size the console like JoeQuake.
  5. Crisp 2D autoscale based on 360 pixels of height (720 height is 2x magnification) with user customization possible.
  6. LodePNG used for PNG loading.

// Single player compatibility with Quake

  1. Standard Quake file paths for loading/saving on Windows and Mac (-nohome, Linux we will do DarkPlaces way).
  2. Standard Quake behavior for Q1BSP maps with no light data -- all entities in map render fullbright. DarkPlaces beta differs from Quake and old DarkPlaces (div0-stable)
  3. Standard Quake behavior for "map", "kill", etc. which close the console in Quake. Full list: map, load , restart, changelevel, connect, reconnect, kill.
  4. Standard Quake appearance of bronzed characters (not yellow).

// Single player compatibility with Quakespasm (FitzQuake 0.85) norms

  1. "r_skyfog" fog that looks like FitzQuake/Quakespasm which is defaulting fog alpha to 0.5 (r_skyfog value) if fog is not specified in map fogkey

  2. "map" command with no params says map name. This is a behavior in Quakespasm and most modern Quake engines have this feature.

  3. "game" console command, same behavior as gamedir.

  4. Disconnect automatically when "game" / "gamedir" used if not disconnected.

// Single player convenience

  1. sv_cheats defaults 1.
  2. Reset menu cursors on gamedir change
  3. log_file_stripcolors defaults 1 for more readable console .log file.

// New commands

  1. "copy" copies console to clipboard, "copy ents" copies map entities to clipboard.
  2. "folder" command -- opens gamedir folder in file explorer (works on Ubuntu Linux, Mac too)
  3. "pwd" command - says current directory

// Performance

  1. Laptop friendly default cl_maxfps 144 (not 0 unlimited). Laptops have 90% of personal computer marketshare. Laptops have a battery and laptops have small cooling fans. Rendering at 800 fps for no particular reason is is not nice to a laptop battery and it is not nice to a laptop cooling fan.

  2. cl_prydoncursor_notrace defaults 1 (off). This does not need to run every frame. I know of no mod aside from Prydon Gate that uses it.

// Developer

  1. freetype.dll that is friendly with Visual Studio 2022 and does not cause exception with ntdll.dll
  2. Baker.h - tons of functions (file system, string, matrix, etc.)
  3. csqc_full_width_height 1 will set vid_conwidth/vid_conheight to entire client area (like vid.width/vid.height) during csqc phase and then change it back
  4. cvar if (cvar(csqc_full_width_height_available)) is a way for csqc to check for this. Todo: check extension instead?

// Zircon

  1. "zircon_command_line.txt" support. If file exists in .exe folder it contains command line params like "-game travail +map start -condebug" and if engine is started with no command line parameters, these are used
  2. Zircon console name - including build name

// DarkPlaces Bug Fixes

  1. viewzoom CL default fix. Avoids zoom effect on the start of every Quake map by reseting cl viewzoom field.
  2. DarkPlaces Beta gamedir switch crash bug-fix
  3. Clear models/sounds as stale on gamedir change, they aren't valid any more -- avoid errors/issues with wrong content and stale data
  4. Fire Key release on ALT-TAB or minimize (if holding +forward and then ALT-TAB at same time, you will walk forward forever in current dpbeta on Windows)
  5. Quakespasm's Windows DPI awareness trick, fixes menu placement and other 2D elements when Windows scaling is not set to 100% but a higher value like 125% or 150%

// Other

  1. vid_ignore_taskbar defaults to 1. The centering that occurs with taking taskbar into consideration is not center of screen. The off-center "center of the screen" window felt weird.
legluondunet commented 9 months ago

Hello @Baker7, this is a screenshot of quake with Quake Epsilon mod v2.56 https://www.moddb.com/mods/quake-epsilon-build/downloads/quake-epsilon-build-v256:

image

This mod uses DarkPlaces-Quake build 06:02:03 Aug 20 2011 - release (progs 39104 crc) As you can see on this screenshot , there is a lot of valve. The problem is that I have a lot if error messages with this release:

vertex shader compile log: 0:111(1): error: #extension directive is not allowed in the middle of a shader

(line offset for any above warnings/errors: 42) GLSL shader glsl/default.glsl lightsource diffuse cubefilter specular shadowmap2d shadowmappcf shadowmapvsdct failed! some features may not work properly. vertex shader compile log: 0:111(1): error: #extension directive is not allowed in the middle of a shader

(line offset for any above warnings/errors: 42) GLSL shader glsl/default.glsl lightsource diffuse cubefilter shadowmap2d shadowmappcf shadowmapvsdct failed! some features may not work properly.

These messages appear on the screen while I'm playing, it's very annoying. So I gave a test to Zyrcon, I downloaded from this page: https://www.moddb.com/mods/zircon-engine

As you can see on this screenshot, there is very very few valve, we can not see the Quake logo on the floor:

image

How do you explain that?

legluondunet commented 9 months ago

others screenshots:

legluondunet commented 9 months ago

image

legluondunet commented 9 months ago

apart from that Zyrcon new version has very interesting options, such as switching to windowed mode with alt+enter and better alt tab support (the sound no longer bugs when the window loses focus), thank you!

Baker7 commented 9 months ago

@ legluondunet

Epsilon is based in a DarkPlaces from 2011 and there were major changes to the particle system in DarkPlaces 2012.

I examined the changes from 2011 to 2012, they are pretty substantial and pretty incompatible with DarkPlaces from 2012 to present.

So at this time, I don't have any good ideas yet on how to support Quake Epsilon.

There is this which is similar: https://www.moddb.com/mods/quake-rivarez-edition

rivar4

apart from that Zyrcon new version has very interesting options, such as switching to windowed mode with alt+enter and > better alt tab support (the sound no longer bugs when the window loses focus), thank you

Much work was put into reworking sound initialization (there were 3 to 4 bug reports, took a few times to hit everything correctly).

I am glad you are enjoying the engine!

hemebond commented 9 months ago

Quake Epsilon maintains its own engine builds https://www.moddb.com/mods/quake-epsilon-build/downloads/quake-epsilon-build-v256

legluondunet commented 9 months ago

There is this which is similar: https://www.moddb.com/mods/quake-rivarez-edition

I had too many problems with Epsilon because it has aged badly, it needs an update. For me it was the best mod to play original Quake game, until...I follow your advice and test Quake Rivarez Edition. It is now my favorite mod to play Quake. Thank you very much @Baker7, you found the solution I needed.

hemebond commented 6 months ago
6. LodePNG used for PNG loading.

@Baker7 Does including this mean libpng headers (libpng-dev) are no longer required when compiling?

Baker7 commented 6 months ago

Correct.