Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] GoldSrc protocol support #1418

Closed
wants to merge 23 commits into from
Closed

[WIP] GoldSrc protocol support #1418

wants to merge 23 commits into from

Conversation

a1batross
Copy link
Member

Because Xash can't connect to Steam to get certificate cookie, it requires sv_lan 1 on HLDS side.

Almost nothing does work except joining to the server. Use connect IP:Port goldsrc to connect to GoldSrc server.

@a1batross a1batross changed the title GoldSrc protocol support [WIP] GoldSrc protocol support Aug 31, 2023
@a1batross
Copy link
Member Author

Had a good online match using Xash3D FWGS on ReHLDS-based server with GoldSrc clients. Friendship! And not a single crash!

Also recorded two demos to test protocol support on.

@nekonomicon
Copy link
Member

May be use fresh libbzip2 versions from gitlab?
https://gitlab.com/bzip2/bzip2/-/tags

@mittorn
Copy link
Member

mittorn commented Oct 28, 2023 via email

@a1batross
Copy link
Member Author

May be use fresh libbzip2 versions from gitlab? https://gitlab.com/bzip2/bzip2/-/tags

Not a big issue, since the protocol impl is almost ready now.

At start, I just threw whatever was in ReHLDS to be sure it's exactly the same bz2 that they are using.

@a1batross
Copy link
Member Author

We can as well just link with system provided libbz2. :)

@nekonomicon
Copy link
Member

Yep, you're right.
And I didn't see any critical fixes or additions in new releases.
One small thing which annoying me - there yet another crc32 table.

@a1batross
Copy link
Member Author

Yep, you're right. And I didn't see any critical fixes or additions in new releases. One small thing which annoying me - there yet another crc32 table.

I don't think we can do anything if the dependency carries its own CRC32 implementation.

a1batross and others added 22 commits November 1, 2023 00:42
* ReHLDS version, modified to minimize copypasted code
* Simple unit tests are added
* Share delta field encoding with Xash protocol as much as possible
* Make delta struct types public so engine code could reference them directly
  (very useful for GoldSrc tables, as they are pretty generic)
* Implement GoldSrc's svc_deltadescription parser
…ffer ops

* Try to disable it in normal Long, Short, Char functions, so it doesn't affect byte ops, like GoldSrc
…ss packets, it should be able to start connecting now
…a, clientdata, baselines, userinfo and resources
@SNMetamorph
Copy link
Member

What is planned for PR completion? Maybe we can rebase and merge all this already? So people can easily test it

@a1batross
Copy link
Member Author

a1batross commented Jun 15, 2024

Let's rebase/merge this with current master at first... and then decide what to do.

When I last tried this branch, I disliked these things about it:

  1. We had to connect to ReHLDS servers. Can't connect to Steam servers. I thought of an implementing some kind of broker that would help connect to Steam servers without explicitly linking Xash3D to Steam API DLLs. (which is absolute no go by itself)
    Don't want to implement connection to pirated servers. This part of HL multiplayer history better be forgotten, IMHO.
  2. I don't like how GoldSrc messaging quirks get into the common code. We only implement client connection here, so this better not touch common code if possible.

@a1batross
Copy link
Member Author

a1batross commented Jun 15, 2024

Some thoughs about 1.

  • Broker can be a simple program that Xash starts on its own, which then will tell Steam that we run Half-Life and need a certificate blob, and communicate with it through some kind of IPC. But this also limits connection to x86 Windows/Linux-only ports, since Steam doesn't exist on other platforms.
  • Despite what I said about pirated servers, one could implement a broker that does exactly that but for them.
  • The VAC. Steam doesn't send VAC blobs to GoldSrc clients anymore as far as I know. But technically speaking, VAC still exists.

@SNMetamorph
Copy link
Member

  1. We had to connect to ReHLDS servers. Can't connect to Steam servers.

This is the thing that better to be reworked in future, but I think for now it's ok. It's more important to have ability to connect to GoldSrc servers from master branch, so it will could be done without playing with different branches and keeping it up-to-date.

@mittorn
Copy link
Member

mittorn commented Jul 4, 2024 via email

@a1batross
Copy link
Member Author

Well, broker is something that only exists in my mind. I haven't implemented it yet.

At first stage, we better merge this branch. @SNMetamorph is right in that regard, as it's actually a working thing, and it wouldn't be fair to hide it here forever.

@a1batross
Copy link
Member Author

Reworked and merged.

@a1batross a1batross closed this Oct 8, 2024
@a1batross a1batross deleted the goldsrc-proto branch October 8, 2024 01:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants