Making ZScript file close sourced

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Paar
Posts: 88
Joined: Fri Apr 18, 2008 5:17 pm

Making ZScript file close sourced

Post by Paar »

As many others even I play with the idea to make commercial game using GZDoom. ZScript is fundamental part of such a project and my question is - is it possible to make ZScript files close sourced?
User avatar
Gutawer
Posts: 469
Joined: Sat Apr 16, 2016 6:01 am
Preferred Pronouns: She/Her

Re: Making ZScript file close sourced

Post by Gutawer »

No, and this is by design.
gramps
Posts: 300
Joined: Thu Oct 18, 2018 2:16 pm

Re: Making ZScript file close sourced

Post by gramps »

Languages that aren't compiled (scripting languages) aren't really designed for distributing code in anything other than source form.

If you really want to avoid publishing your source code, you could publish it in an obfuscated form instead. But publishing source code for some scripts in your game shouldn't prevent you from releasing a commercially viable game anyway, and there's no reason you couldn't publish it under a restrictive proprietary license if you really wanted to.
User avatar
Nash
 
 
Posts: 17506
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: Making ZScript file close sourced

Post by Nash »

You can also deliberately use an extremely horrible coding style that is so ugly and annoying to look at, that anyone potentially looking into looting your scripts would just be turned off and walk away... :mrgreen:
Paar
Posts: 88
Joined: Fri Apr 18, 2008 5:17 pm

Re: Making ZScript file close sourced

Post by Paar »

Well, that's definitely a bold move, to release commercial game with complete open source. Of course ACS scripts are compiled but I wouldn't put much game logic in there anyway.

The more I think about it the more I like the idea of "clean" open source DRM-free games. Idealistic but very anti-greedy as is the business nowadays. But some risks are there and maybe there's a reason it is not a common concept.
User avatar
Enjay
 
 
Posts: 27316
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: Making ZScript file close sourced

Post by Enjay »

Not that bold. There are plenty of games in existence - including big AAA titles - where at least part of the scripting code to alter how the game behaves is very much human readable code in a fairly easy to access file of some sort. It's not even a particularly new concept.
User avatar
Arctangent
Posts: 1235
Joined: Thu Nov 06, 2014 1:53 pm

Re: Making ZScript file close sourced

Post by Arctangent »

Not to mention, it's not like having the code open source really means that anyone can just download the game off of your GitHub or anything - they'd still need to provide their own graphics and map data at a minimum to have a game, period, much less the one you're selling. Doom itself is an example of this - you can grab the entire source code off of id's official GitHub, compile it on Linux, and have a perfectly runnable doom.exe ... it's just that it'll completely fail to load when it notices that it's missing all its essential files, and even if you somehow get past that, there's no levels for you to actually play on.

Besides, just distributing the .wad or .pk3 or whatever makes your product as open source as, say, DOTA 2 or CS:GO. Which is to say, not in the slightest, but it's very easy to obtain tools to extract resources from it. Really, the only thing you can really meaningfully do is get legally recognized ownership of your game's resources, so you can strike down other commercial products that have stolen them.
Last edited by Arctangent on Wed Oct 24, 2018 4:42 am, edited 3 times in total.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Making ZScript file close sourced

Post by Graf Zahl »

And seeing that ZScript inherits from GPL-licensed code making scripting closed source would be dubious at best.

Technically it isn't even possible to do something about it. Any binary representation of compiled script code would involve the risk of breaking with new engine versions. Remember Eternity's Small disaster? The compiled data was incompatible between 32 bit and 64 bit, rendering the whole system nonfunctional which ultimately led to dumping that particular language entirely.
User avatar
Enjay
 
 
Posts: 27316
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: Making ZScript file close sourced

Post by Enjay »

And, let's be honest, if people are going to steal stuff from your game, most people will be going after your resources (sprites, textures, whatever) and very few will be going after your code (not saying it can't happen, of course). We're also not talking about the cutting edge of commercial gaming either. Any game based on GZDoom is likely to be quite niche with a relatively small commercial uptake (not saying it shouldn't be done - far from it). You're not going to lose millions of $ in investment or anything.

There has already been a handful commercial projects based on Doom/GZDoom/ZDoom and they've done OK for what they wanted to achieve, despite almost anyone in the community being able to rip things apart and have a look at what's been done.
Paar
Posts: 88
Joined: Fri Apr 18, 2008 5:17 pm

Re: Making ZScript file close sourced

Post by Paar »

Okay, first - it cannot be done and won't be possible in the future. If I'm going to develop a game using GZDoom, I should embrace it's design philosophy. I have no problem with that as I would share the scripts later anyway. I am a big fan of releasing source code of the games as John Carmack did with his technologies. I will certainly do the same if I ever produce something that would gather substantial fanbase.

At the same time I'm a big fan of CD Project and GOG with their DRM-free policy. I don't fear that my game would be pirated as gamers are willing to pay for a game that is quality product even though they could easily pirate it.

My only concern was that I would put a large amount of work in a game scripting only for someone to just open the file and copy everything in his/her own project. I know that you can use restrictive license but the source code could be modified enough for you not to realize that it's actually copied. However I have to admit that I don't have much experience in the field of commercial games so of course I could be very wrong.

On the other hand probability that I will write something revolutionary and worth copying is slim as I wouldn't be reinventing the wheel. The main attraction should be game design (weapon/enemy balancing, quality levels with intricate puzzles etc.) and perhaps interesting world worth investigating. So I don't reject the idea of using GZDoom for my project.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Making ZScript file close sourced

Post by Graf Zahl »

Paar wrote:I know that you can use restrictive license but the source code could be modified enough for you not to realize that it's actually copied.
Not really. It depends on which parts you inherit from. If you inherit from GPL-licensed actors, the result is inevitably also GPL.
User avatar
Caligari87
Admin
Posts: 6242
Joined: Thu Feb 26, 2004 3:02 pm
Preferred Pronouns: He/Him

Re: Making ZScript file close sourced

Post by Caligari87 »

Which I imagine makes it impossible to use non-GPL-compatible licenses on ZScript code because literally even creating a basic object inherits from native internal code which is GPL, right?

8-)
User avatar
Enjay
 
 
Posts: 27316
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: Making ZScript file close sourced

Post by Enjay »

I also think both the danger and consequences of code theft from a GZDoom commercial mod are being overestimated. I'm not saying that it can't happen; I'm merely asking: if it happens, so what? What will be the actual implications of the unwanted copying? Who will benefit from it? Who will actually suffer from it?

What are the chances of person 1 producing a commercial mod, then person 2 using some revolutionary code from it for their mod, having a massive commercial success (without anyone realising that code was taken from person 1's mod) while person 1 is on the bread line cursing the day person 2 ever got a hold of their game?

I'm not saying that person 2 in the above scenario would be right to do what they did and I'm not saying that stuff couldn't be copied against person 1's wishes. I just feel that, in the grand scheme of things, it wouldn't exactly be a catastrophe of global proportions even if it did happen and, actually, with things being open source, there would be far more people able to step up and say "yeah, that was 'stolen'".


In other words,I'd say: go ahead and make your game and stop worrying about something relatively trivial which may not happen and, even if it does, will have minimal consequences. For what it's worth, in this community we try to respect peoples' wishes about copying resources/code/etc from a mod whether the mod is commercial or not.
User avatar
Rachael
Posts: 13967
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her

Re: Making ZScript file close sourced

Post by Rachael »

Let's also not forget that licenses are generally treated as fairly sacrosanct in the Doom community, at least by the people who are generally considered to be long-term members and a part of the establishment.

Which means, if you make a request that this code not be copied without your permission, and someone does it, and you catch them, generally you can report it and their content will be removed. This even applies to communities with dissimilar ideologies (i.e. Doomworld). If they're a repeat offender they may also suffer additional penalties - some have been banned in the past for doing this serially.

Personally, whenever possible (at least, since this year or so), I try to code under either the BSD or MIT license. I think code is a resource that is to be learned from, and I know it's way easier to take advantage of me this way - but I find even GPL too restrictive for my tastes.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Making ZScript file close sourced

Post by Graf Zahl »

Anyone concerned about data "theft" shouldn't use an engine with easy to read data like GZDoom anyway, for those Unity might be a better option. :twisted:

Return to “Scripting”