A Flash Developer Resource Site

Results 1 to 16 of 16

Thread: How to protect games on line

  1. #1
    Member
    Join Date
    Feb 2001
    Posts
    86
    Hi Guys,

    I noticed some sites like electrotank have a better system of protecting games [ you cannot get them out of your cache and play localy ]

    I don't know how exactly they do it, but I'm thinking of getting a script which would check that GAME.swf file plays only if located on a specified [ yours or my ] server.

    Does anybody have any ideas or scripts which would do this.
    How can .swf file check whether it is on a particular server and refuse to play if it's not.

  2. #2
    Member
    Join Date
    Sep 2000
    Posts
    80
    LOL! Ah HaHaHaHaHaHaHaHaHa Arghhhhhhhhhhhhhhhhhhhhhhhhhhhhhh HaHaHaHaHaHaHaHaHaHa, Oh, Oh, Oh, Oh, E HeHeHeHeHeHeHeHeHeHe

    I'm gonna tell you straight up how it is, you cannot protect your flash period! End of discussion.

  3. #3
    Senior Member
    Join Date
    Jun 2001
    Posts
    206
    Sure you can protect your Flash movies (to some extent).

    Add this script to frame 1 of your movie:

    if (_level0._url eq "http://www.yourHostServer.com") {
    code to init game
    } else {
    code to disable game
    }

    I copied this script from another thread here on Flashkit, didn't think of it myself, so credits go to the person who thought of this.

    Hope this helps you!

  4. #4
    Coder-at-large
    Join Date
    May 2001
    Posts
    99
    Of course, even with that, it's possible to get around if you know what you're doing...

    I think that OkieDokies is pretty much correct on this one. The bottom line is that you have to put the file in a place that users can get to it in order for them to be able to view it. This then also means that they can download it and save/play it locally. All it requires is moving data from a remote source (server) to their hard drive. And of course, moving data around is what computers are best at.

    Yes, you can certainly throw quite a few nails on the road to slow people down from downloading your stuff. But since Flash HAS to download in order to play, all you can really do is inconvienence them. You're not going to be able to stop someone who's really determined. (And knowledgeable)

    Although, that being said, even simple protection measures, such as the one listed above, are probably still beyond the reach of most casual sufers. So you can probably cut downloads from arround %90 of your viewers with that sort of thing.


    However...


    Just a silly question, but why would you WANT to stop them from downloading your stuff? Unless it's a pay site, where you have to pay to play the games, or something, then what would you gain from not allowing them to download and store your movies locally? (besides annoying your audiance)

  5. #5
    Senior Member
    Join Date
    May 2001
    Posts
    425
    a way toi prevent them from getting it from their cache(not really, but it will help) is to name it something strange, like a list of *******s, or, if your site is located on flashkit, name it like member_12345_footer so they wont try to check it. but yes if they have only one open, you wont do much good.

    one thing to do is make the game require other types of files online, one instance would be XML for a multiplayer game, so if it tries to load another document from the server, and they are playing irt from the computer, it will trey to get them from localhost, so they wont be able to play.

    these are not real methods for protecting your games, but, they will help stop some people who really dont try.

  6. #6
    Member
    Join Date
    Feb 2001
    Posts
    86
    Thanks guys.

    It was helpful. I should check out properties tab in actionscripting more often. I never do much there beyond x,y scale , position etc...

    Seems like making game check that it is playing from my site
    should work , couple than with some veriable loading, for most people it should do the trick.

    The reason I wouldn't want people to be able to play them away from my site is simple. Some people could rip all of the code from unprotected files or just alter them slightly and use my game as their own. The harder you can make it for them the better.

    If it weren't for those people I wouldn't care. I'm all for releasing code if I know people will only use it to learn, but unfortunately there are many out there who use whatever you give away, change a few graphics ( some don't even do that ) and try to sell it as if they made it.

  7. #7
    Senior Member
    Join Date
    May 2001
    Posts
    425
    yes we all know about the code stealers and game rippers. but, that shouldnt stop you from making your games open source. we are going to make hybrid 24 opensource, however we arent going to give away the fla or the code. we are going to write tutorials that people can follow for creating all the pars of the script. it IS going to be for learning, we will make sure of that. if people dont wwant to take the time to read the info about what they're doing, then they arent trying to learn, and dont deserve to recieve the benifits.

    my simulator is based on an open source project by Brian Hogg. He is my inspiration, we havent taken a single line of script from his simulator, just ideas and concepts(and the retro graphics for testing).

    Kepp your ideas fresh, but inspiration can come from anywhere. OpenSource will become the norm, one day.

    Peace,
    Ian

  8. #8
    Senior Member
    Join Date
    Jun 2001
    Posts
    206
    Truth is that if people want to steal your stuff, they can (and most probably will).

    Another way to prevent people from ripping your stuff is by making stuff that's undoubtfully yours (e.g. some kind of drawing style).
    Still, it's not waterproof (people actually have to know your stuff), but it's just another idea.

  9. #9
    Coder-at-large
    Join Date
    May 2001
    Posts
    99
    Hmm. If you're worried about code rippers, then none of the stuff we've just discussed is going to do much good anyway. It doesn't really matter if the game won't play locally if they're not trying to play it. And most methods of protection break down fairly quickly against people who have access to the source code. I mean, if I'm an evil code ripper guy, and I download your game locally, then I'm not going to care that when I try to run it locally it says "This game can only be played from xx.yyyy.com". In fact, I probably don't even really care, since my primary goal is looking at/stealing source code, anyway.

  10. #10
    Senior Member Ray Beez's Avatar
    Join Date
    Jun 2000
    Posts
    2,793

    Casual persons

    Why disallow someone to play a game from the cache? - Because if they are playing it off their cache, they aren't visiting your site, which means reduced income. It also means they won't make your site a recurring place to visit and won't see your new games when you post them. Visitor retention is crucial.

    Secondly, it also stops the ignorant game-ripper. The little 14 year olds who know how to copy a game from their cache but not much else.


    By the way, the _URL method has a major flaw which I've unfortunately discovered recently when my OWN visitors to my site were seeing the "stolen game" warning on my games! The reason is that a URL can be typed in many different ways. My code checked for "www.lilgames.com" but all of the following typos (and more) work on my site, but trip the copy protection:

    lilgames.com
    ww.lilgames.com
    www.lilgames.com.
    wtewt.lilgames.com
    anything.lilgames.com

    Basically anything in front of the domain will work (not all web hosts enable this!) and the weird one is a period after dot com.

    :-/


    [Edited by Ray Beez on 08-08-2001 at 01:40 PM]

  11. #11
    Coder-at-large
    Join Date
    May 2001
    Posts
    99

    Re: Casual persons

    Originally posted by Ray Beez
    Why disallow someone to play a game from the cache? - Because if they are playing it off their cache, they aren't visiting your site, which means reduced income. It also means they won't make your site a recurring place to visit and won't see your new games when you post them. Visitor retention is crucial.

    Secondly, it also stops the ignorant game-ripper. The little 14 year olds who know how to copy a game from their cache but not much else.

    Hmm. Point. Although let me give my own take on this, which may not be everyones':

    Whenever I find something cool in flash that I can see myself wanting to play with later, I almost *always* download it to my hard drive. This is not because I steal code, or because I'm an evil 31337 h4x0r. It's because I'm on a dial up connection, and I usually don't want to have to wade through several (often high bandwith) pages to get to something when I want to play with it.

    So personally, that sort of protection just tends to bug me, since it gets in the way of the way I like to browse. However, I DO tend to go back to sites that have cool things on them. Not to replay old games, but because if a site has had cool things on it in the past, then I tend to want to check back to see if they've come up with any MORE cool things.

    So for me, at least, if you want to get me to keep comming back to your site, then don't bother with fancy complicated URL protections. That just will either annoy me (if it works) or make me laugh at you (if it doesn't.) Instead keep making cool things, or update the ones that are there, and I'll be back very very often. (although admitedly still less than if I were having to come to your site every time I wanted to view your cool flash thing. but then, if I had to come to your site every time I wanted to view it, then I'd stop wanting to view it as much...)

    Just the comments of an (admitedly nonstandard) dial-up browser. Do with them what you like.

  12. #12
    Junior Member
    Join Date
    Feb 2001
    Posts
    23
    Interesting topic, Kolegaboy. I personally think that there is not such thing as "invincible" or "uncrackable". However, as mentioned in previous replies, you SHOULD include some protection to keep it a bit secure. But then again, you should always include a download-able version of your game.

    People like me with a slow dial-up do not like logging on and off so much and we really hate waiting (you know why). So what I suggest you to include is a self-executable (or "Standalone Player" as flash would call it) packed inside a zip file or some sort and put it up on your site.

  13. #13

    Re: Casual persons

    Originally posted by Ray Beez

    By the way, the _URL method has a major flaw which I've unfortunately discovered recently when my OWN visitors to my site were seeing the "stolen game" warning on my games! The reason is that a URL can be typed in many different ways. My code checked for "www.lilgames.com" but all of the following typos (and more) work on my site, but trip the copy protection:

    lilgames.com
    ww.lilgames.com
    http://www.lilgames.com.
    wtewt.lilgames.com
    anything.lilgames.com

    [Edited by Ray Beez on 08-08-2001 at 01:40 PM]
    One way i got around Ray Beez's problem, is by using another similar code where i just check a text file in a folder that is RELATIVE to my game on my server. Then, if someone steals my game & tries to put it on their server, they will not have my dir & the game will not work. Still not full proof of course, but i really only wanna stop people who just take your game & upload it to their site. They usually won't wanna take the time to find all these extra files. This way will not require the FULL domain name in order to work.

    in frame 1 i put:


    loadVariablesNum ("DirectoryName/SecurityTextFile.txt", 0);


    then, in frame 5 i put:


    if (Number(secure) == 0) {
    gotoAndPlay ("stolen");
    }


    and, finally, put this in your SecurityTextFile.txt:


    secure=1&loaddone=1



    Just name your directory something weird & your security file something weird & the avg theif won't bother to hack your game & figure it out.

  14. #14
    Junior Member
    Join Date
    Jul 2001
    Posts
    22

    Or you can

    You can also go to file,publish settings, and decide on some stuff there. You can choose if you can right click or not and choose if a user can copy or do anything with it.

  15. #15
    Senior Member Ray Beez's Avatar
    Join Date
    Jun 2000
    Posts
    2,793
    Yeah... ok Titan.

    Mathonwy: I see your point if we're talking about some flash movie or whatnot that a person would like to see once or twice. Myself, I have some addictive games people come back to play day after day. Therein lies the difference.

    -RB

  16. #16
    Coder-at-large
    Join Date
    May 2001
    Posts
    99
    Actually, the point I was trying to make includes both movies and games.

    Again: if I see something cool that I imagine that I'll want to see/play more than once, then I tend to download it. Two reasons:

    #1: Dialup: Slow. Me: Impatient.

    #2: I like to keep things where I can find them. I have no promise that your site will be there in a week, a month, a year. If I see some amazing flash game, then I'm going to want to download it, in case I want to go back and look at it, and it isn't on your site anymore. I have no control over what content remains on the internet, but I can at least control the contents of my own hard drive, and make sure that things that I find to be cool don't vanish.

    And again: This applies to both games and movies. I downloaded and saved "Lobster Magnet" when it came out, because it was COOL. I downloaded and saved Xiao-Xiao's shooting game when it came out, becaue it was COOL. Does this mean I never check back in on Xiao-Xiao's site? Heck no. I want to see what he's come up with new! But it DOES mean that I'm seldom willing to put up with several pages of advertising every time I want to see xxxxx cool flash movie.

    Again, these browsing habits are my own, and probably arn't everyone's. And Ray, as your viewers demonstrate, quite a few people don't browse like me.

    But still, for me, since I'm on a dial-up, (and adds are painfully slow), don't count on me for repeat viewing to fuel your add banners. In general, if I have to choose between braving a bunch of adds, and not playing some game/movie, then I'll usually just opt to skip the adds, and go find something less bandwidth-intensive to interest me.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center