Imperfect technologies

Hello. I’m Michael Kapelko, Opensource Game Studio team programmer.
I want to tell you what we learnt while heading towards OGS Mahjong 1.0, our final release of Mahjong solitaire (but not final in Mahjong series). This article continues the previous one: A long way to Mahjong 0.7
One year ago, May 2011, we released OGS Mahjong 0.7, it was a difficult confinement. This year, September 2012, we released OGS Mahjong 1.0. While heading to 1.0 release we wanted the game be available on all Linux distributions, and also support Mac OS X.
Unfortunately, we failed to do that, because OGS Mahjong uses OGRE and OIS.


OGS Mahjong started to use unstable (at the time) OGRE 1.8 in the summer of 2010 when I was implementing game window recreation without reloading resources. My patch to achieve it has been incorporated the same summer into OGRE 1.8 tree.
I thought it’s not going to take more than one year for OGRE to reach 1.8, by the time we release OGS Mahjong 1.0 we should have been dependent on stable OGRE instead. OGRE 1.8 has been released on May 28, 2012. Although, by that time:
1) we tried OIS 1.3 (latest at the time) which didn’t work for us (details below);
2) I’ve patched another file (for the record: Overlay::setMaterialName) of OGRE which I did not commit, since I knew it’s gonna take another year for the tiny change to be released.


OGRE uses FreeImage as its main image codec. The big problem with it is that it’s unsupported by Gentoo, because FreeImage developers refuse to use system libraries like zlib, png, etc. They instead static link all the dependencies into FreeImage.
EDIT: FreeImage is in media-libs of Gentoo. The rest of the problems still apply.
They only fixed the clashing by hiding used libraries which is still wrong.
Just as the author proposed the 3rd option of kicking FreeImage, we do it. Along with other libraries.


OIS is yet another slow release cycle library. Recently 1.3 release came out which totally ruined Linux input handling for us. The repeat key handling has been rewritten and OGS Mahjong has been simply stopping to accept input after running for 30 seconds.
I’ve contacted the developer with the key handling bug, but he couldn’t reproduce it. We had to stick with 1.2 for Linux.
OIS 1.3 can’t be compiled under MinGW, only the latest (at that moment) SVN revision can.
As for Mac OS X, OIS screwed us here as well, because the guy who tried to help us compile Mahjong on Mac OS X just couldn’t build OIS due to compilation errors.
Since 1.3 has been released, it is shipped in all Linux distributions now which prevents OGS Mahjong to be built from sources for Linux distributions. Unacceptable, too.


On the contrary to OGRE and OIS, CEGUI is a much better library, with excellent support from its team members, especially CrazyEddie who have helped us a lot with OGS Mahjong development. But CEGUI has one major drawback: it’s complicated for designers. All GUI has been done solely by me, programmer. And GUI does change a lot during development. So GUI took more of my time than it should.

As you see, the above libraries have put some heavy weight on us. More than I, the only programmer, can handle. I understood that if we want to make the game instead of constantly solving other developers’ mistakes, we have to drop those libraries. Of course, we can spend our entire lifetimes to fix mistakes made by others, but hopefully there are simply better alternatives (from the dependency and feature perspectives).


I discovered OpenSceneGraph thanks to 2 OSG books recently released:
1) OpenSceneGraph Beginners Guide, 2010.
2) OpenSceneGraph Cookbook, 2012.
I first looked at OSG back when I chose OGRE over Lightfeather in 2010. OSG, being complicated, didn’t attract me at the time, because I simply failed to understand its tutorials. The books helped me see OSG well defined structure, out-of-the box common technique support, no dependency on FreeImage. OSG is also present in Linux distributions.
Out-of-the box support for common techniques is another serious issue I’ve had with OGRE. OGRE claims to support shadow mapping, and it does so, but only with Cg. Yet another dependency! There was simply no tutorial to implement it in GLSL. I’m not a shader guy and I failed to implement it myself in a month, so we had to resort to stencil shadows in OGS Mahjong 1.0.
One of the OSG books featured an example of soft shadow mapping. OSG has built-in support for various shadow mapping techniques. You don’t even have to write down a shader. It’s already written there for you! To get soft shadow mapping instead of stencil shadows, you need to change only 1 line of code.
Also, I’ve asked about GLSL shadow mapping at OGRE community forums without success. So next time you see large post counting at OGRE forums, don’t think 100% of the posts get answers. For difficult topics it’s quite the opposite.
Another major OSG advantage is that its main developer Robert is still actively participating in OSG development and is frequently responding to questions in the mailing list (OSG is 12 years old!). OGRE misses Sinbad badly.
OSG presense in distribution is also caused by not using FreeImage-like crap. OSG uses plain libpng for PNG handling, e.g.. In the end, you’re not going to have 100500 image formats. It’s gonna be only one or two.


The only alternative to CEGUI is libRocket. I’ve tried several tutorials so far, they weren’t as great and shiny as libRocket first looks, but it does use subset of HTML/CSS to define layouts (yes, it lies about being HTML/CSS GUI library). This should help us relieve me from GUI programming. If that happens, we stay with libRocket. Otherwise, we’re back to CEGUI which will hopefully have CEED ready for designers by that time (Kulik, go on!).


One of the first requirements for MJIN2 (our new game engine) was support for Python GUI and logic scripting. But later on I’ve had a thought, why not have MJIN2 library in C++ and game in Python completely, not only scripts and GUI? SWIG helps to achieve that by allowing to generate Python wrapper library around C++ one.

With Python we hope to increase the speed of game development. I have analyzed both game and engine commit logs, and it turned out that game has twice as much commits as engine has. Having game part in Python, thus, should increase development speed due to less code, less development time.

Since we’re going to have Android and iOS supported, Python will not be used on the platforms due to performance restrictions, but we can write final versions of the games in C++ or Java since MJIN2 + SWIG allows us to write a game in pretty much any language (C++ natively, and 20+ other languages with the help of SWIG).

We’re having big changes in how we develop games. We’ll see how it all turns out.
Posted in Team Blog | Tagged , | Comments Off on Imperfect technologies

Enemies, explosions, MacOS version and the true mahjong.

In the week that has passed since the release, OGS Mahjong was downloaded almost 2000 times. Can’t say that it is very much, but for us it is a highscore.
Thank you. The fact that our work is in demand, encourages us to work further.
We decided that it is time to share with you our plans for the future.
So, in the future, the Opensource Game Studio team will work on two projects at once.
The first project – arcade shooter in a sci-fi style. We have received many snide comments that our game lacks shooting and enemies, so we decided to fill the gap and make the game entirely about shooting the enemies.
The second project is OGS Mahjong 2. In the second version, we’re planning to expand the game modes list with classic Chinese Mahjong for 4 players (some of them can be replaced with AI, but don’t expect too much from it), also we are planning to add the ability to change the rules of the game by using scripts. In addition, we want to support MacOS, and, if possible, iOS and Android.
It may seem that splitting our attention on two projects is a bad thing to do, but we made this decision consciously and we’re considering it as a right step on the way to our goal – the creation of a simple and convenient tool for game development.
We aren’t ready to give you any dates neither for OGS Mahjong 2, nor for an arcade shooter. We are devoting our spare time to these projects, and each of us has his own life: work, family and friends. However, you can help us to do it sooner by supporting us (for example, by purchasing the deluxe-version), or you can join our team and work with us, or can just tell your friends about our project.

Desura Digital Distribution

We will certainly keep you informed about the progress. Stay tuned.
Posted in Mahjong, News, Projects | Tagged , | Comments Off on Enemies, explosions, MacOS version and the true mahjong.

Additional layouts and tilesets

Here is a small selection of screenshots, displaying additional layouts and tilesets from the Deluxe-version of OGS Mahjong. You can have them if you decide to support us by purchasing the deluxe-version. Also, the deluxe-version of the game will be available to all the people who helped us in the development process. The participants, who tested the unstable version of the game and completed the survey will also receive the deluxe version (those who told us their email adresses).
[nggallery id=3]
Deluxe-version is available on Desura. We’ll also try to give it to each team member and everyone who donates to us $ 5 or more, regardless the payment method..

Desura Digital Distribution

Posted in Mahjong, News, Projects | Comments Off on Additional layouts and tilesets

OGS Mahjong 1.0 is here!

So, the time for OGS Mahjong 1.0 release has finally come. For the last several months we have been polishing the gameplay and fixing bugs. Since it’s mostly a bugfix-release, we didn’t add many new features.


If you use our deb-repository, you can update your game with the command
apt-get update ogs-mahjong
If you are using Desura, you can update the game through your desura-client.
Everyone else can download the game using the folowing links.
  • Starting, finishing, pause and unpause camera animations.
  • A lot of fixes to increase the game stability.
  • Totally new Help and Tutorial interfaces.
  • The game now asks the user whether he likes or dislikes the dynamic camera.
  • New tilesets: “Flowers” and “Neo-Classic”.
  • The old “Cube” background has been removed. “Room Lite” and “Inside the computer” backgrounds were added.
  • Thanks to Miguel de Dios, the game now has the spanish translation.
  • Added a button to access statistics screen from the win and loss screens.
  • A bug with incorrect tile selection was fixed.
  • Mode and difficulty filters were added to statistics screen.
  • Autodetection of video settings during the first start has been slightly improved.
  • Layout editor has been improved.

Download 1.0 version

If you are using Desura, you can install or update the game with your desura-client.

Desura Digital Distribution

The users of Ubuntu, Debian and Mint linux distributions can use our repository:

deb stable ogs
apt-get install ogs-mahjong
apt-get install ogs-mahjong-full

Everyone else can download the game using the folowing links.
Feel free to download and play the game. Leave your comments on our forum.
Posted in Mahjong, News, Projects | Tagged , , | Comments Off on OGS Mahjong 1.0 is here!

Some new screenshots

We are finalising the OGS Mahjong 1.0 release: we are testing the gameplay, fixing remaining bugs, integrating the translations (for which we thank our volunteers).
The release time is close. Meanwhile, we would like to present a small set of a OGS Mahjong 1.0 screenhots, where you can see new tilesets as well as the new background (we think it matches nicely the tiles with Linux distributives’ logos)
[singlepic id=57 w=64 h=48 float=left][singlepic id=56 w=64 h=48 float=left][singlepic id=55 w=64 h=48 float=left][singlepic id=54 w=64 h=48 float=left][singlepic id=53 w=64 h=48 float=left][singlepic id=52 w=64 h=48 float=left][singlepic id=51 w=64 h=48 float=left][singlepic id=50 w=64 h=48 float=left]
Posted in Mahjong, News, Projects | Tagged , | Comments Off on Some new screenshots

OGS Mahjong release trailer

Posted in Mahjong, News, Projects | Tagged , , | Comments Off on OGS Mahjong release trailer

OGS Mahjong 0.9.7 is available

This is a new and unstable(!!!) version of OGS Mahjong. It’s not final, it may (and will) contain some serious bugs. You can download it if you want to help us testing it. If you’re waiting for the next stable version of OGS Mahjong, please wait for 1.0 version, which will be released later this month.


  • A lot of bugs were fixed.
  • Added a new tileset “Neo-Classic”.
  • Added camera animations feature. It can be disabled in game settings menu.
  • Information screen was seriously changed.


Apt repository for Debian, Ubuntu and Mint

deb unstable ogs
apt-get install ogs-mahjong

Testing version on Desura

If you’ll download the game, please give us some feedback by taking a part in a small survey. It’ll help us to make the game better. The game will offer you to do it, so you don’t need to do it right now.
Posted in Mahjong, News, Projects | Tagged , , | Comments Off on OGS Mahjong 0.9.7 is available

The begining of the spring and the International Women’s Day!

In Russia and Eastern Europe the 8th of March is considered to be Women’s day. We would like to congratulate our beloved fair sex and present you the new spring tiles theme for OGS Mahjong.
[singlepic id=47 w=320 h=240 float=]
Download this archive and unpack it to the res/themes folder of the game.


To use this tileset, you need the OGS Mahjong 0.9.1. Version 0.9 will not work with this tileset.
Posted in Mahjong, News | Tagged , , , | Comments Off on The begining of the spring and the International Women’s Day!

Numbers in words. Part 4

The final part of the article is ready.

Read more…

Posted in Mahjong, News, Projects | Tagged , | Comments Off on Numbers in words. Part 4

Numbers in words. Part 4.

Read the part 1.

Read the part 2.

Read the part 3.

Some more numbers in the end.

As mentioned above,  we were advertising OGS Mahjong 0.6 on 16 websites. Unfortunately, we can not estimate the percentage of each site in the number of downloads (we are just now beginning to think about how to track this information), but we know their share in the number of visits to our site.

15.5% of visitors came to the site directly. 11% found the site in Google or another search engine. The remaining 73.5% divided among the various sites. And here we were surprised.

Most visits to our website were brought by the article “5 More Linux Games You Probably Haven’t Played”, which appeared a few days after we released the OGS Mahjong 0.6. We are grateful to the authors of this article for noticing and mentioning our game. They brought us 36% of visits, but we’ve learned about this article about a month later.

In general, after the release of version 0.6 we had the following top ten ways of getting visitors to our site:

I was surprised that the post on, which gave us the most of downloads, didn’t bring  a single visitor to the site. The reason was quite evident – there was no link to the site in the post.We realized this mistake only recently, and in the post about version 0.7 there was a link to the site, but it was not in the posts about versions 0.8 and 0.9.

With the release of version 0.7 the proportion of visitors on direct links increased to 20%, the share of search remained the same, and all sites brought us 69% of visitors. You may notice that the top ten has changed slightly:

Unexpectedly for us, deb-packages for the version 0.7 appeared on the internet site We didn’t count their downloads when calculating total number of game downloads, but their appearance has convinced us that we should start to publish our own deb packages.

After the release of version 0.8, the proportion of visits by direct links has fallen to 17%, despite the fact that we added a button for site-access to the game. The share of search grew – up to 25%, and for the first time has risen to the first place among ways in which players come to the site. The top ten were as follows:

I want to mentioning separately news on the site, which brought us 7.16% of the visitors and the site, that brought us 4.5% of visitors. We have no relation to the game-mentioning posts on these sites.

With the release of version 0.9, the proportion of visits on direct links has grown to 21%, while the proportion of visits from search has  increased to 32%. 50% of visitors came to us from other sites. The greatest number of visitors were led to us by the post about our game in the FreeGamer blog. In addition, we were finally able to see the effect of presence in twitter and facebook. In general, the top ten ways to enter the site lined up as follows:

We can make two conclusions from the above information:

  • In terms of new visitors, mentioning in some magazines, popular blogs and sites gives a much greater effect than the forums posts, even on big forums.

  • In any attempt to promote the game on any resource, whether it’s a forum, blog, or database,  a link to the site should present. Don’t forget it.

In addition to attracting new visitors, however, a useful feature of advertising the game on the sites and forums is that you can get direct feedback from users. In this matter, we have obtained the best results at developer forums (,,, and small forums that were not included in the above lists. Website was also very helpful in obtaining feedback. In contrast, the majority of sites devoted to gaming in general, or games for Linux in particular brought a little constructive feedback. Groups in social networks Facebook and VKontakte also appeared useless in getting feedback.

In the end I want to give you another interesting chart.

On this chart you can see how the number of downloads of two versions of the game were distributed among all sites, through which we were distributing these versions. The first two columns represents the downloads of versions 0.8 and 0.9 from our website or by direct links, distributed by us on the Internet resources mentioned (and not mentioned) above. The other – different services and resources that allow users to download the game from them.

A few words about the money.

On our site you can easily notice ad block from Google, as well as Flattr and Paypal Donate buttons. Some readers may seem interested how much money we got using all these tools. I can easily share this information.

So, during the time of OGS Mahjong development we have received:

  • $ 8.22 with the ad block from Google (threshold for payment is $100, so at present we can not get that money).

  • 0.68 € via Flattr (threshold for payment of 10 €, so the situation is similar to the previous one).
  • $ 0 with the Paypal Donate button (i’m not counting the one test transaction of $10 from one of our team members)

We spent quite a little money on the domain and hosting, and the cost of time spent I do not count at all, since we spend it on what we want to do. But all in alll, I can make a simple and obvious conclusion – the development of Open Source games is not a profitable hobby. At least on our stage. If something changes, I will tell you about it. :)

The final part.

I wrote this article to share the information we’ve collected and the conclusions made ??based on it. Some of them are obvious, others may be useful for beginner developers and help them not to trigger a backflash we have already triggered. If that happens – then the time spent on writing this article was not wasted. Some may draw their own conclusions from these facts. In this case we would be interested to hear about them.
At this point, let me finish. Thanks to all who participated. Thanks to those who have read to the end.

Posted in Team Blog | Tagged , | Comments Off on Numbers in words. Part 4.