TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Winning at Candy Crush

409 pointsby sokratispover 11 years ago

36 comments

kensover 11 years ago
My game cheat story starts way, way back, playing Wizardry on the Apple II. In this game, you go through a dungeon, killing monsters and collecting treasure and experience. Fun, but slow going. So I found out where in memory these values are stored and started manipulating them, giving myself tons of experience and new treasures.<p>Everything went fine until I put in an invalid treasure value which apparently caused some random memory locations to be modified, corrupting the game. Unfortunately, game state was written back to the same floppy disk that holds the game itself, rendering the game unplayable.<p>Fortunately, I could borrow a second floppy drive, borrow an uncorrupted copy of the game, and repair the game with a disk-to-disk copy. Unfortunately, I plugged in the disk drive connector crooked, sending -12 volts into a chip on the controller board that didn&#x27;t want -12 volts. The result was a &quot;pop&quot; and a disk controller that no longer worked. Needless to say, my father wasn&#x27;t happy.<p>Finding the problem was easy - it was the chip with a square hole blown out of it where the silicon had vaporized. Unfortunately getting a replacement chip wasn&#x27;t easy when you live in the middle of nowhere. So I built a replacement circuit on a solderless breadboard and wired it into the controller board, and everything worked fine until I could get the proper replacement chip.<p>TL;DR: cheat at games and you will be punished
评论 #6741041 未加载
评论 #6743433 未加载
评论 #6741005 未加载
评论 #6741890 未加载
评论 #6743392 未加载
chazover 11 years ago
In 2009, when Farmville was the New Hotness, I checked it out to see what all the fuss was. After all, it was rumored to be minting $1 million per day. Soon after, I saw that a lot of my friends were playing. Girlfriends were getting boyfriends to tend their crops for them while at work. They were very scrupulous with the design of their farm and tending their crops. But I wanted to just be at the top of the leaderboard.<p>Unlike later games, it was possible to keep leveling up and making money by farming only instead of inviting friends. Plow fields, plant crops, and then harvest them hours later -- repeat as fast and as frequently as you can. TONS of tedious clicking. Of course, I wanted to automate it, and I wasn&#x27;t alone. Searching around, I found a Perl script that someone had written and I adapted it for my PC.<p>I just fired up Farmville, and here&#x27;s what my farm looks like: <a href="http://i.imgur.com/nrtkitJ.jpg" rel="nofollow">http:&#x2F;&#x2F;i.imgur.com&#x2F;nrtkitJ.jpg</a>. It&#x27;s almost all crops (maximize $) and it requires the farmer to be trapped within hay bales. Otherwise, he walks to where you&#x27;re clicking and can sometimes get in the way of the click. It would mess up every now and then, but was fairly reliable -- just run the script and let it do its thing for a few minutes. The trick was to flip the game into full screen mode, zoom all the way out, start at a known (x, y) position on your screen&#x27;s resolution, and then loop through all crop positions by incrementing&#x2F;decrementing (x, y). Only slightly tricky because of the isometric view and avoiding clicking on some non-crop positions. Picking the right crop was important too, to maximize yield. I just wanted to do two runs a day: first thing in the morning and then in the evening when I got home from work.<p>I moved up fairly quickly and quit when I beat all of my friends. Got some jeers from those who thought I was actually playing Farmville so much, but had a few requests for said script ...
评论 #6740309 未加载
评论 #6740303 未加载
评论 #6743050 未加载
Timotheeover 11 years ago
I had a somewhat similar story a few years ago with Bejeweled 2 (except that I didn&#x27;t seek a way to cheat, just came across it).<p>I wrote it up here: <a href="http://timotheeboucher.com/on-writing-laconic-error-messages.html" rel="nofollow">http:&#x2F;&#x2F;timotheeboucher.com&#x2F;on-writing-laconic-error-messages...</a> but the gist of it was that their score submission endpoint required a checksum, but the error message if the checksum was wrong was:<p><pre><code> &lt;Response type=&quot;error&quot; reason=&quot;Checksum failed (ext_csm = cc7ae8d3d26d911f9d6e6178d93b9fc0, int_csm = c1f19e476622b8df7f830ee0c45df533)&quot; server_ver=&quot;1.0&quot;&#x2F;&gt; </code></pre> Yes, the `int_csm` value is the checksum the server expected instead of the one I had passed. It would tell you &quot;you&#x27;re wrong. But here is the correct answer&quot;. I could then just re-submit with the proper value…
评论 #6742460 未加载
smarticianover 11 years ago
Maybe I&#x27;m overly cautious, but in today&#x27;s world, where even simple URL manipulation can be regarded as hacking, I would be very reluctant to post exploits like this. It&#x27;s crazy, but this can be construed as wire fraud or computer crime:<p>18 U.S.C. § 1030(a)(4)<p>Whoever— (4) knowingly and with intent to defraud, accesses a protected computer without authorization, or exceeds authorized access, and by means of such conduct furthers the intended fraud and obtains anything of value, unless the object of the fraud and the thing obtained consists only of the use of the computer and the value of such use is not more than $5,000 in any 1-year period . . . shall be punished as provided in subsection (c) of this section.<p>&quot;Protected computer&quot; in this context means any computer that is connected to the Internet. And the value obtained would be unlimited use of the game, which would normally be a limited. True, that last part is up for debate, as it is possible to play the game without paying, but I wouldn&#x27;t want to be forced to argue this in court...
评论 #6742226 未加载
评论 #6742651 未加载
sbovover 11 years ago
I&#x27;ve worked on a few flash games in my free time. Ultimately since the game code resides in the client, it will always be feasible to cheat. That, of course, doesn&#x27;t mean you can&#x27;t deter some.<p>One of the things that kept people from snooping around was encryption. All communication went to 1 vaguely named endpoint with 1 parameter, which was a an encrypted list of the parameters and the action to take. This will deter some, but not others.<p>At the start of a game, the client had to contact the server for a key. This changed each time you played. Any score submission required this key - if it was wrong I ignored it. Only 1 score submission per key.<p>Note that you have other useful information now: you know how long they were in game to get their score. I flagged scores that were abnormally high for the time it took to get them. I would then review them, and based upon their score history hellban them - they could still play, but no-one saw their high scores except themselves.<p>If Candy Crush did something similar, they would likely catch you. You wouldn&#x27;t even know until you gloated and your friends said they can&#x27;t see your score. Some people who got hellbanned would contact me, and I&#x27;d give them a free pass.<p>Of course you could cheat and get a normal score in a normal timeframe, but I didn&#x27;t care as much about that.<p>Beyond trying to thwart cheating, I&#x27;m a big fan of cheating in games myself. It&#x27;s part of why I enjoy eve online so much, because they encourage the usage of 3rd party tools more than any other game I&#x27;ve played.<p>The most extensive thing I&#x27;ve programmed for cheating is probably a custom MUD client to facilitate multiplay. The clients report to eachother information they know. All clients keep the state of the group and the things I&#x27;m fighting. They also keep track of which client can do what, so I can type into any client that I want to heal someone and the program will figure out which client is able to do that, and tell it to do so.
egeozcanover 11 years ago
Even though it doesn&#x27;t have a winning &#x2F; losing condition, I had coded an automated bot[0] to draw for me in Doodle or Die[1]. Stopped using it when people started complaining though. It was supposed to be quick and dirty, that&#x27;s why it&#x27;s a windows forms application. But of course I kept improving it for a while. After implementing a very basic plug-in system, I realized I was spending too much time on it =) Here&#x27;s an example drawing from a friend of mine, using my tool: <a href="http://doodleordie.com/c/EGXBBJeMU45#2" rel="nofollow">http:&#x2F;&#x2F;doodleordie.com&#x2F;c&#x2F;EGXBBJeMU45#2</a><p>[0]: <a href="https://github.com/egeozcan/DrawThatThing" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;egeozcan&#x2F;DrawThatThing</a><p>[1]: <a href="http://doodleordie.com" rel="nofollow">http:&#x2F;&#x2F;doodleordie.com</a>
评论 #6742773 未加载
rickdaleover 11 years ago
Back in the day I would log onto yahoo chess and beat everyone by simultaneously playing expert mode in windows chess and just mimicking the expert modes moves on yahoo as mine. Good times, never lost.
评论 #6740270 未加载
评论 #6740336 未加载
评论 #6740601 未加载
评论 #6741571 未加载
edwhitesellover 11 years ago
Step 1: ATT adds the &#x27;infinite lives&#x27; interception&#x2F;response to the proxy servers for the Starbucks hotspots&#x2F;WiFi.<p>Step 2: Starbucks Marketing advertises &#x27;Unlimited Candy Crush lives at Starbucks!&#x27;<p>Step 3: Profit! Well, assuming all of the squatters actually buy stuff.
评论 #6739969 未加载
评论 #6739786 未加载
togilvieover 11 years ago
Awesome breakdown. I wrote a blog post in late September - based on some industry rumors - that speculated on whether Candy Crush was &quot;cheating&quot; by varying the random seed to generate monetization or retention events:<p><a href="http://blog.thinkgaming.com/is-candy-crush-cheating-will-it-matter/" rel="nofollow">http:&#x2F;&#x2F;blog.thinkgaming.com&#x2F;is-candy-crush-cheating-will-it-...</a><p>Based on the &quot;seed&quot; going back and forth at the start&#x2F;end of games, I&#x27;d have to assume that they are doing something with it. Anyway to see if that&#x27;s happening?
评论 #6739797 未加载
hungover 11 years ago
Awesome! I once wrote a boggle solver to beat my friends at Bogglific on Facebook. It was loads of fun until I was banned from the game.<p><a href="http://www.hung-truong.com/blog/2007/11/07/banished-from-boggle/" rel="nofollow">http:&#x2F;&#x2F;www.hung-truong.com&#x2F;blog&#x2F;2007&#x2F;11&#x2F;07&#x2F;banished-from-bog...</a>
评论 #6740148 未加载
评论 #6739539 未加载
v64over 11 years ago
I don&#x27;t know how valid it is now, but in July of 2011 I reverse engineered some aspects of Zynga&#x27;s Words with Friends and put it up online: <a href="https://github.com/v64/fiend" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;v64&#x2F;fiend</a><p>The most interesting part was the way they decided to do the random generation of letter tiles. At the start of the game, each client was given the same PRNG seed (in the case of Words with Friends, the PRNG was a Mersenne twister), and when tiles needed to be drawn from the bag, instead of having the server tell you what tiles you received, you would use the preseeded PRNG to randomly draw your tiles from the available pool.<p>Of course, as your opponent is also doing this with the same preseeded PRNG, this also allows you to determine what tiles your opponent has, and what order the tiles will be drawn in for the rest of the game.
KVFinnover 11 years ago
F2P models are so strange.<p>Game piracy used to mean stealing the game. Now &#x27;piracy&#x27; is getting extra lives.
miguelrochefortover 11 years ago
I used to cheat at SongPop using the multi-finger multitasking on the iPad (pausing the game a fraction of a second after a song started playing, having plenty of time to guess the song properly). I could beat anyone using this technique, but it required manual work.<p>I expected a similar &quot;hack&quot; with Candy Crush, and was surprised by how &quot;high-tech&quot; their solution is. Good stuff.
boukover 11 years ago
Remember Draw Something? That game that was sold for $180 million to Zynga? I wrote an API library for that in Python <a href="https://github.com/bouk/drawsomething-api" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;bouk&#x2F;drawsomething-api</a> that allowed me to just add coins (the currency they sell for real money) through simple API calls.<p>Good times
评论 #6743236 未加载
Globzover 11 years ago
I am sure they did this to offload the server.<p>I remember reading an article about some javascript games and how to find the balance for game state server-side check.<p>source : <a href="http://fugiman.com/blog/2013/08/17/on-click-fueled-javascript-games/" rel="nofollow">http:&#x2F;&#x2F;fugiman.com&#x2F;blog&#x2F;2013&#x2F;08&#x2F;17&#x2F;on-click-fueled-javascrip...</a>
just2nover 11 years ago
A long long time ago before I ever wrote a line of code, I&#x27;d just play all the games I could. I was fascinated by how they worked. I later found a book on BASIC that introduced programming by having the reader write simple word games. After learning the basics, I then would wonder how FF1 managed to change states from being in a tiled map and exploring the world into a battle screen and back again, which led me to more learning and eventually I ended up making a very shoddy Zelda clone that ran in DOS. I think I was 11 or 12 at the time?<p>Anyway, one day a long time after that, I was playing this new mod for Half-Life called Counter-Strike. It was fun, and I had started learning C and about OpenGL to understand a bit more about how HL worked itself. But on this day I saw a guy just running through de_dust getting tons of headshots. Watching his camera, it seemed he had superhuman aiming. Comments about cheating flew, and this was long before the game was infested with cheats. He also seemed to know where everyone was. How?<p>A few hours later I discovered he was using a cheat called ViperG. It along with another cheat called XQZ were the only known public cheats at the time. ViperG was open sourced on a forum called clientbot at the time. Since I was learning C, I was actually able to read the code. Back then, HL only imported mod client function implementations using DLL imports, so you could write a DLL that exported fake client functions while also importing the real ones from a renamed client.dll, which let your cheat intercept all of the client API calls. Most in ViperG were just pass throughs, but one would gather entity information from a drawing API and another would draw some text on the screen in a HUD update API, etc. It was almost no code but it rendered little &#x27;+&#x27; signs on every player through walls and would let you automatically aim at their heads. Crazy.<p>This is when I realized that I could actually take software people had written and break it to make it do whatever I wanted, and that&#x27;s when I feel like I really started learning things. Understanding how programs ran on my OS and learning how to reverse engineer came pretty rapidly. XQZ was closed source but had some really nice features, so I&#x27;d reverse its gl function exports and figure out exactly what it was doing so I could replicate them in my own cheat.<p>Doing what the author did here for modern MMOs can actually be a very difficult exercise, even for seasoned reverse code engineers. I&#x27;ve done it for several games, essentially reversing the entire netcode to write cheats that automate client actions, and there are all sorts of ridiculous traps I&#x27;ve seen to prevent you from doing so. One game even went so far as to require you to parse a terrain file and send the cell ID of your movement target in every movement packet, along with the absolute coordinates. This was slow as an iterative find process as a map had tens of thousands of triangles and you&#x27;d be sending these quite often, so naively you&#x27;d just loop over each triangle and check if your target coordinates were inside of it. This gave me a nice introduction into quadtrees and other algorithms that can make this operation asymptotically much faster. Yay learning.<p>To this day, I can only play a game so much before I get an overwhelming urge to break it. I think that despite the stigma of cheating, it&#x27;s a great way to learn. It&#x27;s comparable to taking something apart to see how it works and change it around a bit. Just don&#x27;t take it too far and ruin games for other people.
评论 #6743044 未加载
评论 #6742778 未加载
sucrenoirover 11 years ago
I built a small app to cheat at Landlord (<a href="http://www.landlordgame.com" rel="nofollow">http:&#x2F;&#x2F;www.landlordgame.com</a>) to check and buy venues from anywhere in the world. There was also a small script to get huge amount of coins (through faking twitter and facebook sharing).<p>After 10 days i was number one in the rankings. Scores and amounts of $ was so large that the iphone app was starting to bug... Of course it does not work anymore.<p><a href="https://github.com/iesta/landlorder" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;iesta&#x2F;landlorder</a>
benmannsover 11 years ago
It looks like the author is decompiling the Flash SWF for the Facebook game. Would there be an equivalent way to do this for games on an iPad&#x2F;iPhone without rooting the device?
评论 #6739780 未加载
评论 #6740132 未加载
评论 #6739986 未加载
Yhippaover 11 years ago
What&#x27;s the best solution for this, managing game state server-side? Did they do it this way to offload storage and processing for scalability reasons?
评论 #6742334 未加载
评论 #6740157 未加载
评论 #6739724 未加载
评论 #6740941 未加载
评论 #6740726 未加载
评论 #6740059 未加载
squeakynickover 11 years ago
Years ago, for fun, I wrote a Bejeweled Blitz player. As with others here, the fun was about the challenge, not about &#x27;beating&#x27; the game.<p><a href="http://www.datagenetics.com/blog/march2009/index.html" rel="nofollow">http:&#x2F;&#x2F;www.datagenetics.com&#x2F;blog&#x2F;march2009&#x2F;index.html</a>
kinover 11 years ago
Cookie Clicker: <a href="http://orteil.dashnet.org/cookieclicker/" rel="nofollow">http:&#x2F;&#x2F;orteil.dashnet.org&#x2F;cookieclicker&#x2F;</a> This game is all client-side so it&#x27;s easy to cheat. The cool thing is you actually get achievements for cheating!
irfanover 11 years ago
In 2007 I did the same level of digging with a facebook puzzle solving game. Game used to post daily puzzles and top scorers (solving the puzzle in minimum time) were shown on global leaderboard. At that time, the app was not using any kind of hashing or validation. It was simply posting the score to the server so tempering the data was easier. After staying on top of global leaderboard for a few days (with impossible score of 1 second), the app developer contacted me and requested to stop cheating the system. I suggested him some changes and the game became much better
bayesianhorseover 11 years ago
As long as using wget can lead to a conviction for hacking, it might not be the best idea to admit such a hack publicly...<p>But luckily in the EU the European court for human rights should stop such stupidity in its tracks.
btgeekboyover 11 years ago
The only winning move is not to play.
aetimmesover 11 years ago
A strange game.<p>The only winning move is not to play.
评论 #6742262 未加载
Liongaover 11 years ago
it is crazy that a game that makes multi million dollars every day has no server side validation at all and just trust the client. crazy
评论 #6739611 未加载
评论 #6740525 未加载
评论 #6739843 未加载
Cyph0nover 11 years ago
Nicely done. Now I have to find the secret key...
评论 #6739440 未加载
chris_wotover 11 years ago
I once lost a license key for a major enterprise system. It had to get a demo up and running ASAP. Luckily, it was an ASP.Net app. I was able to use .NET Reflector, find a code rewriting plugin, and I blanked out the function that did the cert check (always made it return true) and I was able to login.
评论 #6744396 未加载
thecodemonkeyover 11 years ago
Wow! I&#x27;m surprised to hear that their production servers output a full stack trace.
评论 #6740677 未加载
itakeeover 11 years ago
This guy did it faster using memory hacking: <a href="https://www.facebook.com/photo.php?v=308857235912631" rel="nofollow">https:&#x2F;&#x2F;www.facebook.com&#x2F;photo.php?v=308857235912631</a>
mathattackover 11 years ago
Great story. I think it&#x27;s less about cheating and more about poking your way around public software. I appreciate the spirit of adventure in searching through the game.
评论 #6743241 未加载
mrcactu5over 11 years ago
<p><pre><code> What’s this? It looks like we can just tell the game we finished a level, without any other hassle </code></pre> the game insults players&#x27; intelligence on so many levels
ydesouzaover 11 years ago
You could also use a memory editor. Like this - <a href="http://www.ydesouza.com/crandy-crush" rel="nofollow">http:&#x2F;&#x2F;www.ydesouza.com&#x2F;crandy-crush</a>
mnml_over 11 years ago
NameError: name &#x27;start_game&#x27; is not defined
评论 #6740092 未加载
cycnusxover 11 years ago
This is so much faster, I had been using CheatEngine to modify the values, then play the entire level.
sengstromover 11 years ago
The best way to play this game.