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

Author Topic: People messing with my programs.  (Read 4030 times)

0 Members and 1 Guest are viewing this topic.

Dennis

  • Newbie
  • *
  • Posts: 3
    • View Profile
People messing with my programs.
« on: December 01, 2016, 08:36:04 pm »
I don't want people to see all photo's and data files of the game. because they can cheat and its annoying to send them all one by one. i can put them in a winrar file but not everyone has winrar. so is there a way i can put all
files in the exe file?

jamesL

  • Full Member
  • ***
  • Posts: 124
    • View Profile
Re: People messing with my programs.
« Reply #1 on: December 01, 2016, 09:51:51 pm »
every windows computer can extract .zip files 

I'm sure every mac and linux can too

if your game is worth cheating then people are going to cheat
they'll just use cheatengine or something else 

putting everything an exe would make it huge
if its even possible

how would you do character saves ?

Hapax

  • Hero Member
  • *****
  • Posts: 3379
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: People messing with my programs.
« Reply #2 on: December 03, 2016, 01:33:26 am »
Images (etc.) are usually pretty easy (to some extent) to "rip" regardless of security steps.

Storing each file separately isn't the worst thing ever.

That said, you could "pack" them into a single file (it doesn't have to be compressed) by just having them all concatenated.

It is possible to build resources into the executable file. There are a few ways to do this depending on the operating system. One way is to convert your resource file into a series of comma separated values and add them to a header file as a const object. Note this may slow down your build.
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

nat8

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: People messing with my programs.
« Reply #3 on: December 05, 2016, 03:41:38 pm »
A lot of games use custom data containers to obfuscate assets, which wouldn't be hard to implement, and would be enough to deter most. For a small dataset I'd use a simple format of [id, filesize, data] for each asset, then concatenate. You'd reference the assets in your code by id, load the entire dataset upon loading, find the asset you require with a simple linear search, and call for example  texture.loadFromMemory() instead of texture.loadFromFile. For bigger projects you may want to separate the data from the metadata, to allow loading the data only when needed (and fancier things like binary-search). A helper tool to create the container from a directory would be recommended to ease asset updates.

A step beyond that would be encrypting the file so that the assets couldn't be retrieved with file dump tools (so they'd need to dump the files from memory), but that seems like overkill on what may already be overkill.

 

anything