What Computer Science Students Can Learn From Candy Crush Saga

I’ve got to take a break from Candy Crush Saga.  I’m banging my head against the wall on Level 79.  I need to do some new thinking in order to solve this level, I think.

I don’t play a whole lot of games on the iPad but this one caught my eye.  A friend of mine was bemoaning that she wouldn’t be able to play it nearly as much as school got back on track in September.  At the time, I hadn’t heard about it.  I asked my daughter who said that she refused to play because she has friends that are obsessed with it and she wanted to have a life.

I thought I would try it out anyway.  The first few levels were pretty easy.  I mentioned to my daughter that it reminded me a lot of Bejewelled Blitz.  “Maybe at the beginning, Dad, but it gets more difficult and there are new things introduced.”  Hmmm.  Does she really not play it?

It’s the type of game that takes a couple of minutes to play and so I’ll have it next to me in the living room and might try out a level or two during television commercials.  It is an addictive little game – free for the download – and there’s a real sense of satisfaction upon completion of a level.  I view the various levels as puzzles to be solve.  I also play these games with my programming mind switched on and I think there’s just a tonne of things in this game that would be great to discuss with computer science students.

  • The game really is about moving objects around the screen and checking to see if there are at least three in a row.  Four or five in a row or in a particular pattern generate more powerful candies.  It really is just a matrix and you’re checking adjacent cells;
  • Part of the joy of programming is that, when you’re doing something new, you can create your own rules.  There’s no laws in the physical world that says that combining three red candies gives you a red and white striped candy that has its own super actions;
  • Gravity rules – sometimes.  This is the point above extended.  When we hold a tablet, and open space appears, we expect things to drop from the top down.  For the most part, this happens but the rules of gravity get changed at some levels.  Fun to program and yet somehow compelling for the end user;
  • You’ve got to look ahead.  The most obvious next move may not necessarily be the best move.  Sometimes, it’s better to think beyond the next step;
  • If you enjoy programming, your future might not be locked into a cubicle writing business software.  Check out their invitation to join the kingdom.  Is that what you envisioned a job as a computer programmer?
  • Not all games are first person shoot-em-up types.  Not everyone is into that.
  • You can put a dollar figure on your Facebook value.  There comes a time in the game where you need to spend money to immediately proceed or to ask for help from your Facebook friends.  Are your connections worth the cost to buy outright?
  • A good game goes both ways.  Like so many good games for the tablet, Candy Crush Saga plays in both landscape and portrait mode.  What difference will that make in your coding?
  • You need to embrace gestures.  Many of your class programs may wait for input from the keyboard.  Or, perhaps you’re using a mouse for input actions.  Are you prepared to move to a tablet with its swipes and swooping actions?
  • There’s good money to be made from free software!  According to E! Online, Candy Crush Saga makes $850,000 per day.  That’s not bad for a day’s work.
  • Three D is not dead.  Despite the modern user interfaces that Apple and Microsoft promote, check out the candy in the diagram above.  The art of creating 3 dimensional graphics still works!
  • Make sure that you’re writing for all audiences – male, female, young, old – make it devilishly good to attract as many as possible;
  • Randomness is good but also be prepared to look ahead and handle a “no move scenario” as gracefully as you can;
  • Be super particular about your graphics.  Make sure that every pixel is in place for best effects;
  • Never rest on your laurels.  Look to swat bugs as they appear and continue to make your product better.

Computer science, writing software, and supporting it is a true art.  Once students get past the mechanics of the language and make it sit up and dance, they become true programmers.  You can learn a great deal from excellent software.

Author: dougpete

The content of this blog is generated by whatever strikes my fancy at any given point. It might be computers, weather, political, or something else in nature. I experiment and comment a lot on things so don't take anything here too seriously; I might change my mind a day later but what you read is my thought and opinion at the time I wrote it! My personal website is at: http://www.dougpeterson.ca Follow me on Twitter: http://www.twitter.com/dougpete I'm bookmarking things at: http://www.diigo.com/user/dougpete

4 thoughts on “What Computer Science Students Can Learn From Candy Crush Saga”

  1. When I was a tutor at UW for Computer Science we would sometimes sit around and think of new assignments related to the learning. As you can imagine, it’s not a great idea to reuse simple CS assignments as they are; some modifications are a good idea.

    We were talking about designing a task that involved arrays/linked lists and trees, and I suggested a game called “Sweet Tooth”, which was pretty much exactly the same as Bejeweled. I don’t know the history of which came first, but I was playing Sweet Tooth at the time and hadn’t heard of Bejeweled then.

    One of the profs liked the idea, and we explored it further. We provided the rules of the game and some images to work with. The assignment was tiered; you could implement more components to demonstrate your understanding of the structures more completely. I remember the “no more moves” being an interesting problem – ensuring that there were always moves available if you toggled that setting in the game.

    We went ahead with the assignment, and there were some really, really awesome implementations. Most students became really engaged with the project, and there were a few who even implemented a “look-ahead” algorithm for a computer player – you could compete to see whether the computer would outperform you using a given pseudorandomization seed. Others improved the animation of the game pieces so that it was really slick and smooth.

    Another thing I found interesting what that we often required a text UI for these graphical assignments; as a tester you could run with a command line switch to enable the text UI and have a fast, dramatically simplified interface (and we could run automatic marking scripts for the simple stuff, which was nice). I wonder if they still do that….

    Writing a game (even copying one) was a great exercise for those students, and for me as a tutor. Thanks for the memories, Doug.


  2. While you’re taking a break you could try out Flappy Bird. Oh wait, the developer just took it down! What’s up with that? No developer would just say “I can’t take this any more” and forego the cash pacification surely!


  3. Hi there! I could have sworn I’ve been to this web site before but after going through many of the articles I realized it’s new to me.
    Anyhow, I’m certainly happy I discovered it and I’ll be bookmarking
    it and checking back frequently!


Comments are closed.