Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
4 registered members (AndrewAMD, Quad, soulman3, Ayumi), 675 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Missions Info saved in extern file... Gamer shouldn't manipulate #397923
03/25/12 19:05
03/25/12 19:05
Joined: Aug 2008
Posts: 394
Germany
Benni003 Offline OP
Senior Member
Benni003  Offline OP
Senior Member

Joined: Aug 2008
Posts: 394
Germany
Hello, I have one big problem...
I want to save the information, witch Missions the gamer have already done in an extern txt file. The problem is that the gamer can easily manipulate the informations so that all missions are free to play. Is there an other possibility to save this information? I would be thankfull for every help..

Re: Missions Info saved in extern file... Gamer shouldn't manipulate [Re: Benni003] #397925
03/25/12 19:17
03/25/12 19:17
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline
Expert
Espér  Offline
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
uhm.. encryption.. change the ANSI chars ^^

this page should help you:
http://www.conitec.net/beta/str_setchr.htm

simple use str_getchr in a loop, to readout every sign of your save-file, and set a new char on this position with str_setchr.
All you need to do is thinking of an encryption-alogrithm, so you can decrypt the files ^^


Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: Missions Info saved in extern file... Gamer shouldn't manipulate [Re: Espér] #397933
03/25/12 19:49
03/25/12 19:49
Joined: Aug 2008
Posts: 394
Germany
Benni003 Offline OP
Senior Member
Benni003  Offline OP
Senior Member

Joined: Aug 2008
Posts: 394
Germany
Sure, this will help me! Thank you Esper laugh

Re: Missions Info saved in extern file... Gamer shouldn't manipulate [Re: Espér] #397935
03/25/12 19:52
03/25/12 19:52
Joined: Oct 2011
Posts: 1,082
Germany
C
Ch40zzC0d3r Offline
Serious User
Ch40zzC0d3r  Offline
Serious User
C

Joined: Oct 2011
Posts: 1,082
Germany
I think he means with easily that you can use save files from other people...
The game will not see if its cheated, even not with encryption...
Try to write your own savefunction. I would make a vb program which write it to registry and just call this program with exec!

Last edited by Ch40zzC0d3r; 03/25/12 19:52.
Re: Missions Info saved in extern file... Gamer shouldn't manipulate [Re: Ch40zzC0d3r] #397937
03/25/12 20:01
03/25/12 20:01
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline
Expert
Espér  Offline
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
uhm.. that´s easy, too

simple create a variable, that gets a random value at first startup. write this variable in a encrypted config file to load it on every new startup.

now, write that value as "Game ID" into the save file
When loading the file, check if the value from the save file and the one from the config file are the same


But I think that there is no 100% sure way to protect files from being changed or manipulated.


Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: Missions Info saved in extern file... Gamer shouldn't manipulate [Re: Espér] #397953
03/25/12 21:47
03/25/12 21:47
Joined: Aug 2008
Posts: 394
Germany
Benni003 Offline OP
Senior Member
Benni003  Offline OP
Senior Member

Joined: Aug 2008
Posts: 394
Germany
Yes, I had also this idea, but how does the engine know if it's the first startup?

Re: Missions Info saved in extern file... Gamer shouldn't manipulate [Re: Benni003] #397958
03/25/12 22:07
03/25/12 22:07
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
If you are saving to the registry...(my preferred suggestion)
(make sure the registry key name/path SOUNDS like it has nothing to do with your game)

At run-time, try to open the registry-entry that hold the ID-key.
a> If it suceedes, it is NOT the first time, so use ID-key from the registry.
b> If it fails, generate a new random ID-key, save to the registry, and use that key.


If you are saving to a config file...(I advise against)
Create a config-file (during installation) that contains an 'invalid' key_id.
Also try to hide the ID-key in the middle of lots of useless data. Another also,
try to name this config file so it doesnt SOUND like a config file, say EXE.


At run-time, open the config file and read the ID-key.
a> If it matches the 'invalid' ID-key, it is the first time, so generate a
new VALID ID-key and save it to the config file.
b> If it doesnt match the "invalid" ID-Key, then is it a VALID ID-key so use it.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Missions Info saved in extern file... Gamer shouldn't manipulate [Re: Benni003] #397960
03/25/12 22:08
03/25/12 22:08
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline
Expert
Espér  Offline
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
create a dummy config file, and read this out. Save each line into a string.
Now, check with str_len, if the string is empty

f.e. in a decrypted file:

Quote:
resolution=
difficulty=
mapname=


now you read that out. The result would be:
string1 = "resolution="
string2 = "difficulty="
string3 = "mapname="

Now you know
"resolution=" has 11 signs..
so ask
Code:
if(str_len(string1) > 11)


now you can clip the first signs away, if the string is longer than 11 signs:
Code:
if(str_len(string1) > 11)
{
    str_clip(string1, 11);
}



what happens:
If the string is longer than "resolution=", the prefix is clipped away.. so string1 only contains the config


Now you asked how the engine recognizes the first startp..

really simple..
create a point called

"firstup=
game_id="
in your config file.. and ask if theres a value behind "firstup=" ^^
if NO, it´s the first startup. if YES, the engine should read the game_id wich is saved one string later.


Edit:
Got ninjad by EvilSOB.. Dude.. so fast >.<

Last edited by Espér; 03/25/12 22:08.

Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: Missions Info saved in extern file... Gamer shouldn't manipulate [Re: Espér] #397983
03/26/12 08:24
03/26/12 08:24
Joined: Aug 2008
Posts: 394
Germany
Benni003 Offline OP
Senior Member
Benni003  Offline OP
Senior Member

Joined: Aug 2008
Posts: 394
Germany
OK, thank you EvilSOB, I did it with the registry-entry and it's good working!
Thank's also to Esper wink

Re: Missions Info saved in extern file... Gamer shouldn't manipulate [Re: Benni003] #397986
03/26/12 09:02
03/26/12 09:02
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Benni003: Cool. Glad to hear it!

Esper: I may have ninjad you, but my post was JUST a text-wall.
Your post is pretty, with formatting, and code samples an stuff.
Much more time-consuming...


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Page 1 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1