3D Rad - Free 3D game maker - Forum

This forum is now archived!

This forum is locked, and is a read-only version. A new community-ran forum can be found at classdev.net

News:

The 3DRad community can be found at classdev.net.

Pages: 1 [2]

Author Topic: Same Name Variable  (Read 747 times)

« Reply #15 on: October 18, 2013, 11:38:11 AM »
Unless you are going to distribute this on the mass media market, I wouldn't worry too much about encrypting save files.  I'm leaving mine open so people can look under the hood and 'cheat' in the game if they so choose.  But, you could also 'hide' the save data in .dat files in folders and files that have obscure names and wouldn't lead someone to believe that their save data was in there, but that's just one way. 

I'm going to do this because I want to help, even though I believe it will confuse you even more.  Attached is a script I got from here (cant remember who made it at the moment) which shows a way to encrypt data.
« Reply #16 on: October 18, 2013, 11:44:53 AM »
EDIT: Posted at the same time. Yeah, Sorvius is right.

But I have a question: how can encrypt save file? because when I save my variable with iFileWriteOpen () and iFileValueWrite () Functions, any use can edit it with notepad and make all efforts are useless.

Yep, it's something I've thought about as well. The easiest step would be using another extension than .txt. You can make up your own extension, like '.savedata'. The files can still be opened using NotePad, but most players won't realise.
Another method would be saving the file as .bin or even .jpg. This will definitely confuse anyone trying to open the file.
You could also save the data along with a lot of rubbish to prevent anyone from finding the 'real' values.
Furthermore, you could for example save your strings in the ASCII code. The average 'hacker' won't understand it.
And finally, you could use some childhood code words. Simply add x to the ASCII number of every character.

This discussion has been here before. Search the forum.
Rocket Rumble, a 3D Rad puzzle game:
http://www.3drad.com/forum/index.php?topic=9896.0
« Reply #17 on: October 18, 2013, 12:36:30 PM »
Quote
I'm going to do this because I want to help, even though I believe it will confuse you even more.  Attached is a script I got from here (cant remember who made it at the moment) which shows a way to encrypt data.

Thanks Sorvius, good work. :o
But This script is very hard to understand because I don't work with arrays.

Quote
you could for example save your strings in the ASCII code

Thanks Roberto. :D
what is Function can convert string files to ASCII code?
My Game : Star Wars 1.0

http://behdadgame.com/index.php?topic=3.0

possible way, if we found will make a way.
« Reply #18 on: October 18, 2013, 01:14:34 PM »
what is Function can convert string files to ASCII code?

No function needed.

void Main()
{
   string temp = "Hello World!";
   int var1 = temp[0]; //Returns the code of the first character in the string.
   int var2 = temp[1]; //Returns the code of the second character in the string.
   //Etc.
}

You can consider a string as an array of integers. Each of the items in the array holds a number which corresponds with a code in the ASCII table. If your programming is not that advanced yet, you can just ignore this last bit. It doesn't matter much.
Rocket Rumble, a 3D Rad puzzle game:
http://www.3drad.com/forum/index.php?topic=9896.0
« Reply #19 on: October 18, 2013, 01:51:53 PM »
Thanks Roberto but I still edit it with notepad.  :(

Code: [Select]
string StrsaveName = "Save.dat";
int chname1 = StrsaveName [0];
int chname2 = StrsaveName [1];
int chname3 = StrsaveName [2];
int chname4 = StrsaveName [3];
int chname5 = StrsaveName [4];
int chname6 = StrsaveName [5];
int chname7 = StrsaveName [6];
int chname8 = StrsaveName [7];

void Main()
{
  // Save Function
}
« Last Edit: October 18, 2013, 01:53:53 PM by behdadsoft »
My Game : Star Wars 1.0

http://behdadgame.com/index.php?topic=3.0

possible way, if we found will make a way.
« Reply #20 on: October 18, 2013, 02:00:13 PM »
Here's an idea, make it work first and THEN try to add to it.  When you think big (like I do), you have to step back and get the thing to work first and then add to it and enhance it later on.  Encrypting your saves isn't priority right now, its getting the game published in some stage of development.  We (I) will help you as you go, but make something we can play first, and if we edit our save files, that's our business :)
« Reply #21 on: October 18, 2013, 02:09:44 PM »
... and if we edit our save files, that's our business :)

I second this. Unless you're game is multiplayer, where changing the score will be detrimental to the multiplayer experience - then it really shouldn't matter if the player edits their score, gives themselves more bullets, or whatever.

At the end of the day - they'll just spoil their own experiences.

« Last Edit: October 18, 2013, 02:23:08 PM by Grimbarian »
« Reply #22 on: October 18, 2013, 08:22:32 PM »
Even so, in the case of a multiplayer game, any save data you had would be checked by the server.  So, even if you changed it locally, they would just get read from the server and update to what they were.  at least that's how casual games do it to prevent cheaters xD

Think about piracy.  Some of the most successful indie games get their exposure from pirates making their game available for free.  They may lose money on some downloads, but if they try to crack down on saving their precious game data (like what EA does), people complain and attack them for being too worried about what people will do with their product.  If I buy a car, I am free to drive it into a lake even if the manufacturer gives it state of the art safety features :)
« Reply #23 on: October 18, 2013, 11:32:30 PM »
I agree encrypting your files is not extremely important, but it would be nice to know how to.

Thanks Roberto but I still edit it with notepad.  :(

I don't think you understand what I meant.
Of course the files would still be editable with notepad, however, the use would have no clue about what to change.

Tomorrow morning I might give an example.
Rocket Rumble, a 3D Rad puzzle game:
http://www.3drad.com/forum/index.php?topic=9896.0
« Reply #24 on: October 19, 2013, 12:14:47 AM »
Quote
I don't think you understand what I meant.
Of course the files would still be editable with notepad, however, the use would have no clue about what to change

Quote
Thanks Roberto but I still edit it with notepad.  :(

I mean Content my save file don't change and all variables displayed as before.

Quote
Tomorrow morning I might give an example.

Thanks.
My Game : Star Wars 1.0

http://behdadgame.com/index.php?topic=3.0

possible way, if we found will make a way.
« Reply #25 on: October 19, 2013, 08:12:14 AM »
Hey behdadsoft, I'd like to see what you have made so far, no matter how broken or unfinished it might be.
« Reply #26 on: October 19, 2013, 02:24:56 PM »
Quote
Hey behdadsoft, I'd like to see what you have made so far, no matter how broken or unfinished it might be.

I busy make a commercial car game, and show some parts soon. ;)
My Game : Star Wars 1.0

http://behdadgame.com/index.php?topic=3.0

possible way, if we found will make a way.
« Reply #27 on: October 21, 2013, 01:09:34 PM »
Quote
Hey behdadsoft, I'd like to see what you have made so far, no matter how broken or unfinished it might be.

I busy make a commercial car game, and show some parts soon. ;)

You can't make a commercial game form start to finish and then release it, you have to show parts as you develop, especially if you have so many questions.  I have released an iteration for every block of development so far based on the feedback I got from people on this forum, and so far it is going well.  You seem to be stuck in the trap of thinking that someone will steal your ideas or you will spoil the game if you show anything before it's ready, but if you show nothing at all it will bite you in the future. 

Do what you want, but I know this from experience.

-Sorv
Pages: 1 [2]