Please dont run obfuscation over the code!

The Galaxy Lives On! Distant Worlds, the critically acclaimed 4X space strategy game is back with a brand new 64-bit engine, 3D graphics and a polished interface to begin an epic new Distant Worlds series with Distant Worlds 2. Distant Worlds 2 is a vast, pausable real-time 4X space strategy game. Experience the full depth and detail of turn-based strategy, but with the simplicity and ease of real-time, and on the scale of a massively-multiplayer online game.

Moderator: MOD_DW2

bbenham
Posts: 27
Joined: Mon Feb 16, 2015 9:05 pm

RE: Please dont run obfuscation over the code!

Post by bbenham »

The easier Elliot makes it to mod, the longer this product will be out there, active and selling. It's been proven by other titles over and over and over.

It may seem like an unwelcome invasion into your code, but you will sell vastly more copies over the years if you openly support modding, and that especially includes the code. Egosoft has learned and profited well from this. I would even venture to suggest a bit of an open API to modify the behavior of things.
zgrssd
Posts: 5101
Joined: Tue Jun 09, 2020 1:02 pm

RE: Please dont run obfuscation over the code!

Post by zgrssd »

The easier Elliot makes it to mod, the longer this product will be out there, active and selling. It's been proven by other titles over and over and over.
As a example for games that lived through modding there are two good examples:

Sins of a Solar Empire: Rebellion
Original Release: 2008
Reached Stream: 2012
Last Update: Mon, June 28, 2021

Star Wars: Empire at War
Original Release: 2006
Reached Stream: 2006
Last Update: Thu, January 14, 2021

Both games kept alive entirely by the modding Community.
Updates are usually made with modding support in mind.
brucethemoose
Posts: 46
Joined: Fri Feb 18, 2022 6:14 pm

RE: Please dont run obfuscation over the code!

Post by brucethemoose »

Just going to add to this:

The "Harmony" mod for Rimworld, which is required for any C# mods, has 1.25 million current subscribers. That's an order of magnitude more than SteamDB's sales estimate for the latest DLC (Ideology).


Personally, I would not have bought Ideology if Rimworld had obfuscated code. Same with the previous DLC, Royalty, and I have seen similar sentiments in the Rimworld community.


I'm not aware of any game that has successfully abused Rimworld's easy source access, in spite of the immense popularity.


The Steam Workshop can also be considered a soft anti piracy measure, as its extremely inconvenient to use mods without a Steam copy of the game.
User avatar
Tanaka
Posts: 5080
Joined: Tue Apr 08, 2003 3:42 am
Location: USA

RE: Please dont run obfuscation over the code!

Post by Tanaka »

ORIGINAL: zgrssd
The easier Elliot makes it to mod, the longer this product will be out there, active and selling. It's been proven by other titles over and over and over.
As a example for games that lived through modding there are two good examples:

Sins of a Solar Empire: Rebellion
Original Release: 2008
Reached Stream: 2012
Last Update: Mon, June 28, 2021

Star Wars: Empire at War
Original Release: 2006
Reached Stream: 2006
Last Update: Thu, January 14, 2021

Both games kept alive entirely by the modding Community.
Updates are usually made with modding support in mind.

Very true. Awakening of the Rebellion for SWEAW is one of my favorite mods and mods like these still bring in sales of these super old games!
Image
User avatar
Mightymaster
Posts: 40
Joined: Wed Jan 19, 2022 1:56 pm

RE: Please dont run obfuscation over the code!

Post by Mightymaster »

Yeah, Rimworld has by far the best modding community in my experience. Hope DW2 can get close to that.
brucethemoose
Posts: 46
Joined: Fri Feb 18, 2022 6:14 pm

RE: Please dont run obfuscation over the code!

Post by brucethemoose »

Another positive example: Barotrauma is open source, but has a regular proprietary license and is sold on Steam. I cant post links yet, but look up "Barotrauma" on Github.

In fact, its been open source for years, going back when it was in alpha, and that has done nothing but help the game.

And its a high profile game! SteamDB estimates it has about 1M owners and 3k concurrent players.


I'm not saying DW2 should be posted on GitHub... But I am saying that obfuscating code is not strictly necessary for a commercial game anymore.



Oh, and one other bit about Rimworld. Harmony/C# modding started out as a forum only thing in that community, but eventually made the jump to Steam Workshop. In fact, beta builds obliterated mods all the time, but the community was fine with it. As others have already said, yall don't have to lift a finger to support modding, and the community would still love it.
Deathawaits4
Posts: 20
Joined: Mon Mar 01, 2021 9:26 pm

RE: Please dont run obfuscation over the code!

Post by Deathawaits4 »

I am really glad that there are so many people interested in modding this game beyond only editing some XML files.

I really like everything i have seen about the game, but i am still very scared that the decision to obfuscate the code will be made. If i knew otherwise i probably would have pre ordered the game instantly but i am currently reserved. I just lost interest in most games that limited modding. I will propably still buy this game, but it feels heavy on my heart as it could be everything i have dreamed off.
User avatar
Erik Rutins
Posts: 39635
Joined: Tue Mar 28, 2000 4:00 pm
Location: Vermont, USA
Contact:

Re: Please dont run obfuscation over the code!

Post by Erik Rutins »

Thanks to those who brought this up.

We've been discussing this for some time now and Elliot is coming around to the idea, but he still has some concerns. We are basically at the very last minute and right now, the game is still obfuscated, but we have time for one last update if he decides to unobfuscate.

I'm going to ask one question here from Elliot in the hopes of getting some feedback from the modders here to share with him regarding this:

"I'm still thinking about exactly how to do this. I want to remove obfuscation, but ideally not make the executable too easy to view. If I just remove the core obfuscation and leave the other protections in place, would that be sufficient? I guess we want it at the level of an unobfuscated C++ app? Not entirely sure what modders are expecting."


I'm also hopeful that if he does remove the obfuscation, that we'll see some of you jumping in the pool to see what you can do. 8-)

Regards,

- Erik
Erik Rutins
CEO, Matrix Games LLC


Image

For official support, please use our Help Desk: http://www.matrixgames.com/helpdesk/

Freedom is not Free.
Wizzy09
Posts: 7
Joined: Sat Mar 05, 2022 11:50 pm

Re: Please dont run obfuscation over the code!

Post by Wizzy09 »

I'm going to jump in on it head first.
Can't wait to make new races and factions out of every sci-fi universe I know of.
makotech222
Posts: 13
Joined: Sun Jan 01, 2012 4:17 pm

Re: Please dont run obfuscation over the code!

Post by makotech222 »

Since this is running on a custom Xenko engine, I assume everything is in C#, which by default is trivially decompilable; I think as long as the core game logic can be read using dnSpy, that should be all we really need; we can add Harmony manually and inject code in that way.
Deathawaits4
Posts: 20
Joined: Mon Mar 01, 2021 9:26 pm

Re: Please dont run obfuscation over the code!

Post by Deathawaits4 »

Erik Rutins wrote: Sat Mar 05, 2022 10:08 pm Thanks to those who brought this up.

We've been discussing this for some time now and Elliot is coming around to the idea, but he still has some concerns. We are basically at the very last minute and right now, the game is still obfuscated, but we have time for one last update if he decides to unobfuscate.

I'm going to ask one question here from Elliot in the hopes of getting some feedback from the modders here to share with him regarding this:

"I'm still thinking about exactly how to do this. I want to remove obfuscation, but ideally not make the executable too easy to view. If I just remove the core obfuscation and leave the other protections in place, would that be sufficient? I guess we want it at the level of an unobfuscated C++ app? Not entirely sure what modders are expecting."


I'm also hopeful that if he does remove the obfuscation, that we'll see some of you jumping in the pool to see what you can do. 8-)

Regards,

- Erik
Hello!
Thank you for your reply, sorry that i came a bit late to the discussion. What most if not all modders would love to have access to, would be core gameplay functions - A.I, systems in place and so on.
My idea would be to obfuscate the code that is needed to start and run the game, but i dont know how you have built the framework for it. Most c# apps have a .exe that only has the code to run the game and the rest is via .dll files. Obfuscating the .exe in this case is perfectly fine so long we can still access gameplay code.
Elliot also doesnt need to concern, as others have stated there is not a single case where a game has its code stolen due to not beeing obfuscated c#.

Modding and obfuscated c# app is still possible, but it is much more difficult as the code is very difficult to understand.
I hope i could make a meaningfull impact! thank you :)

PS. I know they are 2 sepperate games, but this would also give you a massive edge over stellaris. Modders complain a lot, that stellaris is limiting modding so much. Many features in mods have to be scrapped due to engine limitations or have to be worked around in a very unclean manner. I guess if steallaris mod makers realize how open this game is compared to stellaris (i am one of them and i have stopped modding stellaris for these reasons), they would definetly switch. Also lots of mods get integrated into the base game and you will have an easy way to check which mods are popular so you have a direction what the community wants. This will very likely be a huge Win/Win situation for all parties
zgrssd
Posts: 5101
Joined: Tue Jun 09, 2020 1:02 pm

Re: Please dont run obfuscation over the code!

Post by zgrssd »

Deathawaits4 wrote: Mon Mar 07, 2022 9:24 am PS. I know they are 2 sepperate games, but this would also give you a massive edge over stellaris. Modders complain a lot, that stellaris is limiting modding so much. Many features in mods have to be scrapped due to engine limitations or have to be worked around in a very unclean manner. I guess if steallaris mod makers realize how open this game is compared to stellaris (i am one of them and i have stopped modding stellaris for these reasons), they would definetly switch. Also lots of mods get integrated into the base game and you will have an easy way to check which mods are popular so you have a direction what the community wants. This will very likely be a huge Win/Win situation for all parties
They are not just two games, but two diffrent Genrees. I would say.

Having to support multiplayer means a lot of limits have to be applied.
Deathawaits4
Posts: 20
Joined: Mon Mar 01, 2021 9:26 pm

Re: Please dont run obfuscation over the code!

Post by Deathawaits4 »

zgrssd wrote: Mon Mar 07, 2022 10:56 am
Deathawaits4 wrote: Mon Mar 07, 2022 9:24 am PS. I know they are 2 sepperate games, but this would also give you a massive edge over stellaris. Modders complain a lot, that stellaris is limiting modding so much. Many features in mods have to be scrapped due to engine limitations or have to be worked around in a very unclean manner. I guess if steallaris mod makers realize how open this game is compared to stellaris (i am one of them and i have stopped modding stellaris for these reasons), they would definetly switch. Also lots of mods get integrated into the base game and you will have an easy way to check which mods are popular so you have a direction what the community wants. This will very likely be a huge Win/Win situation for all parties
They are not just two games, but two diffrent Genrees. I would say.

Having to support multiplayer means a lot of limits have to be applied.
You are right, but stellaris only has peer to peer multiplayer which shouldnt matter in that regard too much. The main problem stellaris modding has, is that it is written in c++ and that already makes it far mor difficult to enable modding in any reasonable way. Also a outdated frankenstein engine and voilla, you have the perfect mix of frustrated modders and players alike.

I only use stellaris as an example, because they get compared lots by critics and players alike.
zgrssd
Posts: 5101
Joined: Tue Jun 09, 2020 1:02 pm

Re: Please dont run obfuscation over the code!

Post by zgrssd »

Deathawaits4 wrote: Mon Mar 07, 2022 11:09 am
zgrssd wrote: Mon Mar 07, 2022 10:56 am
Deathawaits4 wrote: Mon Mar 07, 2022 9:24 am PS. I know they are 2 sepperate games, but this would also give you a massive edge over stellaris. Modders complain a lot, that stellaris is limiting modding so much. Many features in mods have to be scrapped due to engine limitations or have to be worked around in a very unclean manner. I guess if steallaris mod makers realize how open this game is compared to stellaris (i am one of them and i have stopped modding stellaris for these reasons), they would definetly switch. Also lots of mods get integrated into the base game and you will have an easy way to check which mods are popular so you have a direction what the community wants. This will very likely be a huge Win/Win situation for all parties
They are not just two games, but two diffrent Genrees. I would say.

Having to support multiplayer means a lot of limits have to be applied.
You are right, but stellaris only has peer to peer multiplayer which shouldnt matter in that regard too much.
Reality check:
Back when you could still select Starting Weapon Type, some people modded the Empire files to give another thecnology. Something higher that was useable early.

Those are the kinds of issues Stellaris has to guard against. It makes no differnce that the network is "peer to peer". If anything, that makes it more vulnerable to cheating.
Deathawaits4
Posts: 20
Joined: Mon Mar 01, 2021 9:26 pm

Re: Please dont run obfuscation over the code!

Post by Deathawaits4 »

[/quote]
Reality check:
Back when you could still select Starting Weapon Type, some people modded the Empire files to give another thecnology. Something higher that was useable early.

Those are the kinds of issues Stellaris has to guard against. It makes no differnce that the network is "peer to peer". If anything, that makes it more vulnerable to cheating.
[/quote]
Yes of course, but there are still other ways of securing anti cheat mechanisms instead of preventing modding. Also my point was, that cheating in a game where you play with friends, is not comparable to an online game with 100s or 1000s of random people. There are also lots of multiplayer games that have full modding support and still support multiplayer.
zgrssd
Posts: 5101
Joined: Tue Jun 09, 2020 1:02 pm

Re: Please dont run obfuscation over the code!

Post by zgrssd »

Deathawaits4 wrote: Mon Mar 07, 2022 12:01 pm
Yes of course, but there are still other ways of securing anti cheat mechanisms instead of preventing modding.
I could literally mod a decision into the game that grants me 5000 of every resource, but can only be used by Empires with a specific name.
And that is with the current limits.
Anything more would just invite more issues.

DW1+2 have it simpler, because they do not have to balance or secure for MP.
brucethemoose
Posts: 46
Joined: Fri Feb 18, 2022 6:14 pm

Re: Please dont run obfuscation over the code!

Post by brucethemoose »

Deathawaits4 wrote: Mon Mar 07, 2022 9:24 am
Erik Rutins wrote: Sat Mar 05, 2022 10:08 pm Thanks to those who brought this up.

We've been discussing this for some time now and Elliot is coming around to the idea, but he still has some concerns. We are basically at the very last minute and right now, the game is still obfuscated, but we have time for one last update if he decides to unobfuscate.

I'm going to ask one question here from Elliot in the hopes of getting some feedback from the modders here to share with him regarding this:

"I'm still thinking about exactly how to do this. I want to remove obfuscation, but ideally not make the executable too easy to view. If I just remove the core obfuscation and leave the other protections in place, would that be sufficient? I guess we want it at the level of an unobfuscated C++ app? Not entirely sure what modders are expecting."


I'm also hopeful that if he does remove the obfuscation, that we'll see some of you jumping in the pool to see what you can do. 8-)

Regards,

- Erik
Hello!
Thank you for your reply, sorry that i came a bit late to the discussion. What most if not all modders would love to have access to, would be core gameplay functions - A.I, systems in place and so on.
My idea would be to obfuscate the code that is needed to start and run the game, but i dont know how you have built the framework for it. Most c# apps have a .exe that only has the code to run the game and the rest is via .dll files. Obfuscating the .exe in this case is perfectly fine so long we can still access gameplay code.
Elliot also doesnt need to concern, as others have stated there is not a single case where a game has its code stolen due to not beeing obfuscated c#.

Modding and obfuscated c# app is still possible, but it is much more difficult as the code is very difficult to understand.
I hope i could make a meaningfull impact! thank you :)

PS. I know they are 2 sepperate games, but this would also give you a massive edge over stellaris. Modders complain a lot, that stellaris is limiting modding so much. Many features in mods have to be scrapped due to engine limitations or have to be worked around in a very unclean manner. I guess if steallaris mod makers realize how open this game is compared to stellaris (i am one of them and i have stopped modding stellaris for these reasons), they would definetly switch. Also lots of mods get integrated into the base game and you will have an easy way to check which mods are popular so you have a direction what the community wants. This will very likely be a huge Win/Win situation for all parties
All of this ^.

Typically, in Cities:Skylines, Kerbal Space Program, Oxygen Not Included, Rimworld, Stardew Valley and many other games, modders mess with game mechanics implemented in C# via Harmony without having to touch, say, Unity's C++ functions. This has the added benefit of letting all these code modifications play nice with each other, via patching and transpiling, among other things.

It sounds like DW2 may be structured differently than a typical Unity game, with many of the game mechanics implemented in C++ code? Obviously this would be great to access, and I echo Deathawaits4's suggestion above, but modders will gratefully take absolutely anything and everything we can get. We have zero expectations. If you have to obfuscate all of the C++ and part of the C# while leaving some C# open, so be it, that would be far superior than being limited to basic scripting. On the other hand, I suspect modders will do amazing things with anything and everything you choose to leave unobfuscated.



Just to expand on Stellaris some, its problems are manyfold. A big one is the scripting language, which could be worse, but is extremely limited in terms of what it exposes and what it allows you to do. As Death said, some basic operations are ridiculously convoluted and slow, and what modders have done already is nothing short of a miracle.

Another is the primitive conflict resolution. Some fundamental files and functions have to be overwritten entirely, which is an absolute nightmare when more than one mod needs to touch that same file or function. Again, Harmony (as well as xml patching in Rimworld's case) takes care of this.

And yes. Frustrated modders from many communities would jump right into DW2 modding, and drag plenty of their fans and Patreons in with them. DW2 is a perfect storm of what they've been craving: complexity, performance, competent AI, and highly automated systems.
spacegoblin
Posts: 5
Joined: Tue Mar 08, 2022 9:34 am

Re: Please dont run obfuscation over the code!

Post by spacegoblin »

Erik Rutins wrote: Sat Mar 05, 2022 10:08 pm Thanks to those who brought this up.

We've been discussing this for some time now and Elliot is coming around to the idea, but he still has some concerns. We are basically at the very last minute and right now, the game is still obfuscated, but we have time for one last update if he decides to unobfuscate.

I'm going to ask one question here from Elliot in the hopes of getting some feedback from the modders here to share with him regarding this:

"I'm still thinking about exactly how to do this. I want to remove obfuscation, but ideally not make the executable too easy to view. If I just remove the core obfuscation and leave the other protections in place, would that be sufficient? I guess we want it at the level of an unobfuscated C++ app? Not entirely sure what modders are expecting."


I'm also hopeful that if he does remove the obfuscation, that we'll see some of you jumping in the pool to see what you can do. 8-)

Regards,

- Erik
I'd just like to chime in with the age old argument:

Code protections always harm legitimate players and rarely deter the determined pirate. There is plenty of evidence for this, see the numerous Denuvo games which have been cracked and many cases where legitimately purchased copies had worse performance than the pirated ones due to the overhead of DRM.

In this case, I assume that obfuscation is done to complicate reverse engineering. I would argue that cost-benefit of obfuscation is high price for little gain: Modders can perpetuate a games lifespan for decades, whereas a determined pirate can de-obfuscate and crack your game in literal hours. Tools like Ghirda or IDA make this very very easy nowadays. These sorts of games are very popular with both longterm players and modders alike, I think it would serve in your best interest to facilitate the modding community as much as possible.

I would ask the team to consider to re-examine the motivation for obfuscation and ask what purpose will it serve. Is it to prevent piracy/exploits/hacking? Will obfuscation actually help when it has been shown in the past that even more aggressive code protections have failed to stop these concerns? What impact will obfuscation have on legitimate players and modders, and what are the longterm consequences?
Deathawaits4
Posts: 20
Joined: Mon Mar 01, 2021 9:26 pm

Re: Please dont run obfuscation over the code!

Post by Deathawaits4 »

brucethemoose wrote: Tue Mar 08, 2022 7:07 am All of this ^.

Typically, in Cities:Skylines, Kerbal Space Program, Oxygen Not Included, Rimworld, Stardew Valley and many other games, modders mess with game mechanics implemented in C# via Harmony without having to touch, say, Unity's C++ functions. This has the added benefit of letting all these code modifications play nice with each other, via patching and transpiling, among other things.

It sounds like DW2 may be structured differently than a typical Unity game, with many of the game mechanics implemented in C++ code? Obviously this would be great to access, and I echo Deathawaits4's suggestion above, but modders will gratefully take absolutely anything and everything we can get. We have zero expectations. If you have to obfuscate all of the C++ and part of the C# while leaving some C# open, so be it, that would be far superior than being limited to basic scripting. On the other hand, I suspect modders will do amazing things with anything and everything you choose to leave unobfuscated.



Just to expand on Stellaris some, its problems are manyfold. A big one is the scripting language, which could be worse, but is extremely limited in terms of what it exposes and what it allows you to do. As Death said, some basic operations are ridiculously convoluted and slow, and what modders have done already is nothing short of a miracle.

Another is the primitive conflict resolution. Some fundamental files and functions have to be overwritten entirely, which is an absolute nightmare when more than one mod needs to touch that same file or function. Again, Harmony (as well as xml patching in Rimworld's case) takes care of this.

And yes. Frustrated modders from many communities would jump right into DW2 modding, and drag plenty of their fans and Patreons in with them. DW2 is a perfect storm of what they've been craving: complexity, performance, competent AI, and highly automated systems.
Yes! Exactly. And you know what is best? It seems like the game is written fully in c# as the underlying engine seems to be stride or xenko engine which is fully developed in c#. Maybe there are some parts using c++ (maybe the connection between the graphics engine and the drivers), but most of it will be c#, which brings vast posibilities on what is possible!
zgrssd
Posts: 5101
Joined: Tue Jun 09, 2020 1:02 pm

Re: Please dont run obfuscation over the code!

Post by zgrssd »

Deathawaits4 wrote: Tue Mar 08, 2022 6:01 pm
brucethemoose wrote: Tue Mar 08, 2022 7:07 am All of this ^.

Typically, in Cities:Skylines, Kerbal Space Program, Oxygen Not Included, Rimworld, Stardew Valley and many other games, modders mess with game mechanics implemented in C# via Harmony without having to touch, say, Unity's C++ functions. This has the added benefit of letting all these code modifications play nice with each other, via patching and transpiling, among other things.

It sounds like DW2 may be structured differently than a typical Unity game, with many of the game mechanics implemented in C++ code? Obviously this would be great to access, and I echo Deathawaits4's suggestion above, but modders will gratefully take absolutely anything and everything we can get. We have zero expectations. If you have to obfuscate all of the C++ and part of the C# while leaving some C# open, so be it, that would be far superior than being limited to basic scripting. On the other hand, I suspect modders will do amazing things with anything and everything you choose to leave unobfuscated.



Just to expand on Stellaris some, its problems are manyfold. A big one is the scripting language, which could be worse, but is extremely limited in terms of what it exposes and what it allows you to do. As Death said, some basic operations are ridiculously convoluted and slow, and what modders have done already is nothing short of a miracle.

Another is the primitive conflict resolution. Some fundamental files and functions have to be overwritten entirely, which is an absolute nightmare when more than one mod needs to touch that same file or function. Again, Harmony (as well as xml patching in Rimworld's case) takes care of this.

And yes. Frustrated modders from many communities would jump right into DW2 modding, and drag plenty of their fans and Patreons in with them. DW2 is a perfect storm of what they've been craving: complexity, performance, competent AI, and highly automated systems.
Yes! Exactly. And you know what is best? It seems like the game is written fully in c# as the underlying engine seems to be stride or xenko engine which is fully developed in c#. Maybe there are some parts using c++ (maybe the connection between the graphics engine and the drivers), but most of it will be c#, which brings vast posibilities on what is possible!
With "C++" we have to differentiate with what I call "native C++" (involves naked pointers, arrays without bounds checks and all the other funny ways to get speed and mess up) and "C++ .NET".
If it is the later, it realy makes 0 difference. MSIL is MSIL, regardless of the source langauge.
Post Reply

Return to “Distant Worlds 2”