Release Xash3D - Half Life

ptitSeb

Serial Porter
Joined
Aug 15, 2012
Messages
8,426
Age
46
Location
France, near Lyon
New build on the repo.
This one feature the latest version of gl4es, and with the new BATCH mode (LIBGL_BATCH has been completly redone lately), there is bit more fps in game.
But the major news for this build is that the texture artifacts, that strange texture shimering, that makes many object in game ugly, is finally fixed. Well, it's a workaround that I applied in xash3d itself (so no universal cure in gl4es). I'll describe the fix later if some of you are interested.

Build 16
-----------

  • Found a workaround to fix the visual artifact on textures
  • Latest gl4es, with new BATCH mode for a bit more fps

Enjoy Half-Life in the best way!
 

FamilyGuy

Member
Joined
Feb 13, 2010
Messages
48
I'll describe the fix later if some of you are interested.
I'm interested! Thanks for that fix!

Also, I would have a few questions (GHz Pandora clocked at 1250 MHz):
  • I'm getting FPS in the 20s most of the time, is that normal? I remembered it being around 30 before, but maybe it was simply the low complexity of the game beginning.
  • What should be the preferred SGX driver for HL? I tried 4.03 and 4.10 with no real difference.
  • Counter-Strike 1.6 doesn't seem to work if I start a local game alone. I'm stuck in static camera angles. Maybe I can't play alone? Are there compatible bots?
Merci beaucoup!
 

ptitSeb

Serial Porter
Joined
Aug 15, 2012
Messages
8,426
Age
46
Location
France, near Lyon
So the visual issue. This is due to the SGX (driver? hardware?) having trouble when texture coordinates are large.
Texture coordinates are within 0.0 - 1.0 range, to cover the whole texture. But you go with bigger or lower value. Depending on the mode use, the effect is different, but usually, you are using GL_REPEAT, meaning that everything outside [0,1] is put back on this interval. So using a texcoord of 10.5 is the same as using 0.5
You use that kind of thing when you want to textured a large area, composed of many triangles (think, a large mountain or wall of a building). The texture on the wall, or mountain, or whatever, is a relatively small texture (compare to the object) that is repeated on the object. Meaning that if the first triangle may have TexCoord in [0,1] interval, farther triangles will have much bigger (or lower) value, to keep continuity in the texture applied...
The fix in Xash3D is that, durring the computation of those texture coordinates, I force the use of the lowest value possible (as no special care is taken on that side) for the TexCoord per surface (calculating the min value, and then subtracting that value to each texcoord). That fixes the visual artifact (and hopefully don't introduce any side effect).

About the FPS, I'm not sure. I have "benched" only the introduction scene, with the train, and have not benched elsewhere. So I cannot say if there was a slow down (I haven't noticed slow down, only slight speed up). But you can use the Archive function on the repo to download older version and try you savegame to see if there is a significant change in FPS (I'm interested in your feedback).

CounterStrike, I must say I haven't tested that in a long time (I'm not into multiplayer FPS, only Single Player ones). I'll have to check and see how to fix that.
 

___

Advanced Member
Joined
Jan 31, 2006
Messages
3,373
*snip*
  • Counter-Strike 1.6 doesn't seem to work if I start a local game alone. I'm stuck in static camera angles. Maybe I can't play alone? Are there compatible bots?
Merci beaucoup!
If I recall correctly, you cannot play a game alone. You would need to install bots (and some solutions require waypoint files for the bots to be able to navigate the levels). It's been a long time since I have played any version of CS and I really can't recommend any bots because of that but people seem to like "Z-bot".

A problem might be, that most of these mods are using dll files that would need to be recompiled to be used on our ARM cpus. Don't know if there are any bots that could possibly work on the pandora :(
 

FamilyGuy

Member
Joined
Feb 13, 2010
Messages
48
So the visual issue. This is due to the SGX (driver? hardware?) having trouble when texture coordinates are large.
Texture coordinates are within 0.0 - 1.0 range, to cover the whole texture. But you go with bigger or lower value. Depending on the mode use, the effect is different, but usually, you are using GL_REPEAT, meaning that everything outside [0,1] is put back on this interval. So using a texcoord of 10.5 is the same as using 0.5
You use that kind of thing when you want to textured a large area, composed of many triangles (think, a large mountain or wall of a building). The texture on the wall, or mountain, or whatever, is a relatively small texture (compare to the object) that is repeated on the object. Meaning that if the first triangle may have TexCoord in [0,1] interval, farther triangles will have much bigger (or lower) value, to keep continuity in the texture applied...
The fix in Xash3D is that, durring the computation of those texture coordinates, I force the use of the lowest value possible (as no special care is taken on that side) for the TexCoord per surface (calculating the min value, and then subtracting that value to each texcoord). That fixes the visual artifact (and hopefully don't introduce any side effect).

About the FPS, I'm not sure. I have "benched" only the introduction scene, with the train, and have not benched elsewhere. So I cannot say if there was a slow down (I haven't noticed slow down, only slight speed up). But you can use the Archive function on the repo to download older version and try you savegame to see if there is a significant change in FPS (I'm interested in your feedback).

CounterStrike, I must say I haven't tested that in a long time (I'm not into multiplayer FPS, only Single Player ones). I'll have to check and see how to fix that.
So IIUC you're basically applying a modulo to the coordinates for triangles that are passed the [0,1] range? Seems like a clean fix. Could it impact performance?
I'll try to optimise my overclocking and sysspeed settings to make sure everything is stable and then benchmark different builds of HL over the weekend or the next week.

If I recall correctly, you cannot play a game alone. You would need to install bots (and some solutions require waypoint files for the bots to be able to navigate the levels). It's been a long time since I have played any version of CS and I really can't recommend any bots because of that but people seem to like "Z-bot".

A problem might be, that most of these mods are using dll files that would need to be recompiled to be used on our ARM cpus. Don't know if there are any bots that could possibly work on the pandora :(
Thanks for the clarification. Yeah I figured bots wouldn't work because they're x86 dlls, and I don't think a static recompilation of those would be an endeavour worth the time... Unless there are Xash3D bots implemented somehow.
 
Last edited:

ptitSeb

Serial Porter
Joined
Aug 15, 2012
Messages
8,426
Age
46
Location
France, near Lyon
So IIUC you're basically applying a modulo to the coordinates for triangles that are passed the [0,1] range? Seems like a clean fix. Could it impact performance?
No, I cannot do that. For example, imagine a triangle that need to have 3 time the texture... You start at 0 and you finish at 3. If you use force 0 .. 1, you'll have the texture anly 1 time.
What happens is that the textcoord, during the computation, doesn't always start at 0, but maybe start at 12503 .. 12506. So in that case, I'll substract 12503 to all coordtex, so it's in 0..3 range. No change graphically, but number are lower and the SGX Driver is happy.
About perf, no speed change expect a tiny tiny slow down at the load of the level. When load is done, it's exactly the same as before...

I'll try to optimise my overclocking and sysspeed settings to make sure everything is stable and then benchmark different builds of HL over the weekend or the next week.
Sounds good :)
 

FamilyGuy

Member
Joined
Feb 13, 2010
Messages
48
What happens is that the textcoord, during the computation, doesn't always start at 0, but maybe start at 12503 .. 12506. So in that case, I'll substract 12503 to all coordtex, so it's in 0..3 range. No change graphically, but number are lower and the SGX Driver is happy.
Thanks for the clarification! So it's basically the whole range that's shifted down but its size remains, which wouldn't happen with modulo. I remember aligning textures in worldcraft a long time ago... it wasn't always that fun...
About perf, no speed change expect a tiny tiny slow down at the load of the level. When load is done, it's exactly the same as before...
A one-time cost is a very fair trade-off!


I've found this: https://www.moddb.com/games/xash3d-android/downloads/xash3d-cs-16-extended-bot-menu

Could those bot work on Pandora since they work on Android are they included in the Pandora build? (they are in the FWGS cs16-client android APK)
 
Last edited:

Magic Sam

Forever Homebrew
Joined
Aug 10, 2007
Messages
2,221
Age
37
Location
Innsmouth, MA
Hi all !

Half Life turned 20 yesterday, on November 19th 2018 :)

If only Valve could re-release the game as freeware, to celebrate the occasion...

@ptitSeb : the github account you are pointing to on the repo is down:

https://github.com/SDLash3D/xash3d

I guess you are using the one from FWGS, but there are so many different Xash3d versions online... I find the situation rather confusing, and I don't like how Moddb presents the information (where's the source code ?) :p

Cheers, Magic Sam
 

rError

Member
Joined
Dec 30, 2012
Messages
78
Location
Canada
Been a long while since my last look here, awesome that Blue Shift is now fully supported! Last I messed around with this, BS was still giving issues. Thanks for the effort ptitSeb!

On a sidenote, is there a way to re-enable the menu music? I have an older PND that will play the gamestartup.mp3 for Half-Life (/valve/media/gamestartup.mp3) and any mod installed, but the latest build stays silent. I know Xash3D is looking in the /media/ folder as some of the mods I have installed have custom button sound effects and they work, just the BGM is missing.

Thanks!
 

rError

Member
Joined
Dec 30, 2012
Messages
78
Location
Canada
Looks like the newest updates don't play ANY of the in-game music. For example; when you first acquire the hazard suite, /vale/media/Half-Life12.mp3 is suppose to play. It works on build 14, not on build 15 or 16 (latest).

The problem started on Build 15 - Nov 29, 2016 - 0.97.3224.15

Menu music & in-game music works on Build 14 - Jun 4, 2016 - 0.97.3224.14

Attached is a save file. Gordon is standing in front of the hazard suite, walk forward to acquire it and trigger music.

List of in-game music and when it plays.
 

Attachments

ptitSeb

Serial Porter
Joined
Aug 15, 2012
Messages
8,426
Age
46
Location
France, near Lyon
Thanks for the debug. I'll look at fixing that (strange because I first thought of a missing lib, but mp3 is supposed to be decoded internally IIRC, so I really need to check that).
 

ptitSeb

Serial Porter
Joined
Aug 15, 2012
Messages
8,426
Age
46
Location
France, near Lyon
Absolutly not, as I'm focussing on other stuff.

I'll try to have a look this weekend (maybe if I just rebuild everything and refresh the pnd, that will fix itself?).
 
Top