Super Queue – queue and lottery viral game in PHP and JavaScript (November 2014)

I made this game for a Chinese software company whose final client was a chain of jewelry stores that wanted a Weixin (aka WeChat) game to promote themselves by giving the players some prizes and coupons just during a week (to celebrate the Chinese Single’s day, the 11th of November). Weixin (WeChat) is the most used instant messaging client for mobile devices in China, made by Tencent (the same company that also owns QQ).


The graphics are made by 乔安 (Qiao An) and Chinese translation is done by 董双丽 (Dong Shuangli). The development took almost one month.

The game consists of two levels. In the first level, you are waiting in a queue and your mission is to jump the queue until you can enter the door. Once you enter through the door, the second level consists in waiting for a partner of the opposite gender (it can be either a real player or a fake one if the game is configured to use fake players or the admin force it) and, when you get a partner, then each of you have to spin a roulette wheel with zodiac symbols and both will win a prize if you both get the same zodiac symbol. If you get a different symbol, you get a discount coupon instead.

It is a viral game because players have to share the game to others in order to jump the queue they are waiting in. Every time someone registers through your invitation, you will jump two places. But others will also be able to jump and move in front of you so it becomes a kind of fight.

Players do not need to have the game open all the time. So they can close the game and open it again later whenever they want to. If any progress has been made or any thing new has happened, the game will show it.

There is a maximum number of people per queue, so the game creates a “new world” with a new queue every time a person joins the game for the first time if all other queues are full. The game also fills the queue with fake people in order to increase level difficulty and to avoid looking empty. All of that is configurable through variables.

The way to log in, prizes, maximum people per queue, chances to win, and many other things can be configured through the configuration file.

The game already includes Chinese and English languages. There is also a localization file that allows to translate the game into many more languages easily. The game will try to detect automatically the user’s language.

The company wanted to run the game just for a week. During this week, the game was a complete success and had more than 50,000 players. All prizes were given out.

The game was running on Weixin (WeChat) and uses some of its functions, but it can be configured without effort to be used in any other app or platform (as for example in QQ, Facebook or any web browser with JavaScript and CSS enabled).

There is a debug mode which can be accessed through a password. That debug mode shows useful information about the game in real time and it also provides an admin control panel (similar to a God mode panel) with many options to cheat, control other players, etc.

It also includes an overload test page to check server limits.

This game was made using technologies as HTML, CSS / CSS 3, JavaScript, JSON, XHR (AJAX), PHP, mySQL, RPC (Remote Procedure Call), OpenID, OAuth, Weixin API (WeChat API) / WeixinJSBridge, etc.

You can try the game by yourself just creating the database needed (a SQL file with the required tables is included) and editing the configuration file to use that database. Basically, you just need a web server that supports PHP and mySQL.

It can be found on GitHub:

TetrisDAI – Tetris in Java (May 2008)

“TetrisDAI” is an open source Tetris clone (highly modular) written in Java 1.6 (aka Java SE 6) with NetBeans.


It is my first Java game and was made in mid 2008.

The code is extremely modular and is ready to be modified and configured pretty easily by anyone. For instance, you can change control keys, their delay, add new pieces with different shapes or change the current ones or even delete them, change the colour of the whole game (including the pieces), change game visual aspect and sizes (width and height of the cells and of the map, text aspect, margins), decide whether to use images or just simple computer-generated graphics for cells and background, decide language (game is already translated into Spanish, Catalan and English and just needs to change a variable to choose one among those languages) or add new languages easily, change menu items, change initial speed and speed increase when next level is reached, change needed lines to finish a level, modify score system (score for piece placed, score for each line and exponential score increase for multiple lines), enable or disable sound and so on.

Official language is English but the code also includes Spanish and Catalan translations (as stated before, just by changing a variable, all the game will use the desired language).

This game has been tested under Linux, NetBSD, OpenBSD, FreeBSD, Windows, Mac OS X, Haiku OS and others.

Official web site: (mirror at

It can also be found on GitHub:

Gamoliyas – Game of Life in JavaScript (August 2007)

“Gamoliyas” is an open source Conway’s Game of Life version (highly configurable) totally written in DHTML (HTML, CSS and JavaScript).


It is my ninth DHTML game and was made in mid 2007.

Players can configure the game with many options, as changing the world size, choosing between spherical and limited world, using colours that change depending on the number of neighbours, changing speed, saving a world or opening a previously stored one, drawing cells yourself or generating them randomly, etc.

The game is specially designed to allow to be used inside any other web site (by using an IFRAME, for example). We just need to get the URL (which will be used in the SRC parameter of the IFRAME tag) generated by the “save world” option with the desired behaviour we have decided in the options that the game will ask us (world size, auto-play, spherical world, multicolour, hide top menu, hide bottom controls, hide bottom information panel, do not allow to draw, speed, size of the cells and space between cells). The game accessed through that URL will start containing the cells which were present when we pressed the “save world” option. You can see a live example using this game with an IFRAME in my personal portfolio:

You can also change the game behaviour easily by editing many of the configuration variables which are at the beginning of the script. To change the game images you just need to replace them with others.

This game only uses a few images which are not necessary to make it work if we are using the game with the panels and such hidden. So all the rest you can see has been made using just pure HTML and CSS.

Official languages are Spanish and English.

You can find other modified and adapted versions of this game on the Internet, including one Opera widget.

This game has been tested under BeOS, Linux, NetBSD, OpenBSD, FreeBSD, Windows, Mac OS X, BlackBerry Tablet OS, Android, iOS and others.

Play online in English:

Play online in English (mirror):

Play online in Spanish:

Play online in Spanish (mirror):

Official web site: (mirror at

It can also be found on GitHub: