Skip Ribbon Commands
Skip to main content
Toggle navigation
26 July 2013
Student life
Creating our own Gems Crush

Students of the Object-Oriented Programming and Design course (EE2311)
 
Whether you have an Android Smartphone or iPhone, the most popular games on Facebook such as Candy Crush or Bejeweled have probably already been downloaded to your devices. But have you ever thought how these popular games are developed, other than knowing the process called “programming”? We, the students taking the Object-Oriented Programming and Design course (EE2311), not only know how they are created, we have even created our own game, called Gems Crush.
 
Under the guidance of Dr Ray Cheung Chak-chung, Assistant Professor in the Department of Electronic Engineering, we were able to experience how these games were made. Gems Crush is our game’s name and the name of the project that we had to complete after taking Dr Cheung’s Java programming classes.
 
Since most people these days know about the Candy Crush game, Dr Cheung took advantage of it to stimulate students’ interest in his programming course. “I hope my students can let their friends and families know that they can develop the actual games that they play!” said Dr Cheung.
 
Our Gems Crush game is a simplified version of the classic tile-matching puzzle video game, Bejeweled. The objective is to swap one gem with an adjacent gem to form a horizontal or vertical chain of three or more gems in the same colour. Gems disappear when chains are formed and gems fall from the top to fill in gaps. Sometimes chain reactions, called cascades, are triggered, where chains are formed by the falling gems. Points are awarded for clearing the gems.
 
During the course, we could either team up with a partner or work alone for 10 weeks. We were given a sample project which contained a game library, some media files (images and sounds) as well as a demo programme to demonstrate the application programme interface (API) of the game.
 
We were able to generate random gems (7 colours) to fill up the game board when the game starts; swap any two pieces of adjacent gems; detect horizontal and vertical chains of three or more gems and eliminate them; slide the gems down to fill up holes below; generate random gems to fill up holes above; trigger chain reactions (cascades) to eliminate more gems; determine total scores by counting the eliminated gems (10 points per gem); and display time duration.
 
We were also able to develop more advanced features such as an animation for swapping and for other movements of the gems, sound effects and background music, and saving and resuming functions to reach a higher grade.
 
Some teams’ games were exceptional! The designers created extra graphics, animation and sound to make the games more fun and exciting to watch,” said one of the participating students who was grading the others’ work.
 
Here are other comments from some students who took Dr Cheung’s course:
 
“A long time ago when I was a kid, I dreamt of writing my own game. After 10 years, I finally got a chance to do just that.”
 
“I will now think of the logic of Gems Crush when I am playing similar games!”
 
“I can’t believe the amount of knowledge that we have learnt in this course (EE2311). It has enabled us to develop a game like Gems Crush! It was fun!”
 
Dr Cheung was also very pleased with the students’ work. “I am very glad that they have learned so much from the course. They are all very talented!” he noted.