How to Prevent People from Downloading the Game?

Is there a way to prevent people from being able to download the game easily?

Basically I want to disable “Save As” the whole game, and disable copying text directly from game.

I understand that advanced users can always find ways to get around simple measures. I just want to have the most basic protection in place for common users with little computer knowledge (which are the majority of my audience).

Thanks.

There are a couple of ways to disable copying text on a web page. (You can google this.) But, really, this is 1% “protecting your game” and 99% “annoying your players”. I don’t recommend you get into any of it.

8 Likes

Twine is a JavaScript framework. All content is loaded into the browser. If you want to control the content, Twine is definitely the wrong platform.

3 Likes

I love to download twine games and open up the source.

Some people have made this very hard to do by piling all the squares in the exact same spot. That made it almost impossible to read.

Another person messed up the code that allows twine to interpret it without messing up the JavaScript (so editing part of the twine metadata only that isn’t used when the game is running.)

A third option is to write everything using a cryptographic cypher and then have a little function in its own square that unscrambles everything on runtime (an easy way to do this is to search and replace small chunks of letters like EN with macros that just output EN). Jon Ingold did that with some old Inform games.

I agree that this isn’t worth it and makes players mad. The only reason I can see for anyone to do this is if you are running a contest for non-tech savvy people and are expecting some to try to get around your puzzles by downloading it.

4 Likes

Cheating games by decompiling them is a long term hobby of gamers. Let them have their fun. If we write good stories with fun puzzles, no one will cheat.

6 Likes

I prefer cheating to looking at hints. More thought involved usually.

1 Like

This.

A major pillar of game design is to just let players play the game how they want, whether that be playing fairly, or cracking it open. The vast majority of your audience will not want to save the game to file and crack it open, because they believe in playing the game as you intended.

At the end of the day, hackers are gonna hack, and if someone really wants to look at your source code so bad, then you might as well let them, because they’re either really angry about being stuck (and your sabotage will put them over the edge), or they’re so enthralled by what you made that they want to see how it works (and they’ve probably beaten the game fairly once or twice already).

If you want more people to walk away from your game happy and satisfied, then it’s better to let them crack it open if they feel like it. They can decide for themselves if the route they’re taking is one that they feel is satisfying. It’s not gonna affect anyone else playing the game, and you honestly should be approaching game dev as “making an experience for the player” and not “trying to beat the player”.

These are all lessons that have taken me a very long time to learn the hard way. You can trust your players.

(Now, in a multiplayer environment, these rules change. But for singleplayer, this is mostly how it goes.)

The fact that users are playing your game in their browsers means that they have already downloaded it, only then can browsers run it. “Save As” just moves the file from temporary space to a more accessible location.

Also, seeing that you only want a primary check for non-tech users, I’m assuming you’re not worried about people creating illegitimate copies of your game but just cheating to win. Then there’s hardly any need to worry. Cheating to win is still playing.

You could, if you want, use a server-based architecture with AJAX, or put your answers in WASM but ultimately people who want to, will find a way around it. At that point hacking also just becomes a part of playing. Those who don’t understand tech won’t bother because the code generated by twine is just too cryptic to understand at a glance.

There are ways to specifically stop people from doing things. For example if you want to hide a specific block of text so that people don’t just open up the source code, do a Cmd+F and find the block, you could use ciphers like mathbrush mentioned. (If you want a proper method, many people here might be able to help you).

Tl;Dr:

  1. it’s not possible to stop people from downloading your game. But there are ways, like Zarf said, to stop copying of text from players’ screen (but maybe you’re not looking for those ways).
  2. To hide specific things like text, you could use simple AJAX calls, or ciphers. To hide images, you could probably convert it to text or something.
  3. Don’t bother trying to hide from players because they find it fun to look around source code
2 Likes

This is trivia, but something like this might not be intentional but a side effect of using a command-line tool to build their game.

2 Likes

I do also agree with this. Something else to consider: don’t think of yourself as the devious mastermind on an “opposing team” against the player. You want the player to discover and solve your neat puzzles and you want to be on their side as much as possible.

If the player wants to cheat, let them cheat. If you can figure out programmatically how the game can discover this (like they input a secret code without having discovered the code in the game) you can have the game acknowledge that in The Stanley Parable fashion - “Against all odds, Stanley managed to brute-force the secret code by hitting random buttons… Or maybe he was cheating! You aren’t a cheater like Stanley, are you?” Many players love that kind of acknowledgement and it’s good meta-rapport when the player understands the author considered everything they might do.

That said, if you’re using Twine in an educational setting for testing and it’s critical the student can’t cheat, Twine might not be the best option.

2 Likes

I’d be interested in knowing why you’d want to do this. That might give more insight into your goals, since while disabling copying text from the game is possible, it’s probably more trouble than it’s worth.

On the other hand, I believe this:

to be effectively impossible.

As Chris mentioned, this is extremely unlikely to be intentional. Tweego, for example, outputs everything in one place because the Twine editor was never involved at all and so when it opens the game it just defaults all passages to the same coordinates. You can see this in, for example, The Master of the Land and Ma Tiger’s Terrible Trip, which were both created outside of the Twine editor with custom build processes.

4 Likes

Tweego always includes positional data, even if the sources were virgin Twee files. If positional data does not exist, Tweego will create it so that passages are laid out in a non-overlapping grid.

I’m not very familiar with other command-line Twee compilers, so some, or all, of them may not generate positional data when it’s nonexistent.

Also, in all fairness, Twine 2 versions up to and including v2.3.x are well known for occasionally corrupting passages’ positional data.

Thanks everyone for the great info.
My purpose is not about preventing cheating but for protecting copyright.
I want to reduce the chance that my stories, which I spent a lot of time to write, are easily copied and published everywhere else on the web.

Around here we think about preserving interactive fiction, not locking it away from the world.

That sounds like a grandiose principle when I say it, but it is really what we do. That is why we have ifarchive.org and ifdb.org. A lot of games have vanished unnoticed forever because a web site went down. If you upload your game to ifarchive.org, then it will be part of IF community history.

(We kind of went through the same thing with web pages, remember? In the 1990s you saw of a lot of people asking “How do I protect my web page from being copied? I spent a lot of time writing it!” And the answer is… look, that’s not how this works.)

Protect your copyright by putting a notice “Copyright 2022 by MY NAME” on it. That’s what everyone else does.

4 Likes

You can just mark it Copyright 2022 (your name) as Zarf said. Don’t get hung up on copyright. Technically anything you write is copyright (you) by default. Usually you’ll only want to go through the formal process (filling out paperwork and paying fees) of copyrighting a work if you are publishing a book, or are mass mailing work out for evaluation for publishing. Some authors rarely bother with that.

You might also consider a free Creative Commons license, which means people could share it but requires that you are credited. It sounds like you’d want CC BY-NC-ND 4.0 (Creative Commons copyright, sharing allowed with attribution/credit required, no commercial use, no derivative use or modifications)

The other thing you could do - make it available on a service like itch.io which will basically attribute the work to you in a very prominent place, and you can make the game playable online for free, and make a download available for a nominal cost, which will basically discourage most people from downloading it unless they truly want to support your work. (Itch also allows you to let people pay any amount they want over your set price to support the game, even if it is free.)

3 Likes

As others have said, if you post anything on the Internet, you’re gonna have to make your peace with the fact that someone could repost it, otherwise you’re unlikely to sleep ever again. It’s basically impossible to prevent someone from downloading and reposting, which sucks, but that’s how it works.

Major multi-billion-dollar corporations have completely destroyed their customer relations trying to find a way to prevent this, but the natures of electronics and the Internet are both fundamentally like unchained beasts. If you or someone else on this forum were to figure out how to prevent this, then that person would be ahead of corporations with thousands of employees.

It’s more likely, however, that people just know who made a game (because they remember you hyping and posting here), as well as where it was originally posted (especially if you allow archivers to save and preserve your work, and document it as part of the larger culture). If this is allowed, then most attempts to maliciously repost your work will likely be met by enthusiasts calling them out for it. A lot of malicious reposters will collapse like wet paper when met with any kind of backlash, as they tend to be deeply-insecure people.

Also, if an archive can preserve your work, then everyone who frequents the archive will know who made it, and where to find the original source.

Generally, posting a copyright notice (I recommend Creative Commons, as @HanonO says) is enough to deter most people, even if you don’t legally file, or are unable to take them to court. You should also know that if you use Creative Commons, you’re locked into that specific license once you upload, and attempts to change the license won’t hold up in court (if you need to go to court). So, uh…choose your CC license wisely lol.

If you’re not prepared (for any reason) to make your peace with Internet reposters, then I might suggest organizing a private friend group of IF enthusiasts and sharing your work with them specifically, as you know you can trust them. I know people who have gone this route; it’s perfectly valid.

The Internet is just really, really big. I only use my name on this forum because I have a really bad defiance complex, but also because various civil offices have already put my name all over the web already, and I also know how hacking and cybersecurity work, and understand the risks involved.

What I’m trying to say, is: Posting your work online has risks. Don’t let the larger population make you feel like your only option is to post online.

EDIT: For example, if someone tried posting a “new” game called “The Baker of Shireton”, and another ifdb frequenter saw it, they might say “Heyyyyyy isn’t that actually a game by @HanonO, you reposting rapscallion?? There’s even an ifdb page for it!”

Then the reposter would have to figure out how to convince several people–who are familiar with Hanon’s work–that the reposter is actually a time traveller, and that never works out.

EDIT 2: Also worth stating: I’ve been making music for 10 years, and only ever saw 1 repost, and it was for a remix I did; not even a wholly-original song. It’s really rare, especially when my experience is in something like the music scene, which has a ton of cutthroat people who chase fortune and fame. The IF community is so much more kind, respectful, and relaxed, if my time on this forum is any indicator.

2 Likes

My observation of the world of non-interactive fiction (and I’ve seen a lot) is that most aspiring authors have no need at all to worry about this. It’s a total non-issue, and the reason is because with 99% probability your story, no matter how thrilled you may be by it or how hard you worked on it, is not anything that anyone will ever want to pirate. Or at least, they won’t earn a nickel by doing so.

That’s brutal, but it’s the truth. Naturally, we would all like to imagine that we’re in the 1%, not the 99%, that our creative work is exceptionally wonderful. But if you really are in that 1%, the very last thing you should do is publish your work using a free IF delivery system. Instead, turn your story into a novel and submit it to literary agents. What will happen then is, the agents will ignore you. This is a reality-check. If your story were worth money, agents (who are in the business of making money on fiction) would want to sign you as a client.

3 Likes

Worth stating that being ignored by agents and not being seen as profitable are not the same as being bad at what you do, especially if the literary publishing world is anything like the record label world in music.

Agents will dump and ignore anyone that they think isn’t gonna get a response from this week’s myopic, delusional projection of what the “public” supposedly wants. Some of my favorite authors and music producers went years and decades without getting an agent’s attention, and some of them never did.

Agents don’t search for quality; they search for marketability. Those are two different algorithms.

However, people who would be out to copy and repost your work would be using an agent’s mindset, because they’re trying to get the attention of an agent later in the process.

If people realized even a fraction of how many amazing works of art fail to get the attention of marketing and agents, their jaws would hit the floor hard enough to fuse.

So even if you have something amazing on your hands, your work still is unlikely to be at risk. It’s a weird worldview to settle into, sometimes.

In addition to what @Jim_Aikin says (and in the same spirit), this is ultimately not a very large community. Few games break out of the IF scene and into a wider audience. I don’t think many titles would garner a large enough audience to attract that kind of unfortunate attention. The main way to learn about new games is IFDB, and that is a very information-dense place.

Is there any history of IP theft in the IF scene? I haven’t been around long enough to know.

1 Like

This is largely (though not absolutely) true. But the original poster’s concern was about having work pirated, and my observation relates to that. Very few people would bother pirating your work unless they thought they could make money on it – and in addition, if you’re not hoping to make money on your work, why should you care if it’s pirated?

I’ve self-published several novels. My earnings for having done so are extremely low. But I did put proper copyright notices in the front matter, so if someone were to pirate one of the novels and somehow make money on it, I would be in a good position to sue them and collect. But that’s never going to happen, so I don’t worry about it.

1 Like