Hi – I’m looking to save my main working file as an extension. I’m working on a project that I would like to offer to other authors in the near future, as well as clean up my story file by getting these functions into an included file. I have a few questions, though:
How do you save a program as an extension?
Do you need to change the top of the file in any way? Meaning, when you create a new I7 file, you have to set a few things such as the author’s name, and title, for example. Do you have to keep these basic things out of the file, so they don’t throw an error when adding title and author in the story file?
Is there anything that you can have in a typical I7 program that you can’t in an extension? Are there any hidden limitations, or errors I can expect, when moving from a story file to an extension?
Finally, is there a way to hide the source code? I would like to include documentation on how to use the extension in a story file, but not necessarily give away the source code.
There is no protection against that. It’s like HTML. People can steal all the HTML off your web site, and guess what? It doesn’t matter.
If you place an appropriate license on your code, you could sue the offender. Or you could send a nasty note saying that you could sue. (Much cheaper than hiring a lawyer.)
(All the extensions on inform7.com/write/extensions/ have an attribution license, which basically says what I said above – the extension author must be credited in any game that uses the extension.)
In real life, none of this has ever been a problem. People create Inform extensions (going back to the I6 days) for the common good. If you don’t want people to use your code, don’t post it. If you do post it, people will use it respectfully, because what’s the point of being a jerk about it? It’s not like it’s worth more money if the credit is deleted. I’ve never heard of a case where an Inform extension was rehashed in that way, without permission.
Thanks for the clarification. That is actually something of what I’m afraid of – someone taking the code, rehashing it as their own, and making $ off my work, especially when I want to give it away for free. (As long as the credit is there, I wouldn’t mind if they did make money off of it.) I guess a user agreement would work. I have a ton of versions of this, so I have proof of my work going back pretty far.
This is where dynamic languages come into play. You can’t steal PHP code, or ASP.NET code, or Ruby on Rails code – it’s parsed behind the scenes, and the only thing left in the source code is the HTML output. The logic to get there is hidden. I was hoping that I7 offered a similar protection with extensions.
But seriously, it’s true, you needn’t worry. First of all, as others have already pointed out, that’s just not the way this community operates.
Consider too, though, that if your extension does something really useful and you end up publishing it to the I7 repository of extensions, then there it will stay, in public view and free for anyone to use. So it would be pointless for someone else to take your work, rehash it, claim it as their own and then try to somehow sell that same functionality when your extension is available for free, right there on the I7 extensions page for all to see – which is the first place anyone is going to look for additional functionality – and yours clearly does the same thing as theirs! Not to mention that their source code will be open to public view as well, and likely to look suspiciously like yours, maybe with a few names changed. As the previous poster said, it’s just never going to happen.
Conversely, the more you use extensions others have developed the more you’ll come to realize they are not always the “black boxes” we might wish them to be. For one thing, the I7 namespace is global. That alone means that no matter how carefully an extension is coded, it may clash with someone else’s code at some point. Rules can also interact in unexpected ways, or perhaps the default ordering turns out not to work quite right, when several extensions are made to interact with one another. If the extension source weren’t open to look at, issues like these would become utterly untraceable, and therefore unresolveable for the poor author who ran into them, rendering the extensions in question useless. Being able to look at the guts of how things work is sometimes an unavoidable necessity.
So in short, when we decide to share in Inform, we share the functionality along with the details of how it’s done, for anyone who cares to (or occasionally needs to) have a look at it. It’s a great way both to participate and to learn.
Thanks, Tayrn. That was actually the kind of response I needed. I’ve been in bands, worked on music, and have already run into copyright issues in that field. You make complete sense that there is no point to take what’s free. What I worry about, and it might be an inane fear, but its something you deal with in certain artistic fields, is someone taking your idea or creation, gaining the rights to it, and then preventing you from using your own work. I was on the fence about releasing this, but I’ll definitely release it now. Thanks for the very clear and complete response.