News for hackers. Stuff that matters.
Re:Linus Torvalds: “I'm happily hacking on a new save format... by Touche on Friday March 07, 2014 @10:42AM (#7360816)
That's how people are going to cheat at your game.
Re:Linus Torvalds: “I'm happily hacking on a new save format... by roryokane on Friday March 07, 2014 @02:12PM (#7362105)
I had a lot more fun recently playing the free game Boson X for PC (http://www.boson-x.com/) than I would have otherwise because I discovered that the game folder contains editable Lua scripts. The scripts control the game physics, scoring system, controls, level data, and more.

I’ve created mods of the game where you fun faster but gravity is stronger, and where all levels are randomly mixed into one level, and where the dangerous falling platforms also give you energy while you’re on them, and where the sound effects give the player clearer feedback on what they’re doing. And though I could cheat by multiplying my score by 1000 and submitting it online, I actually have been careful to always comment out the high-score saving and submission code in each of my mods.

I like the game much more than if the developers had obfuscated the Lua files so I couldn’t read and edit them.

Re:Linus Torvalds: “I'm happily hacking on a new save format... by outworlder on Friday March 07, 2014 @01:35PM (#7361862)
The save format does not matter at all. It wouldn't matter even if it were an obscure, made-up format. All it would do is slow down 'cheaters' by half an hour.

The only argument against human-editable text files is parsing speed, not security.

Re:Linus Torvalds: “I'm happily hacking on a new save format... by dinkumthinkum on Friday March 07, 2014 @07:59PM (#7363759)
Data size has a bit to do with it. Not trying to be pedantic, just adding that.
Re:Linus Torvalds: “I'm happily hacking on a new save format... by phn on Friday March 07, 2014 @12:15PM (#7361403)
Cheating is good, I remember having tons of fun with age of empires and sim city because I used cheat codes.

If the player has fun, it's a nice feature! :D

Re:Linus Torvalds: “I'm happily hacking on a new save format... by dfc on Friday March 07, 2014 @12:44PM (#7361594)
And what about the people competing against the happy cheater?
Re:Linus Torvalds: “I'm happily hacking on a new save format... by baq on Friday March 07, 2014 @02:26PM (#7362188)
in a single player game with save games on local disk? this question is nearly trolling.
Re:Linus Torvalds: “I'm happily hacking on a new save format... by ANTSANTS on Friday March 07, 2014 @06:29PM (#7363448)
Some people do compete for speed or score in single player games. Arcade games have always had scoreboards, modern "arcade-style" games have online ones, and a community can turn any solitary activity into a competitive one:

http://speedrunslive.com/

http://speeddemosarchive.com/

Speedrunners are an exceptional case, but I think everyone gets a little annoyed when they look at a leaderboard and all the top players have scores of UINT_MAX or times of 0 seconds.

Obviously cheaters will find a way regardless of whether you give them the source code or not, I'm just saying dfc's concern is not totally ridiculous.

Re:Linus Torvalds: “I'm happily hacking on a new save format... by phn on Friday March 07, 2014 @07:50PM (#7363727)
I DO get annoyed when I see those scores, but in a lot of cases even having a leaderboard is just something that was introduced in the game just to be more "social" and less because it makes sense in that specific game.

And yes, it's not ridiculous, on the contrary, it's perfectly understandable.

Of course, these kinds of questions depend a lot on the game in question, and I think they don't have a definitive answer :)

Re:Linus Torvalds: “I'm happily hacking on a new save format... by baq on Saturday March 08, 2014 @10:43AM (#7365447)
oh don't get me wrong, i love speedrunning and trickjumping competitions, except that they always should require the whole replay - and even then you can't be sure if the whole thing was or wasn't TASsed.
Re:Linus Torvalds: “I'm happily hacking on a new save format... by phn on Friday March 07, 2014 @07:42PM (#7363704)
Of course, in multi-player competitive games anti-cheating is a pretty big concern, because it works against the purpose of the game: a competition with well defined rules and conditions.

If the core of the game is single-player/non-competitive, why should we be so worried about cheating?

Re:Linus Torvalds: “I'm happily hacking on a new save format... by jethro_tell on Friday March 07, 2014 @11:35AM (#7361158)
Plot twist, It's actually a 'teach yourself lua game'
Re:Linus Torvalds: “I'm happily hacking on a new save format... by chris_mahan on Friday March 07, 2014 @01:05PM (#7361732)
so level 38 is "figure out how to write the answer by editing the save file?"
Re:Linus Torvalds: “I'm happily hacking on a new save format... by arh68 on Saturday March 08, 2014 @09:19AM (#7365215)
Why not level 7? By 38 the player could be fixing bugged waypoints, profiling out bad O(n!) code, resetting time to get a specific time-based drop, tweaking character attributes to make puzzles/quests easier, etc. The savefile just becomes another interface to play with.

Gives a fresh angle on the 'open world' type game.

Re:Linus Torvalds: “I'm happily hacking on a new save format... by chris_mahan on Monday March 10, 2014 @07:20PM (#7376358)
Reminds me of tweaking the Colonization game (1991?) by editing text files...
Re:Linus Torvalds: “I'm happily hacking on a new save format... by jiggy2011 on Friday March 07, 2014 @11:02AM (#7360939)
Does it matter unless the game is multiplayer, in which case you should assume that client files are untrustworthy anyways.
Re:Linus Torvalds: “I'm happily hacking on a new save format... by mrcharles on Friday March 07, 2014 @02:05PM (#7362052)
There are ways around it but if people want to cheat their own SP experience who am I to stop them? We'll obfuscate a bit to dissuade casual users but I don't know that I've ever encountered a game that didn't have some level of save hacking available.

Hell, I've used it myself more than a few times.

Re:Linus Torvalds: “I'm happily hacking on a new save format... by 6d0debc071 on Friday March 07, 2014 @10:56AM (#7360906)
Hash the information and include the hash in the file. If the hash and the contents don't match when you try to load it, you can refuse it.

If not loading things is important to you, mind.

Re:Linus Torvalds: “I'm happily hacking on a new save format... by scott_karana on Friday March 07, 2014 @12:48PM (#7361621)
What's to stop people from re-hashing the changed file? :)
Re:Linus Torvalds: “I'm happily hacking on a new save format... by roryokane on Friday March 07, 2014 @02:15PM (#7362120)
You could hash the file contents plus a salt that is contained within the application binary. Most people wouldn’t know how to extract the salt from the binary so they could get the hash right. Though I guess if people are determined enough to hack your game, one hacker might just publish the salt or a small program to rehash files for you. If a user has enough time on their hands, there’s nothing you can do to stop them from running your software in a VM with a debugger and finding out its secrets; the best you can do is making that hard enough that people won’t bother.
Re:Linus Torvalds: “I'm happily hacking on a new save format... by 6d0debc071 on Friday March 07, 2014 @02:23PM (#7362174)
Lack of knowledge, lack of interest.

If you wanted more security, you could keep a secret that you don't include in the saves but do include when you calculate the hash, so that anyone who doesn't have the key is going to get the wrong answer. That's about as far as I'd consider going for relatively trivial data like save games. Though that's, in principle, discoverable if someone's sufficiently interested.

After that point, it becomes much simpler for someone to watch the memory associated with your program and extract/alter the values there. (Programs to do that to games are generally called Trainers.) That's not a complicated thing to do unless someone's tried to stop you doing it.

There are some techniques to provide some degree of security there. Changing where in memory you place your information each time springs to mind, thus making it more difficult for people to find out where the values are and then share their locations. However, even that's not perfect. Depending on how sure you want to be that no-one's going to alter the values, you're potentially looking at requiring very deep knowledge of security there.

After that point the next easiest target may be the program file itself.

That said, if you want to get around that sort of problem and you're really serious about it, then running your encryption in an environment that hostile may be making things more difficult than they need to be. You might use a trusted platform module, to try to make the environment you were in less hostile, if one were present on the user's machine. But, honestly, I'd want the information not to be stored or calculated on the user's machine if it were that valuable. Have the user's end be the input, encrypt their signals with your public key, and do the calculations that you needed to be sure of remotely.

Though then the user has to trust you. I wouldn't usually advocate that my users trust me that much - not unless we were dealing with a situation where the information we were talking about was entangled with others in some way such that a reasonable argument could be made that they didn't own it, and I was just the best common arbiter I could think of.

-she shrugs awkwardly-

You can get yourself into a situation where it's probable that the amount of effort someone would have to invest is vastly greater than the likely value of the information fairly easily. But ultimately it's a question of how expensive you want to make things and what that's worth to you. Against a sufficiently dedicated adversary, with a sufficiently valuable target, there are so many unknowns in computer security that I wouldn't even be sure that storing the data on your server would be sufficient ^^;

Re:Linus Torvalds: “I'm happily hacking on a new save format... by saucetenuto on Friday March 07, 2014 @10:47AM (#7360850)
It's only cheating if the developer disapproves.