The Daily Click ::. Forums ::. Klik Coding Help ::. Program losing focus, events being skipped
 

Post Reply  Post Oekaki 
 

Posted By Message

Nicholas S Wilson



Registered
  23/02/2004
Points
  20
12th August, 2004 at 14:34:54 -

Ok guys I'm staring at code for an RPG I'm working on; and when you win a battle, a temporary INI file is to receive the item you win in combat. Normally this INI is encrypted, so in the course of like eight events, the file is decoded; the INI is written to, and then the file is encoded again; and finally the game skips to the next frame when all of that should be done.

Problem: About 90% of the time I run the game; one of these events doesn't run. The game simply decides not to encode the file; and I'm left with a naked temp.ini.

Questions:
- Are events like this prone to not run for some reason:

If Alterable Value C of Hero = 5 -> Set Alterable Value C = 6 Decode INI
Run this event once

If Alterable Value C of Hero = 6 -> Set Alterable Value C=7 Write to INI
Run this event once

If Alterable Value C of Hero = 7 -> Set Alterable Value C=8 Encode INI
Run this event once

If Alt Value C of Hero = 8 -> Next Frame
Run this event once

- What could possibly be causing this to happen so many times, I have the events set now where C isn't even incremented like that, it's incremented in a separate event every 1 second; that's a HUGE time frame it shouldn't have any problems... right?

 
whoops

Noyb



Registered
  31/05/2004
Points
  1117

VIP Member
12th August, 2004 at 17:55:53 -

Why split it up into multiple events? Is the INI encoded to begin with?

 
"Omg. Where did they get the idea to not use army guys? Are they taking drugs?" --Tim Schafer on originality in videogames

Nicholas S Wilson



Registered
  23/02/2004
Points
  20
13th August, 2004 at 01:46:43 -

Yes the INI is initially encoded.

Phizzy: You're right; the events take precedence in the right order.

But it's doing the same thing it's done all day, it decodes the INI, puts in the value... but it just refuses to encode. I'm beginning to wonder if it isn't just this damned machine...

 
whoops

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
13th August, 2004 at 05:29:41 -

What encryption object are you using?

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Nicholas S Wilson



Registered
  23/02/2004
Points
  20
13th August, 2004 at 16:11:32 -

I'm using "File Encryption Object" by Sean Poling.

And come to think of it most of my problems in MMF are his fault.

But nevertheless... *tries identical code on a different machine*

EDIT: Guess what dudes; doesn't work. On two different computers with vastly different stats and Windows OSes the encryption just doesn't want to work for some reason... I don't know what could be wrong with my events, I'll look at them some more today; and maybe if it doesn't work someone would volunteer to check them?

Other than that... is the Binary Object a good alternative to the File Encryption Object?

Image Edited by the Author.

 
whoops

Nicholas S Wilson



Registered
  23/02/2004
Points
  20
13th August, 2004 at 18:33:30 -

Phizzy: I just meant that you were right -because- I put them all in the same event.

But I'm still having a problem where it just decides not to encode for some reason; it never messing up decoding or writing it... And it does this across multiple machines... I'm going to try the binary object but I feel like there must be something I'm overlooking... but it's been days =/

 
whoops

Tigerworks

Klik Legend

Registered
  15/01/2002
Points
  3882
13th August, 2004 at 18:55:52 -

You should use either the Binary object or the Blowfish object for encryption. Any other encryption object is easy to crack.

 
- Tigerworks

Mr Icekirby



Registered
  18/12/2003
Points
  846
13th August, 2004 at 19:19:34 -

i never could get the file encryption object to encrypt anything

 
Mr Icekirby says so!
OBEY ME!

Nicholas S Wilson



Registered
  23/02/2004
Points
  20
13th August, 2004 at 19:22:27 -

Thanks everyone for the help; I'm making the jump to Blowfish now.

 
whoops

Nicholas S Wilson



Registered
  23/02/2004
Points
  20
13th August, 2004 at 20:33:26 -

Ok I tried it. It doesn't work either; the blowfish object does the exact same thing. I have no idea why it is doing this and I am about to break something. Could someone please volunteer to look at the entirety of my code? It would be a giant leap of faith for me but I am obviously incapable of doing anything and it makes me sick to my stomach that something so simple has driven me insane for three days straight

 
whoops

Teapot

Does he even go here

Registered
  02/10/2003
Points
  2631

VIP Member
13th August, 2004 at 23:14:47 -

I really don'[t see why people bother encrypting INIs in freeware games. I mean, no-one is actually gonna go fiddling around with the INI anyway.

 
n/a

AsparagusTrevor

Mine's a pint of the black stuff

Registered
  20/08/2002
Points
  2364

Game of the Week WinnerHas Donated, Thank You!VIP MemberEvil kliker
14th August, 2004 at 04:53:53 -

I mess around with INI files, but then again, I'm pure evil.

 
Image

Nicholas S Wilson



Registered
  23/02/2004
Points
  20
15th August, 2004 at 12:53:41 -

Teapot that is a major assumption on your part. A lot of PC games have used a similar kind of encryption; that whether or not it was easy to crack, players would spend the time breaking it. Some players are so devoted to published PC games that they develop mods for them even when no tools were available to them; it takes very little effort to download a hex editor, break the encryption and mess up your code. Of course players are going to try this; and especially in an online game, where they feel they can prove something by hacking up their character and prancing around the servers as if they truly accomplished anything.

Not only will people give it a shot to cheat; but they'll go to great lengths to develop methods to make it easier for more people to cheat so the whole game economy is driven into the ground and everyone is just like them (which is odd considering at first they were cheating to be the best). In the original Diablo cheating was so rampant from the getgo because the codes were cracked, and instantly trainers were developed for the game that allowed the modification of character stats, item slots... money; everything. That legacy has followed Blizzard into the Diablo sequel, where cheating was on a much lower scale but it was exceedingly common at the game's start that items were duplicated, and many of these items still exist on the server today because of Blizzard's inability to fix the problem beforehand.

 
whoops

RapidFlash

Savior of the Universe

Registered
  14/05/2002
Points
  2712
15th August, 2004 at 14:20:31 -

Actually Teapot (Damien), lots of people hack INI files, even for freeware games.

 
http://www.klik-me.com

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
16th August, 2004 at 06:39:09 -

I 'hack' ini files if you call it that. I even put a message in one of my game's ini files saying:

[Get out of here]
Willyougainfromeditingthis?=no
Whyareyouhere?=who knows
Theresnothinginherebuthighscores=he's right
Sogetlost=beatit.

[Scores]
1=9999
2=543
3=454
4=234
5=123

Think it was in "AJ Memory" if i remember correctly.

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Mr Coffee



Registered
  04/09/2003
Points
  440
16th August, 2004 at 12:57:12 -

Encrypting an INI is not going to stop someone from cheating. They can simply edit the game values directly in memory. Tools exist which are designed for cheating in PC games which do this. In fact commercial game companies don't even bother to put in cheat protection unless the game is an online game. If it's single player then if they want to cheat just let them.

 
99 percent chance that the above post is 100 percent correct.

Klikmaster

Master of all things Klik

Registered
  08/07/2002
Points
  2599

Has Donated, Thank You!You've Been Circy'd!VIP MemberPS3 Owner
16th August, 2004 at 18:03:45 -

Why not use an array, they rule over INI's and are especially useful for RPG's, plus they can't be hacked into easily, well not as easily as being opened in notepad

 
n/a

Tigerworks

Klik Legend

Registered
  15/01/2002
Points
  3882
16th August, 2004 at 19:15:27 -

The latest builds of MMF 1.5 encrypt scores, lives and global values, I believe, to stop memory hackers editing values directly in memory.

 
- Tigerworks

Kramy



Registered
  08/06/2002
Points
  1888
17th August, 2004 at 13:07:45 -

What are you using to get the filename? Win2k didn't accept .\filename.sav for me, yet win95/98/me do. I don't know for XP.

I think for TGF the file object has something to get the app dir, and in MMF it's appdrive$+appdir$, and in Jamagic it's Program.getapplicationdirectory().

 
Kramy

Nicholas S Wilson



Registered
  23/02/2004
Points
  20
18th August, 2004 at 02:55:15 -

Do you guys have any tips on CGI script... maybe a sample script to use for just reading/writing INIs from the same FTP server with MOOSock?

The encryption thing has failed for me again and again; I'm still in the dark, and I almost hate to speculate.

 
whoops

Nicholas S Wilson



Registered
  23/02/2004
Points
  20
18th August, 2004 at 02:56:39 -

And thanks for the suggestions about other methods... it is indeed pretty hard to protect your game from cheaters... and I really have to; because of the nature of this game as an online RPG ...

 
whoops
   

Post Reply



 



Advertisement

Worth A Click