26
\$\begingroup\$

I'm making a game with a primary mechanic of a very limited amount of time that you can see a maze, and must navigate it blindly as much as possible to conserve your torch fuel. It's possible you could snap a photo with your phone and then beat every level.

My initial thought is, "so what?" if someone wants to cheat, they are just taking the fun out for themselves. But I'd like to add a leaderboard to the game, which would make cheating even more enticing to some players who value bragging rights over having fun.

The obvious answer is that there is NO way to prevent this.... but is there? I am trying to find an out-of-the-box idea that renders cheating nearly impossible or pointless. Any ideas? Curious if anyone has any thoughts first without altering your perspective by playing my game first. Let me know if you want the link and I'll give it to you. Thanks!

\$\endgroup\$
15
  • 22
    \$\begingroup\$ gamedev.stackexchange.com/questions/57615/… Does this answer your question? Games that aren't multiplayer where "cheating" doesn't give them an advantage over others is usually not worth trying to prevent. They're going to try and experience a game how they see fit. Whether or not you like how they play doesn't totally matter. Just make it a fun and rewarding experience for them to encourage playing normally, without cheating. \$\endgroup\$ – n_plum Mar 10 '20 at 18:37
  • 3
    \$\begingroup\$ It is possible to make a game where a still photo is uninformative. Lost in the Static is a game where everything looks like TV static, and you can only see the edges between background, foreground, player avatar, and hazards by watching the pattern of change. But even that technique is defeated by taking a short video. \$\endgroup\$ – DMGregory Mar 10 '20 at 18:48
  • 11
    \$\begingroup\$ So it's a game about trying to use your memory as a camera, and players can get an advantage by using their cameras as cameras instead. I guess instead of a leaderboard you could have an in-person tournament? \$\endgroup\$ – Foxwarrior Mar 10 '20 at 19:07
  • 4
    \$\begingroup\$ Note that some people will do things like... modify your game to give unlimited fuel. Or just modify the game to return any time they wish. \$\endgroup\$ – Clockwork-Muse Mar 11 '20 at 2:55
  • 22
    \$\begingroup\$ Don't put a worldwide ladder. To put it in perspective of other simple games, I've never seen a flash game ladder whose top 10 scores weren't straight up the maximum score showable by whatever datatype they were using. Put a friends-only ladder instead. It makes sense to show off to your friends, it doesn't make sense to try to compete fairly with an indeterminable number of people who don't care for fairness, unless the competition is to see who is fastest or best at cheating the score system. Which is awesome in my book, but you know what I mean. \$\endgroup\$ – leinaD_natipaC Mar 11 '20 at 15:43

17 Answers 17

38
\$\begingroup\$

Obvious answer, there's no way to prevent this. If they can see it with their eyes, they can see it with their phone. However, here's two strategies mitigating this:

  1. Don't show the entire maze at once. Scroll the maze, show it only in segments, etc. This will prevent a single picture from capturing the entire maze, however, it won't prevent video and does make it more difficult to solve.

  2. Utilize other strategies to convey the maze information. For example, "reveal" the solution to the maze in the form of verbal instructions "Right, second left, straight, etc.". Again, this can make things more difficult, but would prevent an image (but again, not video).

Essentially, don't give them everything at once and give it to them in different ways. This will help make cheating harder, but it won't be impossible.

\$\endgroup\$
5
  • 8
    \$\begingroup\$ To add to this answer. If your leaderboard is based on time to finish. Then if you don't show to much at once and don't scroll to fast, if they make a video but you can basically finish the game by remembering faster then you can watch the video and use that to find your way to the finish, then they can't beat the best/luckiest players by making a video/cheating. Assuming to reach the leaderboard, people don't need to play the same level... Because in that case they can just share the video ofcourse \$\endgroup\$ – troien Mar 10 '20 at 19:41
  • 5
    \$\begingroup\$ I wouldn't recommend either of these approaches if the goal is only to prevent cheating, although those approaches may (or may not) be good alternatives disregarding potential cheating. I wouldn't base too significant game design decisions (like ones that fundamentally change how the game is played and experienced) on something as arguably minor as a leaderboard (which typically allows for players to cheat in a number of other ways anyway). It might be different if we're talking about some online PvP game where cheating could very directly ruin the game for others. \$\endgroup\$ – Bernhard Barker Mar 11 '20 at 9:37
  • \$\begingroup\$ Would provide almost complete info, skipping part of the end, be enough to make it almost pointless to take photos? \$\endgroup\$ – Ismael Miguel Mar 11 '20 at 11:07
  • 1
    \$\begingroup\$ @troien a dedicated cheater could just write custom software to convert the video into a single still image of the entire map. If anything it just makes cheating more fun. \$\endgroup\$ – SamYonnou Mar 12 '20 at 19:19
  • \$\begingroup\$ @SamYonnou I didn't think about that :p. You're right, though once you get to the point where people start to write custom software to cheat, there are probably easier ways to cheat (and get 'better' scores)... Especially if the game runs on the client's machine instead of a server... \$\endgroup\$ – troien Mar 16 '20 at 14:08
28
\$\begingroup\$

Embrace cheating and modify your mechanics

Cheaters gonna cheat - you can't avoid that, and lots of other answers here cover that in enough detail. But, you can certainly edit the mechanics of your game to make the obvious cheating routes like taking a screenshot simply pointless. You don't want your cheat routes to be so easy that a majority of players do it.

Similarly, you don't want to do things that prevent screen recording or screenshots because then streamers and influencers can't play your game.

In this case, rather than flashing the complete overview of the maze on screen, you'd instead have the character enter the maze with a torn or damaged map which can be viewed at any point. There's no indication of where you are currently, so the memory challenge simply shifts from remembering what you saw to remembering where you are.

Difficulty can also be indroduced by having a sliding scale of the amount of damage to the map, as people would have to remember damaged sections of the map only via travelling through them. Maybe the player can draw on the map to fill in the blanks (but only the blanks, if you wouldn't want them keeping track of where they are via drawing a path on it).

Alternatively maybe map sections can be collected within the maze, introducing some strategic gameplay options - is it worth just trying to go through the maze and get lucky, or invest some time in repairing the map first by finding pieces/ completing mini side-quests to unlock them etc.

\$\endgroup\$
11
\$\begingroup\$

Option 1: Occupy their hands

This might be a bit left-field, but what if you forced the user to keep their hands on the keyboard the entire time?

For example, you could give them a task like typing the letters that appear on the screen, or using WASD and IJKL to keep their character balanced.

Anything that keeps their hands busy will make it more difficult to take a photo with their phone.

Cheating would still be possible with enough technology, or the help of a friend, but at least it would be harder.

Option 2: Make them play the game on their phone

They can't take a picture of their phone with their phone! (Unless they set up some mirrors.)

Option 3: Make them submit a video if they want to appear on the scoreboard

A bit like competitive gaming or speedrunning, require the player to submit a video of them playing the game. Of course this will require a second device. You might not be able to completely control the environment, but you might be able to weed out some of the cheaters this way.

\$\endgroup\$
5
  • 7
    \$\begingroup\$ On option 2: volume down + power button (android), power button + home button (iOS) says otherwise :) (it takes a screenshot) \$\endgroup\$ – Luke Briggs Mar 11 '20 at 14:48
  • \$\begingroup\$ @LukeBriggs That's a good point! \$\endgroup\$ – joeytwiddle Mar 11 '20 at 14:49
  • 7
    \$\begingroup\$ Apps can ask the phone's OS to disable screenshot functionality while the app is open, but I wouldn't recommend this. It's hostile to the well-behaved users, makes it harder for them to share their enthusiasm for your game by sharing pics of cool things they did/found, and it provides only a small hurdle for a dedicated hacker to bypass if they're determined to cheat. \$\endgroup\$ – DMGregory Mar 11 '20 at 14:54
  • 1
    \$\begingroup\$ Can still use two phones, so preventing screenshots doesn't help much. Some people have a private phone and a work phone. \$\endgroup\$ – Kapten-N Mar 12 '20 at 8:11
  • 3
    \$\begingroup\$ Or any other camera / webcam etc - it's not just phones that take photos \$\endgroup\$ – freedomn-m Mar 12 '20 at 8:47
6
\$\begingroup\$

This is just me brainstorming, but what if:

you split the map in stripes, and only show the first stripe a very short amount of time. Then you blank that stripe out and show the next one, blank the next one and so on. If you switch stripes fast enough, you will see the whole map when you look at it, but if you take a still picture, you will only see a part of it.

Or maybe you can do it with an overlay with a slit in it, that scans across the map fast enough. I'm thinking along the lines of a cathode ray tube monitor that only projects one line at a time but does it so fast that you see the whole picture.

The speed and width of the part of the map you are showing must be optimized so that a regular camera can't capture the whole picture in one shot, but still allows the player to view it. Of course, this wouldn't prevent anyone from filming the map either.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ Warning - this solution would make eyes tire faster and would be harmful for people suffering epilepsy. \$\endgroup\$ – Mołot Mar 12 '20 at 15:42
5
\$\begingroup\$

Take advantage of dynamic range.

Human senses are much better than cameras at paying attention to small variations to light intensity in the presence of large variations nearby. With a camera, any large variations in the shot squash the detail in regions where variations are small.

For best results, you should pepper the image with white or black spots, as it makes sure they end up in the shot.

Compare the original image:

enter image description here

And the photo I took with my phone:

enter image description here

Much of it has disappeared!

This isn't too reliable, it depends on the camera and on lighting (and the user may find the original image difficult to see on certain screen displays) but it could be one component of a broader strategy...

\$\endgroup\$
2
  • 10
    \$\begingroup\$ This kind of trick is great for many people, but makes the game totally unplayable for others, as it effectively turns a memory challenge into an eyesight test. Completely removing accessibility for legitimate users to make it a little less accessible for cheaters doesn't seem like a reasonable trade-off. \$\endgroup\$ – Nij Mar 12 '20 at 10:03
  • 1
    \$\begingroup\$ Hmm, I wonder if you could do something similar with moire patterns? \$\endgroup\$ – Chronocidal Mar 12 '20 at 10:35
4
\$\begingroup\$

Maybe base the leaderboard score on actual real life time spent rather than In-Game time spent. Taking a picture and then viewing the picture would slow you down considerably, hurting your score.

Alternatively, any kind of pause could disqualify you from leaderboards but still record local high scores.

\$\endgroup\$
3
  • 9
    \$\begingroup\$ What if a friend takes the picture and then guides the player? \$\endgroup\$ – Vaillancourt Mar 10 '20 at 23:31
  • \$\begingroup\$ @Vaillancourt: Communication overhead. \$\endgroup\$ – Matthieu M. Mar 11 '20 at 10:08
  • \$\begingroup\$ I'm not sure about this - taking a picture takes less than a second if you have the camera ready, and the image appears almost instantaneously. Taking a photo and viewing it takes a few seconds at most, and if cheating doesn't save you at least a few seconds, people probably wouldn't bother with it in the first place. \$\endgroup\$ – Nuclear Hoagie Mar 11 '20 at 13:06
3
\$\begingroup\$

You can do something similar to LED Multiplexing. Here's a snippet from the Wikipedia article:

Multiplexed displays are electronic display devices where the entire display is not driven at one time.

Instead, sub-units of the display (typically, rows or columns for a dot matrix display or individual characters for a character oriented display, occasionally individual display elements) are multiplexed, that is, driven one at a time, but the electronics and the persistence of vision combine to make the viewer believe the entire display is continuously active."

If the user is presented with a picture of a maze, you could show only one portion at a time - but do so rapidly so that our "persistence of vision" can see the maze as a whole. Cameras do not have this persistence of vision, and so a snapshot would only see the portion of the maze visible at the time. Sort of like being in a room with a strobe light. Even video would look extremely buggy, and you could probably sneak in some incorrect portions that would be invisible to the naked eye.

\$\endgroup\$
4
  • 4
    \$\begingroup\$ This seems defeatable by simply upping the exposure time on the camera, and like it may be dangerous for epileptic players. \$\endgroup\$ – doppelgreener Mar 11 '20 at 18:33
  • \$\begingroup\$ You can add in clue portions to deliberately blur long exposures. As for the epileptic problem, turn on your phones camera and look in a few rooms with LED lights - They're flashing at imperceptible frequencies all the time. I believe Snapchat was toying with a similar feature to obscure screenshots. \$\endgroup\$ – Aww_Geez Mar 11 '20 at 19:21
  • \$\begingroup\$ LEDs have upwards of 400hz, usually far more than 1000hz, which is a lot more than the 30hz being proposed here (the maximum you can achieve at 60fps monitors). \$\endgroup\$ – doppelgreener Mar 11 '20 at 21:39
  • \$\begingroup\$ Photosensitive epilepsy is typically triggered by 15-20Hz flickering, possibly because it aligns with beta wave activity. It is much less likely to be triggered by smaller changes in light intensity, relative to the surrounding environment. Small changes in intensity are also harder for cameras to capture. \$\endgroup\$ – Artelius Mar 12 '20 at 4:06
2
\$\begingroup\$

Give points based on how long the user looks at the maze AND how long it takes them to solve it without a picture.

If people want to cheat, they will. Make sure it's worth your time to actually fix the problem. Don't solve problems that are not out there.

\$\endgroup\$
2
\$\begingroup\$

For the player to see the maze picture, make them hold down two keys on the opposite side of the keyboard at the same time. That way, they will need to use both hands and may not be able to easily take a picture.

\$\endgroup\$
6
  • 4
    \$\begingroup\$ If you don't allow button remapping, this presents an extra barrier to players with physical accessibility needs. And it won't stop a dedicated cheater, who will set up a macro to deliver the two button inputs from a single button press. \$\endgroup\$ – DMGregory Mar 11 '20 at 16:40
  • 2
    \$\begingroup\$ As someone who can comfortably press "P" and "Left Ctrl" on a full-size QWERTY keyboard simultaneously with one hand, I'm note sure this will work. \$\endgroup\$ – Chronocidal Mar 12 '20 at 10:37
  • \$\begingroup\$ @Chronocidal : As someone over six foot tall (with hands naturally larger than most five foot tall people), I can't quite seem to reach Left-Ctrl and P. But even if that could be done, there's still some combinations that could be worse, like Left-Ctrl and right curly brace } or equal sign or backspace-key or numpad's minus. (Of course, the numpad keys might not be quite as far away for some laptop users where the numpad gets overlaid with other keys, possibly just requiring them to also press Fn.) \$\endgroup\$ – TOOGAM Mar 12 '20 at 11:58
  • \$\begingroup\$ @TOOGAM I can hit { with my little-finger while my thumb is on left-ctrl. But for any combination further than that (such as left-ctrl and } or backspace, or Esc and Numpad Enter), I need to use my elbow for one of the keys instead. Uncomfortable, but doable... \$\endgroup\$ – Chronocidal Mar 12 '20 at 12:10
  • 1
    \$\begingroup\$ @TOOGAM "could be worse, like Left-Ctrl and right curly brace }" Exponentially worse for users with non-US keyboard layouts that don't have a dedicated key for } and thus need to hold a modifier key as well. \$\endgroup\$ – zovits Mar 12 '20 at 12:18
2
\$\begingroup\$

Allow them to replay the levels to get better speeds

If they can replay the levels to get a better speed, then what is the difference between memorizing the level by playing it over and over and taking a photo? Don't punish them for number of tries. Eventually, the best times will simply be based on what path they take rather than their ability to memorize. In that case, their "cheating" will not have gained them anything as far as leaderboards are concerned.

\$\endgroup\$
1
\$\begingroup\$

You could just determine when a user captures a screenshot. When they do, invalidate that maze and give them another.

https://www.hackingwithswift.com/example-code/uikit/how-to-detect-when-the-user-takes-a-screenshot

\$\endgroup\$
4
  • 1
    \$\begingroup\$ This approach wouldn't detect remote screenshots - for example, somebody streaming via Airplay and taking a screenshot on their PC, capture cards or the analogue classic of pointing a camera at the screen. Lots of workarounds unfortunately, and cheaters are an impressively creative bunch! \$\endgroup\$ – Luke Briggs Mar 11 '20 at 15:10
  • 3
    \$\begingroup\$ I believe the question was about taking a picture, not a screenshot. \$\endgroup\$ – MichaelHouse Mar 11 '20 at 15:11
  • \$\begingroup\$ Ah I misinterpreted it. I see. Well, this would solve screenshots :) haha \$\endgroup\$ – impression7vx Mar 11 '20 at 15:18
  • \$\begingroup\$ More entertaining would be to detect the screenshot, and then replace the image with an incorrect map... \$\endgroup\$ – Chronocidal Mar 13 '20 at 13:30
1
\$\begingroup\$

There are a lot of good ideas on how the gameplay can be changed in such a way that it will lessen the advantage a cheater has, but at the end of the day it's more or less impossible to prevent cheating completely, so the question becomes how to handle that given the wish for a global leaderboard.

Personal leaderboard or a leaderboard for friends only

First of all I just have to mention that maybe the best idea is to ditch the idea of a global leaderboard. As much fun as those can be with a healthy community, they end up with a lot of issue. Even in something as innocent as a bridge building game you end up with people using bugs in the physics engine to take the top spots thus ruining the fun for normal players.

An easy way to 'fix' this is to only put friends on the leaderboard, because that way at least the large large majority of players won't encounter cheaters and the leaderboard will still be a meaningful goal.

Normal and tool assisted leaderboard

Only applies if cheating is fun

Players are surprisingly honest typically. I have once seen a game which literally asked 'Did you cheat? Just be honest, we wont punish you.' at the end and if you said 'Yes' it put you on a different leaderboard. In that case the 'cheating' was playing with two players which the rules prohibited explicitly, but I could totally see a situation where people who 'cheat' will be competing on a tool assisted leaderboard and people who don't cheat will compete on the normal leaderboard.

Time constrained leaderboard

Only applies if cheating is not fun

Lastly it's useful to note that typically repeated cheating is not fun, as it often makes it trivial to win. This thus means that repeatedly wiping the the leaderboard (e.g. by having a daily leaderboard only) makes both the reward for and damage from cheating minimal.

\$\endgroup\$
1
\$\begingroup\$

Optical Illusion? So what people see in 1 second isn't what they see when they've got 20 seconds to study it? The factually incorrect map will be remembered in the correct way. This would work especially well if it's a grid pattern.

\$\endgroup\$
1
\$\begingroup\$

Show the leaderboard as a histogram, and show the player's position in it as a percentile rather than absolute ranking. There will likely be two very distinct curves, and players can be satisfied that they are on the better end of the non-cheater curve. You may still get players who cheat but intentionally slow themselves to the upper end of the non-cheater range, but this will likely be infrequent.

\$\endgroup\$
0
\$\begingroup\$

If you generate the levels dynamically, so that each player gets a new maze, sharing pictures and video will be pointless.

Then again, this will mean no two runs are similar and the position depends on luck to a certain extent.

\$\endgroup\$
2
  • 7
    \$\begingroup\$ I think the problem OP is worried about is having players take a picture and then using that picture themselves to solve the puzzle, not sharing this picture with others. \$\endgroup\$ – Bernhard Barker Mar 11 '20 at 9:48
  • \$\begingroup\$ @Dukeling correct. \$\endgroup\$ – Ben Mora Mar 11 '20 at 12:27
0
\$\begingroup\$

As previously pointed out you can not 100% prevent it. One option I would like to bring up is playing with the contrast of your maze's preview.

Generally taking a picture of a monitor results in a not so high quality picture. the phone's camera won't be able to cope with low contrast and dark areas as well as the human eyes can. So making your preview happen in a low contrast/dark environment will at least hinder the photo-takers in some way as it will be hard to make out the contours of your alleyways.

This won't however stop the user from taking a screenshot, but depending on what you're making this game in screenshots can be disabled (although such disabling can be circumvented as well).

Another downside would be that lowering contrast may also keep people with visual impairments from playing your game.

As pointed out by others not showing the maze in one go would stop pictures, but not videos. One way to make it harder on the video takers would be to randomize the order in which you show the maze's segments. However randomizing that order would also make it much harder for your casual players!

\$\endgroup\$
0
\$\begingroup\$

Disable screenshots. This will cover most cases.

Disable screenshots in Android.

Disable screenshots in iOS (sorta).

This does not sound like an easy solution, so I would recommend taking the ¯\_(ツ)_/¯ approach as suggested by others. But it is an option.

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.