Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Distributing SFML games on other websites.  (Read 18985 times)

0 Members and 1 Guest are viewing this topic.

Viruses

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
Distributing SFML games on other websites.
« Reply #15 on: January 22, 2012, 08:38:44 pm »
Well im not really afraid of people "taking" my assets. In fact, i couldnt care less. Its just that if they MODIFY them and then they play the game, they get to play the game with watever thing they make. So for example, in a 3D game you might have to pay money in order to get some items or clothing. Some clothing is only for looks. So lets say you modify the game and then you get to get the clothing for free because you modified it YOURSELF. So now the developers lose money because you get everything for free by doing it yourself. Now im talking about online 3D games and im making 2D games which arent even good, so you might ask that why do i care? Well i just want to learn from now how to lock my assets. And also ive noticed that in games directories they have file formats(like ".pak" or something) that are unknown and those formats contain the scenes and models or watever. So do i have to make my own formats to protect my assets?

texus

  • Hero Member
  • *****
  • Posts: 501
    • View Profile
    • TGUI
    • Email
Distributing SFML games on other websites.
« Reply #16 on: January 22, 2012, 08:58:32 pm »
Quote
Its just that if they MODIFY them and then they play the game, they get to play the game with watever thing they make.
If they would modify the models, then on your computer your player will look a little different, but you only changed your own models so all other players would still see you with your old clothes.
The clothes might look different to u, but its not like you get a better defense or something like that.

Quote
So for example, in a 3D game you might have to pay money in order to get some items or clothing. Some clothing is only for looks. So lets say you modify the game and then you get to get the clothing for free because you modified it YOURSELF.
They can't just add new clothes, your game decides what models are loaded.
If you decide that certain models are only loaded after they pay then it doesn't matter if they add the models to the files or not.

There isn't that much for people to change. I wouldn't bother about it.

Quote
So do i have to make my own formats to protect my assets
You can always make your own encryption and decode all files when the game starts, but then the loading would take longer.
TGUI: C++ SFML GUI

Viruses

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
Distributing SFML games on other websites.
« Reply #17 on: January 23, 2012, 12:50:58 am »
Ok.. I downloaded this game 2D and for some reason it only has a music file and an exe file. Where did all the dlls, assets go?? How come only the executable is needed in some games that you download and it runs fine? Also, if they change the artwork then the game will actually run with that specific picture. All they have to do is open with paint or photoshop or something and then they can modify it and play with that. I know this because i did it myself..

model76

  • Full Member
  • ***
  • Posts: 231
    • View Profile
Distributing SFML games on other websites.
« Reply #18 on: January 23, 2012, 12:58:22 am »
Ah, the old "But what if the users won't pay?"

Well, it's pretty simple: If they won't pay, they aren't customers, and you simply shouldn't care about them.

The old "Our game didn't sell because of pirates!" is just a bullshit line that some developers use to try to get investors to give them more money, even though they didn't get their market research right for their previous game.

Don't waste your time on that stuff.

MarekkPie

  • Newbie
  • *
  • Posts: 19
    • View Profile
Distributing SFML games on other websites.
« Reply #19 on: January 23, 2012, 02:33:03 am »
I think something like DLC or microtransactions don't fall under the economic theory that stolen material from otherwise non-buyers doesn't count as lost sales.

Suppose person A buys the game and person B pirates the game. Person A has been shown to be willing to pay for the game, while person B may or may not have bought the game otherwise. In this situation, that theory holds.

Now suppose person A then pirates the DLC costumes or whatever microtransaction nonsense. This is undeniably lost sales, since person A was willing to purchase the game, but unwilling to buy the DLC. Since owning the game is a pre-requisite, they are willingly stealing content that they would have paid for if it came in the original game.

That said, I agree that Viruses is thinking too hard about this NOW, when there are already so many things stacked against him (or anyone for that matter) making any money. Make a game (or a few games), get a handle on your skills, and if you think you've made a game that will earn you money, then start worrying about it. I doubt that the security of your games content is the first thing you need to worry about, or is even required until you have a completed product.

texus

  • Hero Member
  • *****
  • Posts: 501
    • View Profile
    • TGUI
    • Email
Distributing SFML games on other websites.
« Reply #20 on: January 23, 2012, 03:59:27 pm »
Quote
Where did all the dlls, assets go??

I still think that it is better not to worry about all those problems, but if you distribute the game for windows only then you can do some things:
- link statically (if possible), then there will be no dll files.
- You can add your images as a resource in your exe. This is probably what they did with the 2D game you were talking about.
Do note that there are ways to extract the resources from the exe. I wouldn't be surprised that you would find the images inside that exe file of the 2D game.

If you really care about it then do what I said before: encrypt your files in some way and change the extension. Nobody will ever understand how to open these file unless they start disassembling your exe file.
TGUI: C++ SFML GUI

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
Distributing SFML games on other websites.
« Reply #21 on: January 23, 2012, 05:24:24 pm »
There is no protection, and there will never be one. Security through obscurity has no benefits, you waste your time.

Look at all the protections of nowadays games/music/programs. Do you know a single product that has not been cracked? Save your customers the trouble and don't rape their rights on the product they bought.

It's like selling a car and disallowing the customer to repaint it. Forcing limited freedom at the customer's side is never a good idea imho. And like someone said in this thread: Piracy will always happen, but the majority of the guys downloading your stuff illegally wouldn't buy your product if they hadn't have the chance to download it.

Just concentrate on making the game. And enjoy the PR you automatically get when people can change stuff easily (e.g. they tell their friends "This game is cool, look what I've added to it!").

Viruses

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
Distributing SFML games on other websites.
« Reply #22 on: January 28, 2012, 01:57:22 am »
How do i encrypt my files?

texus

  • Hero Member
  • *****
  • Posts: 501
    • View Profile
    • TGUI
    • Email
Distributing SFML games on other websites.
« Reply #23 on: January 28, 2012, 12:49:47 pm »
Quote from: "Viruses"
How do i encrypt my files?

You will probably want a unique encryption so that nobody knows how to decode it.
The problem is that you will have to do this completely by yourself.

Start with writing a simple encryptor program: read the file and add 1 to every byte. Then save the file with a different extension.
Nobody will be able to open it now. Only your game can read it, because it reads the file and decrements every byte before is starts.

For a stronger and more secure encryption you will have to make a better formula (not just adding 1). You do this by adding, subtracting and multiplying bytes with each other.
Eventually you can even use more bytes for your file (original is e.g. 1kb while the encrypted version is 2kb).
But always make sure that the encryption can be reversed by your game.


Although the above will give you a little bit more protection, I completely agree with what the other people already told you: nothing is completely secure.
I wouldn't waste my time in writing a good encryption and I would want my game to be good: not letting it start slower because it first has to decode every file.
TGUI: C++ SFML GUI

julen26

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
    • http://julen26.blogspot.com
Distributing SFML games on other websites.
« Reply #24 on: January 28, 2012, 01:31:43 pm »
Use xor encryption with each byte.

Code: [Select]
A xor B = C // encrypt
C xor B = A //decrypt


You can use B as your password for your encryption.

Viruses

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
Distributing SFML games on other websites.
« Reply #25 on: January 28, 2012, 08:50:51 pm »
Okay then i wont worry about encryption.. but about what texus said earlier that you can have resource inside .exe, how do you do that? And also, is there a way in SFML, that i can change the directory of my assets? So like for example, in my game folder i will have a subfolder named "Sprites" and then put all my sprites in there. The problem is that when i used sf::Texture::LoadFromFile it only looks in the game directory, not the sub folders.

texus

  • Hero Member
  • *****
  • Posts: 501
    • View Profile
    • TGUI
    • Email
Distributing SFML games on other websites.
« Reply #26 on: January 28, 2012, 09:02:53 pm »
Quote
The problem is that when i used sf::Texture::LoadFromFile it only looks in the game directory, not the sub folders.

You can just call LoadFromFile("subfolder/filename").

Quote
you can have resource inside .exe, how do you do that?

It is a long time ago I did this, you should just search information about using resources in Visual Studio.
TGUI: C++ SFML GUI

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
Distributing SFML games on other websites.
« Reply #27 on: January 28, 2012, 09:28:59 pm »
Sigh, I give up.

TechRogue

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
Distributing SFML games on other websites.
« Reply #28 on: January 28, 2012, 11:31:46 pm »
Don't worry Tank. Five abandoned projects later and maybe he'll take your advice.  :wink:

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Distributing SFML games on other websites.
« Reply #29 on: January 29, 2012, 12:59:09 am »
Quote from: "Tank"
There is no protection, and there will never be one.


Oh, but of course there is... but it is on such a level higher than what is popularly known that it might not even count.

Distribute a thin client that forwards user input to a server and does nothing else but draw the primitive data it receives to the screen. That way, that which is unique to the game (it's mechanics) never gets fully exposed to the end user. Of course the resources that you send the user will be on his system and thus Tank's other points count. But he won't have the game without it's mechanics will he? This will of course only work if your users all have a 1Gbit connection and <1ms network latency, oh wait...

Hope those AAA game companies didn't see this. Ah *$%#, too late :evil:

Why do I release my code under GPL and then write stuff like this? I will never know...
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

 

anything