Descent3 icon indicating copy to clipboard operation
Descent3 copied to clipboard

Collab with the enhanced macOS/Linux port?

Open jcotton42 opened this issue 1 year ago • 26 comments

A few years back Ryan Gordon made some updates to the Linux and macOS versions of D3, but never brought those changes to the Windows version https://www.patreon.com/posts/project-descent-33611585.

It might be worth reaching out and seeing about integrating those changes. I don't know of a way to contact them outside of Patreon though.

jcotton42 avatar Apr 16 '24 15:04 jcotton42

Good catch. I'm pretty sure we have some conflicting changes and fixes in there. We had some interaction with Ryan back when Jeff and I worked on the 1.5 fixes, but I'd love to work with him to resolve everything and integrate it into the open source code.

kevinbentley avatar Apr 16 '24 16:04 kevinbentley

I need Interplay's permission to release my changes, as they own them; signing papers about this point was a condition of publishing the Mac/Linux builds on Steam. But I would definitely like to collaborate, as I have a bunch of stuff already solved, like 64-bit support, updated Linux and Mac stuff, Ogg Theora movies, etc.

Does Hervé Caen know about this repository? And is he going to be extremely upset if I bring it to his attention by asking him if I can publish my work too?

icculus avatar Apr 16 '24 16:04 icculus

Parallax owns the copyright for Descent 3 and Matt Toschlog authorized the release of this code. I'm not sure what the legal situation with Interplay is, I know they only had the rights to publish and sell Descent 3, not ownership of the code. I don't know if that changed somewhere along the lines, but the last thing I've seen published on the matter is here: https://www.gog.com/forum/general/descent_12_descent_3_removed_from_sale/post1420, which states that Interplay has never owned the copyright, only the trademark. Then there's the whole dispute over their payment of royalties.

kevinbentley avatar Apr 16 '24 16:04 kevinbentley

What a mess. :/

Okay, I'll email Hervé later today and see if he'll let me release my changes. It couldn't hurt to ask, right?

icculus avatar Apr 16 '24 16:04 icculus

Also, bear in mind that this source does not include any of the game files, so a person would still need to purchase the game to play anything built with this code.

kevinbentley avatar Apr 16 '24 16:04 kevinbentley

Since some of the original copyrighted mission files provided their own custom compiled library, will the source behind those DLLs become open sourced? If not, how will this project handle being backwards compatibility?

bryanperris avatar Apr 16 '24 18:04 bryanperris

That's a good question. I'll have to find the source for those files. They are just c++ code that was compiled into the mission file from what I remember. I should have it somewhere.

kevinbentley avatar Apr 16 '24 18:04 kevinbentley

Does the code behind those mission files just count as D3 source code? Once that C++ code has been ported into the future scripting solution, I would imagine D3 just needs compute a hash of the DLL after loading a mission and detecting embedded DLLs, then load in the matching scripted counterpart based on the matching hash.

bryanperris avatar Apr 16 '24 18:04 bryanperris

I think so. I'm going to talk with Jeff about this later tonight. He has a better memory than I do. Part of the reason I like the wasm route is that we could compile level scripts into a wasm dll that would be platform agnostic.

kevinbentley avatar Apr 16 '24 19:04 kevinbentley

I'll have to find the source for those files.

I have them, if nothing else pops up.

(EDIT: And about 20,000 lines of diffs to get them to compile on modern compilers, lol. sob)

icculus avatar Apr 16 '24 19:04 icculus

When you compile source targeting wasm, it generates just .wasm files, which you host from a web server, as for turning those into shared libraries, that might be more complicated. I can see one way of doing it just by embedding .wasm file into the library, but doesn't seem practical. You still need the wasm runtime in the D3 core, and it would have to extract out the .wasm file out of the library and into memory in order to start executing it.

bryanperris avatar Apr 16 '24 19:04 bryanperris

@bryanperris Yes, but instead of creating bindings to something like AngelScript, you create the bindings to the wasm runtime. Then you can let people bundle their mission code as a binary, but since the wasm runtime in in a sandbox, you don't have to worry about malicious code. Sort of how https://wasm4.org/ works.

I recognize that my idea may be ambitious. I'm not saying it has to be done that way. I just like the concept.

kevinbentley avatar Apr 16 '24 19:04 kevinbentley

I completely understand what you envision here, and support it, I meant more why not embed the .wasm file directly into the mission file rather as some DLL file containing a .wasm module. For java, its compiled immediate code just live in .jar files. For C#/.NET, the compiler does generate a DLL or EXE (ignoring dotnet here), but inside of these assemblies, it is just metadata an CIL. The only reason they are DLLs or Exe's is just because of Microsoft's decision, technically that is not needed.

bryanperris avatar Apr 16 '24 20:04 bryanperris

Now that the game is GPLv3 licensed i wonder if icculus feels safer in sharing some if not all of his D3 port code

3doplayer67484 avatar Apr 21 '24 00:04 3doplayer67484

I'd love to move libmve to theoradec to maintain compatibility with his port. However since his port is 64bit, the library might be incompatible with the current source.

JeodC avatar Apr 21 '24 00:04 JeodC

GPLv3 licensed

Would have loved this to stay as MIT, fwiw.

As an update from me: I finally got in touch with Interplay, they're thinking about things.

If they let me release my work, the theora stuff is in there, so I'd hold off a little before starting on something like that.

If they don't make progress in the next few days, I'll let you know, though.

icculus avatar Apr 21 '24 01:04 icculus

GPLv3 licensed

Would have loved this to stay as MIT, fwiw.

As an update from me: I finally got in touch with Interplay, they're thinking about things.

If they let me release my work, the theora stuff is in there, so I'd hold off a little before starting on something like that.

If they don't make progress in the next few days, I'll let you know, though.

Thanks much!

JeodC avatar Apr 21 '24 01:04 JeodC

Just got the go-ahead from Interplay! I'm going to move my repo public tonight after I sort through the commit history.

Note that the GPL3 makes this a little dicey, so I will likely maintain my fork under the original MIT license, with the explicit goal of that fork being the one that goes on Steam. I cannot link against Steamworks and not violate the GPL, which I might at some point, so they'll have to remain separate, and for fixes worth applying there, I'll have to get individuals' permission to relicense individual patches.

There is nothing that stops this repo from pulling in any changes from me, though, and I'll work out a reasonable set of pull requests to get my updates into here. And one can always use the Steam data files with the GPL codebase...so I think this will largely be small inconveniences for me that won't affect everyone else.

icculus avatar Apr 25 '24 22:04 icculus

so I think this will largely be small inconveniences for me that won't affect everyone else.

(But I would definitely not complain if this moved back to MIT or was dual-licensed, to avoid those inconveniences, fwiw.)

icculus avatar Apr 25 '24 22:04 icculus

Just got the go-ahead from Interplay! I'm going to move my repo public tonight after I sort through the commit history.

Note that the GPL3 makes this a little dicey, so I will likely maintain my fork under the original MIT license, with the explicit goal of that fork being the one that goes on Steam. I cannot link against Steamworks and not violate the GPL, which I might at some point, so they'll have to remain separate, and for fixes worth applying there, I'll have to get individuals' permission to relicense individual patches.

There is nothing that stops this repo from pulling in any changes from me, though, and I'll work out a reasonable set of pull requests to get my updates into here. And one can always use the Steam data files with the GPL codebase...so I think this will largely be small inconveniences for me that won't affect everyone else.

This is fantastic news! Thank you so much!

JeodC avatar Apr 25 '24 22:04 JeodC

I'll work out a reasonable set of pull requests to get my updates into here.

We will do our best to resolve any conflicts with the...200+ commits we've had since last week. Buncha descentheads.

JeodC avatar Apr 25 '24 22:04 JeodC

This is awesome, many thanks Ryan!

Note that the GPL3 makes this a little dicey, so I will likely maintain my fork under the original MIT license...

I'm a bit confused here, what do you mean by "the original MIT license"? Do you mean the one that was mistakenly applied to the code or something else?

Arcnor avatar Apr 25 '24 22:04 Arcnor

Feel free to join our Discord, we can get you set up with permissions if you want--maintaining a direct line of communication at least temporarily might help keep things less bumpy.

JeodC avatar Apr 25 '24 22:04 JeodC

I cannot link against Steamworks and not violate the GPL

Isn't this why some clever dude built steamshim?

DanielGibson avatar Apr 25 '24 22:04 DanielGibson

Yeah, I'll pop into discord tonight; let's definitely make sure everyone is on the same page and we get this right at the start!

icculus avatar Apr 25 '24 22:04 icculus

Yeah, I'll pop into discord tonight; let's definitely make sure everyone is on the same page and we get this right at the start!

Preferably before you make anything public. License clarity is critical.

JeodC avatar Apr 25 '24 23:04 JeodC