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

Client downloads flags and maps from server if they don't have them #147

Open
andy5995 opened this issue Jan 19, 2024 · 6 comments
Open
Labels
enhancement New feature or request

Comments

@andy5995
Copy link
Member

andy5995 commented Jan 19, 2024

Using libcurl, or a new mod system ? We shall see.

This would fix #146

@andy5995 andy5995 added the enhancement New feature or request label Jan 19, 2024
@winrid
Copy link
Member

winrid commented Jan 19, 2024

libcurl would be a nice stop gap solution.

@winrid
Copy link
Member

winrid commented Jan 19, 2024

honestly libcurl (with openssl?) would be the way to download the mods in the future, too.

@andy5995
Copy link
Member Author

andy5995 commented Jan 21, 2024

mod.io seems pretty popular. It has an API. 0ad's in-game mod downloader uses it. Maybe in combination with libcurl, I haven't looked.

Any registered user can add mods, maps, tilesets, etc. They don't show up in the in-game mod center though unless signed by a 0ad project admin. If they're not signed, they still show up on the site and can be downloaded by anyone.

@widelands actually has a way to upload mods from the in-game mod center. They still have to be approved by a project admin before showing up to other users, iirc.

@winrid
Copy link
Member

winrid commented Jan 22, 2024

Interesting. I was just going to have the server owner put the pak files they want on their server, and then client will download them on connect when needed. I thought this was a nice simple approach, but open to understanding the advantages of mod.io. They could always upload user-created mods to moddb.

@andy5995
Copy link
Member Author

Interesting. I was just going to have the server owner put the pak files they want on their server, and then client will download them on connect when needed.

Yes, I agree. That sounds like how @MegaGlest does it. If a player is hosting a game and a client joins, the server will offer the map automatically. The client user gets a y/n prompt to confirm before download.

If the client already has the map, then the server does a CRC check to make sure it matches.

(One thing missing from MG is an offer to "update" the map if the CRC doesn't match)

I thought this was a nice simple approach, but open to understanding the advantages of mod.io. They could always upload user-created mods to moddb.

I accidentally went off-topic. That's a discussion for when NP has more mod capability, correct? Though you might want to register NP on mod.io in case you want to take advantage of it later.

@winrid
Copy link
Member

winrid commented Jan 22, 2024

That sounds like how https://github.com/MegaGlest does it.

I got the idea from Enemy Territory.

If the client already has the map, then the server does a CRC check to make sure it matches.

Yes, we can support signing (I think this is configurable in ET).

I accidentally went off-topic. That's a discussion for when NP has more mod capability, correct? Though you might want to register NP on mod.io in case you want to take advantage of it later.

I suppose, yes, can be discussed later!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants