dMZX Forums: Detecting F8? - dMZX Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Detecting F8? I really, -really- don't want cheaters.

#1 User is offline   zztman 

  • Member
  • PipPip
  • Group: Members
  • Posts: 103
  • Joined: 21-October 00

Posted 11 October 2007 - 03:51 AM

Is there some way to detect a press of F8? I really] don't like people doing that to mess up the game, even if they have to go into the editor to do it. It's just not right, so I'm setting up an anti-cheat for that purpose.

I tried:

: "key[190]"


where [190] was char 190, as the Robotic manual said. But that didn't quite work.

What am I doing wrong?
0

#2 User is offline   LogiCow 

  • Holiday cow
  • PipPipPipPipPip
  • Group: Members
  • Posts: 2,671
  • Joined: 18-July 02
  • Gender:Male
  • Location:Quebec

Posted 11 October 2007 - 04:08 AM

: "loop"
wait 1
if "key65" = 1 "cheat"
if "key66" = 1 "cheat"
goto "loop"

: "cheat"
* "Have a cookie!"
inc "cookie" 1
die



Also I wouldn't count on cheat detection, since there's no easy way to stop people from editing your game in the MZX editor.

I am a very pro-cheat person and implement basic cheats in most of my games. It's mostly to help testing the game, except I just leave them there because they cause no harm.

This post has been edited by LogiCow: 11 October 2007 - 04:13 AM

0

#3 User is offline   asgromo 

  • steiner, porsches
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 3,841
  • Joined: 04-May 02
  • Gender:Female
  • Location:New York State

Posted 11 October 2007 - 04:19 AM

It would be neat if your game was actually good enough to justify your stance that the player shouldn't be able to fool around with it under any circumstances.
0

#4 User is offline   Kom 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 611
  • Joined: 05-March 07
  • Gender:Male

Posted 11 October 2007 - 11:23 AM

Wasn't there some old version of mzx that, like, password protected worlds and such? I think that that would be helpful for people who really didn't want cheaters.

A good idea if you want to do that would be to hide the robot somewhere on the board, instead of using the global or giving it a fixed position in every one. Try utting some in a wall or way out away from things, etc. it may discourage some people from trying to cheat.
0

#5 User is offline   Micah 

  • Ancient Member
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 5,330
  • Joined: 25-January 03
  • Gender:Male

Posted 11 October 2007 - 01:38 PM

If you don't want cheaters...

Have them play the game from a .sav file instead of an .mzx file.
♫ ▄ █ ▄ █ ▄ █ ▄
0

#6 User is offline   Wervyn 

  • I can see you
  • Group: DigiStaff
  • Posts: 1,855
  • Joined: 24-December 00
  • Gender:Male
  • Location:Caras Galadhon

Posted 11 October 2007 - 01:48 PM

Password protection was removed from MZX not that long after it became GPLed, since even before that it had stopped being a meaningful way of protecting one's game. I believe 2.51s3.1 was the last version that had it. Even before it was possible to just read the source code and get the magic key used to encrypt the password in the file, someone (I'm pretty sure it was Greg Janson Alexis) had made a password removal tool freely available. Open source password protection is a difficulty because anything you do to protect your game with a password has to be reversible, and that algorithm can be read out of the code. Though it actually would be possible to write a reasonably strong algorithm that would be transparent but hard to crack.

Basically, the way files were password protected before was to take your password, xor it with a magic string (or some reversible operation, maybe it wasn't xor), and then encrypt the file with the provided password (that way you couldn't just hexedit the file and remove the password, because the file would just be gibberish then). The key element that made this algorithm weak to reverse engineering and password discovery is that the operation used to encrypt the password was both simple and reversible. It was so simple in fact that I hacked several passwords by hand, just by guessing letters and comparing stepwise.

So the key is then to encrypt the password with a method that's not reversible, such as a one way hash like MD5 or SHA. The stored password never needs to be decrypted, it just needs to match the user's encrypted input when they give the password later. Then, you take the plaintext password as a key for a reversible but strong encryption like RC4, and use that to encrypt the rest of the file past the initial header (including the part with the encrypted password, that makes it harder to pick out the hash and try to crack it with a rainbow table or something). To decode, first use the provided password to decrypt the file, then hash it and match it with the password.

Now if you're one of those people who wets himself over the idea of preventing people from editing his game or cheating, this probably sounds awesome and too good to be true. Well you're right, it is too good to be true, because this is an all or nothing lock. No one will be able to PLAY your game without the password, and if they can play it, then they can edit it. And because of this, there's really no specific advantage to putting the encryption algorithm in MZX, you might as well just use your favorite encryption program on the file externally. The benefit of the original MZX encryption algorithm was that it had different levels of locking (total, no edit, edit without save, none). But in order for that to work, you had to be able to decrypt the file WITHOUT the user providing a password. As long as that condition is required, it's impossible to design a transparent system that prevents the user from decrypting the file without the password and then keeping it that way.

The best you could ever hope for is a compiled version of the MZX world that's inherently uneditable, but that would require a complete MZX redesign to be effective at all (robotic source and robotic bytecode are 1-to-1), and it would still be pretty easy to reverse engineer. So instead of worrying about people editing your world and changing code, or (gasp!) cheating, maybe it would be better to just chill out, remember it's only a game, and who the hell are you to tell people how to play it?

EDIT: To micah, it's really downright trivial to turn a .sav file into a .mzx file. So much so that you could do it by hand without much trouble. It's just a matter of discarding extra information like counters, and rearranging the data to fit the file format.

"More often than not, locked games aren't worth editing or playing anyway."
To lie is to change the truth.
..Ignorance is to be unaware of the truth.
....Incompetence is to be unable to grasp the truth.
......And escape is to run away from the truth.
It is useless to run, since the truth is right next to you.

-Wervyn
0

#7 User is offline   LogiCow 

  • Holiday cow
  • PipPipPipPipPip
  • Group: Members
  • Posts: 2,671
  • Joined: 18-July 02
  • Gender:Male
  • Location:Quebec

Posted 11 October 2007 - 06:50 PM

Sure, but there's no tool to do it right now, so making a contest game that can be beaten in roughly three hours, right after releasing a MZX fork that changes the world format slightly is pretty safe.

But then you need to know how to fork MZX to change the world format slightly.
0

#8 User is offline   Micah 

  • Ancient Member
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 5,330
  • Joined: 25-January 03
  • Gender:Male

Posted 11 October 2007 - 06:53 PM

Wervyn, on Oct 11 2007, 07:48 AM, said:

EDIT: To micah, it's really downright trivial to turn a .sav file into a .mzx file. So much so that you could do it by hand without much trouble. It's just a matter of discarding extra information like counters, and rearranging the data to fit the file format.

How many people will go through the trouble to do that... it would probably just be less trouble to just play the game without cheating, regardless of how trivial it is.
♫ ▄ █ ▄ █ ▄ █ ▄
0

#9 User is offline   Exophase 

  • Laughing on the inside.
  • Group: DigiStaff
  • Posts: 7,155
  • Joined: 23-October 00
  • Gender:Male
  • Location:Cleveland, OH

Posted 11 October 2007 - 07:10 PM

LogiCow, on Oct 11 2007, 01:50 PM, said:

Sure, but there's no tool to do it right now, so making a contest game that can be beaten in roughly three hours, right after releasing a MZX fork that changes the world format slightly is pretty safe.

But then you need to know how to fork MZX to change the world format slightly.

All someone needs to do is hack said MZX fork to turn it into a tool to convert .sav to .mzx, which can probably be done in under a minute (for someone who can compile MZX anyway)

Or 3.14 seconds if you're Lancer-X.

How are you going to release a fork for a contest game anyway? That would almost definitely be against the contest's rules.
~ ex0 has a kickass battle engine, without it you sux0rz! without it you sux0rz! ~

"The fact that I say I've one of the best, is called honesty." -Akwende
"Megazeux is not ment to be just ASCII, it is ANSI!" - T-bone6
"I hate it when you get all exo on me." - emalkay

Exophase can what Rubi-cant.
exoware is ware ur ware is exoware
ps. not loking 4 new membrs kthx
0

#10 User is offline   LogiCow 

  • Holiday cow
  • PipPipPipPipPip
  • Group: Members
  • Posts: 2,671
  • Joined: 18-July 02
  • Gender:Male
  • Location:Quebec

Posted 11 October 2007 - 07:44 PM

Not if I'm the one organizing the contest!

I'm talking about "Be the first to beat this game to win" kind of contest here.

This post has been edited by LogiCow: 11 October 2007 - 07:50 PM

0

#11 User is offline   Quantum P. 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 250
  • Joined: 01-January 05

Posted 11 October 2007 - 09:59 PM

More like 2.718!

But back to the subject at hand. I'm kind of repeating what Wervyn said, but preventing all editing while allowing playability... that's asking for a DRM system, and we all know how well those work. Even having the DRM code be closed-source doesn't help - there will always be someone determined enough to crack it. You can make it inconvenient to cheat, but not impossible.

With that said... Logicow's code will detect F8 cheating, but it won't prevent it. Sure, you could do something like end the game, but the player will either edit your game (bad) or switch to another game (also bad). The only way to prevent cheating is to both (1) make cheating slightly inconvenient, and (2) make the game compelling (and easy) enough so that the player is willing to play it without cheating. As long as it is easier/more fun to play by the rules, the player will not cheat.
0

#12 User is offline   Galladin 

  • Threadkiller
  • PipPipPipPipPip
  • Group: Members
  • Posts: 2,266
  • Joined: 08-January 02
  • Gender:Male
  • Location:Finland

Posted 11 October 2007 - 10:16 PM

I don't think there's many people who cheat at MZX games anyways. Moreover, if you're using sprites and non-built-in counters and maybe another counter for player health, cheating is no use.
Interactive (F) Fantasies

<Beige> In Finland, they defecate on each other's sleeping areas.
<Beige> It's a cultural sign of respect.
0

#13 User is offline   Terryn 

  • ******
  • Group: DigiStaff
  • Posts: 2,960
  • Joined: 12-October 00
  • Gender:Male

Posted 11 October 2007 - 10:30 PM

Konami console games used to do things like drastically spike up the difficulty or do other, more subtle things if the game was detected as altered. I like the more subtle dissuasion of cheating.

Also, Galladin, the F11 menu allows one to manipulate any non-built-in counter or string as long as it's been declared at least once.
angelic stream - shed sanguine - ill-adapt - avis - para/lyser - renaissance - dead tangent - phosphene blur - birth breeds death - ________ - painted glass - lagniappe

<Exophase> HES STEALING MAH AIRSHIP!!!!!!11111111
0

#14 User is offline   Goshi 

  • I'm dreadful of DRAGON.
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 4,146
  • Joined: 23-April 01
  • Gender:Male
  • Location:Hihoukan

Posted 11 October 2007 - 10:33 PM

Counters can actually be modified in the new way of cheating; the debug menu: F11.

EDIT: Oh yeah, F11 but drat, Terryn beat me.

This post has been edited by Goshi: 11 October 2007 - 10:34 PM

0

#15 User is offline   Seventh Shade 

  • willfully disreputable
  • PipPipPipPip
  • Group: Members
  • Posts: 917
  • Joined: 10-March 04
  • Gender:Male

Posted 12 October 2007 - 12:41 AM

If you're going to prevent cheating add difficulty levels so the less-skilled/less-obsessive won't whine (as much). Really though, more games need variable difficulty.
0

#16 User is offline   Old-Sckool 

  • megazeux breaker
  • PipPipPipPip
  • Group: Members
  • Posts: 649
  • Joined: 07-June 05
  • Gender:Male

Posted 12 October 2007 - 03:13 AM

I think that there should be at least a cheat lock that disables your f7 and f8 and f11 and whatnot, since that's what this topic is about. I mean, those keys are intended for debugging purposes only.
The thing is that if we allow people to make it so that their games can't be edited, it would just ruin a bunch of games (future games that is...), since its easy to get stuck in MZX games and no one seems to be writing up walkthroughs to help us along.
<Nadir> mzxers don't make GAMES, usually
<phthalocyanine> they make experiences.
<Nadir> demos, more like
<Nadir> a glimpse into what could have been if mzx wasn't such a bore to work with
<Nadir> actually, i'm being unfair
<Nadir> i would have made mzx games if it was capable of running on more than 20 computers worldwide in 1998
<Nadir> >:D

<%Alice> functor
<%nooodl> i hear C++ has a thing called functors and they're completely different from Haskell functors...
<rorirover> the result is the most horrid thing in C++, it's basically black magic and it transforms any code you're writing into some eldritch monstrosity
0

#17 User is offline   Exophase 

  • Laughing on the inside.
  • Group: DigiStaff
  • Posts: 7,155
  • Joined: 23-October 00
  • Gender:Male
  • Location:Cleveland, OH

Posted 12 October 2007 - 02:44 PM

Old-Sckool, on Oct 11 2007, 10:13 PM, said:

I think that there should be at least a cheat lock that disables your f7 and f8 and f11 and whatnot, since that's what this topic is about. I mean, those keys are intended for debugging purposes only.
The thing is that if we allow people to make it so that their games can't be edited, it would just ruin a bunch of games (future games that is...), since its easy to get stuck in MZX games and no one seems to be writing up walkthroughs to help us along.

And then someone releases a utility that searches for all instances of that counter name and changes the name of it, which is another few minute job in C.
~ ex0 has a kickass battle engine, without it you sux0rz! without it you sux0rz! ~

"The fact that I say I've one of the best, is called honesty." -Akwende
"Megazeux is not ment to be just ASCII, it is ANSI!" - T-bone6
"I hate it when you get all exo on me." - emalkay

Exophase can what Rubi-cant.
exoware is ware ur ware is exoware
ps. not loking 4 new membrs kthx
0

#18 User is offline   Wervyn 

  • I can see you
  • Group: DigiStaff
  • Posts: 1,855
  • Joined: 24-December 00
  • Gender:Male
  • Location:Caras Galadhon

Posted 12 October 2007 - 03:35 PM

All these people, mostly those who are inexperienced, seem to think we need measures to crack down on some sort of rampant cheating epidemic. Well let's find out how much of an epidemic it really is, shall we?

"Devising solutions to problems that never existed in the first place."
To lie is to change the truth.
..Ignorance is to be unaware of the truth.
....Incompetence is to be unable to grasp the truth.
......And escape is to run away from the truth.
It is useless to run, since the truth is right next to you.

-Wervyn
0

#19 User is offline   Pyro1588 

  • wojtek
  • PipPip
  • Group: Members
  • Posts: 145
  • Joined: 20-October 02
  • Gender:Male
  • Location:Minnesota

Posted 12 October 2007 - 10:19 PM

zztman and old-skool: why do you care? seriously, why does it matter whether someone cheats in your game or not?
i understand the feeling of not wanting anyone to screw with how your game is meant to be played, but on the flip side, who wants to play a game that spends more time making sure it can't be screwed with than it does being fun?
personally, i like the cans road, where looking at things in the editor is cool (at least with board names.) in zokor, i added pics to unused sections of the map just to make it interesting.
<Tox> bah. I may as well give in and shop australia. D:
<pyro1588> "welcome to australia, can i help you find what you're looking for?"
<Tox> pyro1588, I'm giving you the most reproachful of glares right now.
--------
Go show those nutty Koreans what us crazy Europeans are made of pirate.gif pirate.gif pirate.gif - Saike
<exophase> The old Commodore strategy of, "Go friggin' bankrupt!"
<wervyn> Go away! I'm writing the same engine I always do!
0

#20 User is offline   zztman 

  • Member
  • PipPip
  • Group: Members
  • Posts: 103
  • Joined: 21-October 00

Posted 13 October 2007 - 07:40 AM

Whoa. I ask a simple question about what code I need to use, and the thread explodes into this?

The main reason I wanted to implement anti-cheat measures was to try to get one of my friends who is an F8-a-holic to play through a Megazeux game without F8ing in every single room for once. But... I didn't think so many people here would react so strongly to me bringing this up. Dang. I'm sorry. :)

Um... by the way, I wasn't even asking about passwording. I know passwords have been gone from Megazeux entirely since, like, ever, and I don't really give a crap about them.

This post has been edited by zztman: 13 October 2007 - 07:48 AM

0

#21 User is offline   Pyro1588 

  • wojtek
  • PipPip
  • Group: Members
  • Posts: 145
  • Joined: 20-October 02
  • Gender:Male
  • Location:Minnesota

Posted 13 October 2007 - 01:09 PM

in that case, add a message when he presses f8 along the lines of "you cheating cheater why do you have to cheat can't you play without cheating? =("
you can also keep track of vital counters and just reset them to what they were in the instance of an f7 press. and if you really want to get cruel with f8 protection, when he presses f8, change all c07 space to solid (that trick drove me nuts in chrono wars, or whatever that zzt game was.)
<Tox> bah. I may as well give in and shop australia. D:
<pyro1588> "welcome to australia, can i help you find what you're looking for?"
<Tox> pyro1588, I'm giving you the most reproachful of glares right now.
--------
Go show those nutty Koreans what us crazy Europeans are made of pirate.gif pirate.gif pirate.gif - Saike
<exophase> The old Commodore strategy of, "Go friggin' bankrupt!"
<wervyn> Go away! I'm writing the same engine I always do!
0

#22 User is offline   Old-Sckool 

  • megazeux breaker
  • PipPipPipPip
  • Group: Members
  • Posts: 649
  • Joined: 07-June 05
  • Gender:Male

Posted 18 October 2007 - 01:31 AM

Pyro1588, on Oct 12 2007, 06:19 PM, said:

zztman and old-skool: why do you care? seriously, why does it matter whether someone cheats in your game or not?
i understand the feeling of not wanting anyone to screw with how your game is meant to be played, but on the flip side, who wants to play a game that spends more time making sure it can't be screwed with than it does being fun?
personally, i like the cans road, where looking at things in the editor is cool (at least with board names.) in zokor, i added pics to unused sections of the map just to make it interesting.

I just would like to have the option of turning of cheats in the event that I make a respectable MZX game. That is all. And if you were to think about it (which I didn't when I posted it...) if you were to put an anti-F7, 8, 11 cheat option in the Global counters menu, it wouldn't prevent anything unless someone wasted their time adding a password protected editor lock feature.

zztman: if you don't use your default counters in your game, F7 does nothing. That c?? space to customblock on F8 thing is good too, but that has to be put into the global robot

This post has been edited by Old-Sckool: 18 October 2007 - 01:31 AM

<Nadir> mzxers don't make GAMES, usually
<phthalocyanine> they make experiences.
<Nadir> demos, more like
<Nadir> a glimpse into what could have been if mzx wasn't such a bore to work with
<Nadir> actually, i'm being unfair
<Nadir> i would have made mzx games if it was capable of running on more than 20 computers worldwide in 1998
<Nadir> >:D

<%Alice> functor
<%nooodl> i hear C++ has a thing called functors and they're completely different from Haskell functors...
<rorirover> the result is the most horrid thing in C++, it's basically black magic and it transforms any code you're writing into some eldritch monstrosity
0

#23 User is offline   CJA 

  • «≡larch bucket≡»
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 3,262
  • Joined: 23-June 05
  • Gender:Male
  • Location:......@.c....

Posted 18 October 2007 - 05:53 PM

"Respectable MZX game?"

My creativity is often stymied by the fact that no MZX game made will ascend to wide-scale "respectable" status. I get by MZXing on delusions that it's helping my psuedocoding, program flow and algorithm design in general.
0

#24 User is offline   Risu2112 

  • I can't get the top off this bottle
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,864
  • Joined: 12-August 01
  • Gender:Male

Posted 21 October 2007 - 06:13 PM

Just do what I do, make your programming so incomprehensible that you can't even understand it your self, That would discourage all but the most dedicated cheater. And I would know cause I frequently cheat ;_;
Respond! Vibrate! Feed back! Resonate!
<Cybersilver> "All my sugestions are for FUTER VERSIONS. Say it with me Fu-ter futer. Yep..."
9-21-2009, SFMZX game play video: HERE
Risu2112
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users