Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Xonotic 0.8.5/DarkPlaces "Issues"

#1
This will be an ongoing thread related to engine code in Xonotic/DarkPlaces.

(I don't see a issue report ability on the github for Xonotic.  I engine code a lot and will be maintaining a modified DarkPlaces for the foreseabe future.  If there is a number like "1008", I used that as personal tracking # in the code.  I wish to thank the Xonotic team for their years of advancement and hardening of DarkPlaces

x. darkplaces-wgl.vcproj has 2 errors upon compile on 0.8.5 (prior version did not).

vid_shared.c The fix is simply 1.0 ---> 1.0f

Code:
void VID_ApplyGammaToColor(const float *rgb, float *out)
{
int i;
if (cachecolorenable)
{
for (i = 0; i < 3; i++)
out[i] = pow(cachecontrastboost * rgb[i] / ((cachecontrastboost - 1) * rgb[i] + 1), 1.0f / invpow(0.5f, 1 - cachegrey[i])) * cachewhite[i] + cacheblack[i];
}
else
{
for (i = 0; i < 3; i++)
out[i] = pow(cachecontrastboost * rgb[i] / ((cachecontrastboost - 1) * rgb[i] + 1), 1.0f / cachegamma) * cachecontrast + cachebrightness;
}
}

x. Intel Integrated video -- DarkPlaces spams "Fragment shader compile log: No errors."  Now perhaps the video driver is at fault for returning "No errors." as the result of a shader compile, but this is Intel Integrated video and there are probably 200,000,000 computers with them.  Anyway, the fix ...

gl_backend.c

Code:
if (compilelog[0]) { // Baker 1008 - fix when it reports "no error" and the next line only sees that it contains "error" and prints a false warning.
if (developer_extra.integer || (developer.integer && strcasecmp(compilelog,"No errors.") !=0 )) {
if (strstr(compilelog, "error") || strstr(compilelog, "ERROR") || strstr(compilelog, "Error") || strstr(compilelog, "WARNING") || strstr(compilelog, "warning") || strstr(compilelog, "Warning"))
{
int i, j, pretextlines = 0;
for (i = 0;i < numstrings - 1;i++)
for (j = 0;strings[i][j];j++)
if (strings[i][j] == '\n')
pretextlines++;
Con_Printf("%s shader compile log:\n%s\n(line offset for any above warnings/errors: %i)\n", shadertype, compilelog, pretextlines);
}
}
}

x. darkplaces-wgl.vcproj  should have /LARGEADDRESSAWARE in linker options.  When compiled without this, memory allocations can fail when crossing the 2 GB mark.

x. I have never seen this in occur in Xonotic because uses the viewzoom field, but DarkPlaces has a very odd zoom effect starting a map in Quake.

The fix is initializing the viewzoom field.

cl_main.c - CL_ClearState

Code:
// set up the float version of the stats array for easier access to float stats
cl.statsf = (float *)cl.stats;
cl.num_entities = 0;
cl.num_static_entities = 0;
cl.num_brushmodel_entities = 0;
cl.stats[STAT_VIEWZOOM] = 255; // Baker 1006

x. On a Windows 10 computer, I have experienced a situation where video restart from windowed mode to fullscreen while the engine has the mouse captured causes the mouse to forever more move the player and never mouselook. This does not occur if the mouse is not captured.  This applies to 0.8.3 for sure, I have not tested 0.8.5.  If I think of what I want to look for, I'll find out the issue, solve it and post the solution here.

x.The official DarkPlaces engine download does not have a "DarkPlaces"  icon in the top left corner of the engine window and instead has the "missing icon" icon.  Xonotic does have a window icon in the top left corner.

x. DarkPlaces: The Mac version download does not have a valid digital signature. If you set the Mac to allow it anyway,, where is DarkPlaces looking for the data? I have not actually been able to get DarkPlaces to work on a Mac. This is compounded by Mac not really allowing command line parameters for a gui application, so I can't -nohome it or do -basedir <something>.

x. In both Xonotic and DarkPlaces, if you are holding down +attack (like mouse 1) and ALT TAB out of the window in Windows, you will be firing forever until you quit the engine and restart it.

Solve:  vid_wgl.c

Code:
// Baker 1002.2
void Key_Release_Keys (void)
{
int      keynum;

    for (keynum = 0 ; keynum < MAX_KEYS /*1024 in dp*/; keynum++) {
if (keydown[keynum])
Key_Event (keynum, /*ascii*/ 0, /*down*/ false);
}
}


Code:
if (!fActive)
{
VID_SetMouse(false, false, false);
Key_Release_Keys (); // Baker 1002
if (vid_isfullscreen)
{
if (gldll)
ChangeDisplaySettings (NULL, CDS_FULLSCREEN);
vid_wassuspended = true;
}
VID_RestoreSystemGamma();
}
Reply

#2
(02-24-2023, 02:55 AM)Baker Wrote: (I don't see a issue report ability on the github for Xonotic.  I engine code a lot and will be maintaining a modified DarkPlaces for the foreseabe future.  If there is a number like "1008", I used that as personal tracking # in the code.  I wish to thank the Xonotic team for their years of advancement and hardening of DarkPlaces

The Xonotic repos on GitHub are just a mirror. Development happens on GitLab: https://gitlab.com/xonotic/xonotic

While you can report DarkPlaces issues there, you can also report issues (and create merge requests) at the upstream DarkPlaces GitHub: https://github.com/DarkPlacesEngine/darkplaces/
Reply

#3
Thank you.
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Trying to understand darkplaces source code wiefie 23 17,619 06-08-2024, 11:40 AM
Last Post: dagelf
  [META] DarkPlaces fork Lyberta 24 17,120 02-21-2023, 07:12 PM
Last Post: ballerburg9005
  [TUTORIAL] How to create a command - DarkPlaces engine C programming LegendGuard 1 2,611 03-31-2021, 03:43 PM
Last Post: LegendGuard
  What was easy for you in development? (Darkplaces and QuakeC programming) LegendGuard 2 3,059 08-08-2020, 05:25 PM
Last Post: LegendGuard
Brick Security issues in rcon protocol Sl@va 1 5,935 03-10-2019, 05:30 AM
Last Post: Spaceman
  Module (music) support for Darkplaces (again) [test it] nilyt 8 9,091 04-21-2015, 08:24 PM
Last Post: BuddyFriendGuy
  NetRadiant issues Garux 7 9,437 02-18-2015, 04:48 AM
Last Post: Garux
  q3map2 issues/development vulture 18 28,568 03-04-2014, 11:31 AM
Last Post: Garux
  darkplaces wiki down .... hutty 4 7,971 10-13-2012, 09:47 PM
Last Post: hutty
  Linux performance issues in Xonotic 0.6? Sarge999 3 5,642 04-04-2012, 09:43 PM
Last Post: edh

Forum Jump:


Users browsing this thread:
2 Guest(s)

Forum software by © MyBB original theme © iAndrew 2016, remixed by -z-