Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (107)
games submitted by our members
Games in WIP (536)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Simple hiscore encryption  (Read 1303 times)
0 Members and 1 Guest are viewing this topic.
Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Posted 2004-05-11 12:11:22 »

Hiscores are nothing fancy, but I really need to be able to persist them between games, othewise they're not much use. How have others done this?

My first thought would be to write the output as text ('cos then its nice and easy to parse) and encrypt it somehow, but I'm not sure if theres any built-in encryption that I can lay my hands on.

Second thought would be to stick the text into a zip file and stick a password on the zip, but I can't see any functionality for using passwords on zip files Sad

Lastly (and weakest) would be just to write the output as binary and hope people can't really be bothered looking at it closely...

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline princec

JGO Kernel


Medals: 343
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #1 - Posted 2004-05-11 13:16:59 »

If you just serialize it as normal Java serialized data no-one's going to look at it.

Cas Smiley

Offline abies

Senior Member





« Reply #2 - Posted 2004-05-11 13:50:51 »

At work, I use persistence scheme which serialized objects to database and after a year I'm able to recognize a lot of info by just looking at binary dump  Wink

Easiest IMHO would be to gzip stream and then just do something so header will not be recognized - prepend it with few bytes, or xor entire stream with some arbitrary algorithmic serie. Compression is good enough to scare away any people looking for localized changes for specific field differences. Just make sure that they are not automatically opened in Total Commander Smiley

Artur Biesiadowski
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline cfmdobbie

Senior Member


Medals: 1


Who, me?


« Reply #3 - Posted 2004-05-11 14:02:59 »

...and any obfuscation you add is irrelevant the moment someone decompiles the source.

If it's important that no one alters the saved data, you wouldn't be writing the app in Java and wouldn't be running it on the client.  Go for something simple that takes no time to implement, and just ignore those who try to mess with things.

Hellomynameis Charlie Dobbie.
Offline darcone

Junior Member




Size matters


« Reply #4 - Posted 2004-05-11 23:05:34 »

Yeah, and make the highscore only list last few days entries so that cheaters will have to do it every week (in which case you can identify and hopefully ban them)
Offline D.t.O

Junior Member




Psych'd about Java Games


« Reply #5 - Posted 2004-05-12 02:49:29 »

If you feel like it, use javax.crypto. Quite simple to use, I can show you an example if you want.

Or, you can amuse yourself by inventing your own encryption scheme. Combine Caesar with some other simple algorithms, and it'll be kinda hard to break.

If people can decompile your bytecode, however, it's a different story. Sad

Enjoy.
Regards,
     - D.t.O
Offline JuddMan

Senior Member


Medals: 1


Your Ad Here


« Reply #6 - Posted 2004-05-13 14:18:03 »

imo, unless there are prizes to be won, i would just zip it, or not even bother. i remember editing the hiscore file in minesweeper a few years back (they prevent that now), and so what if my time was amazing or whatever...

seing as the hiscore would be on the client in your case, i guess there aren't giveaways involved, so let the nuts out there have their hollow bragging rights.
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

CogWheelz (13 views)
2014-07-30 21:08:39

Riven (21 views)
2014-07-29 18:09:19

Riven (14 views)
2014-07-29 18:08:52

Dwinin (12 views)
2014-07-29 10:59:34

E.R. Fleming (32 views)
2014-07-29 03:07:13

E.R. Fleming (12 views)
2014-07-29 03:06:25

pw (42 views)
2014-07-24 01:59:36

Riven (42 views)
2014-07-23 21:16:32

Riven (29 views)
2014-07-23 21:07:15

Riven (30 views)
2014-07-23 20:56:16
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!