BTM – sales week 04 and porting
Today I’m going to skip the weekly “Blocks That Matter” sales report… what? You were expecting it? Okay, here is a very fast recap (with 2 days late!). Right after that, I will focus on the game port for the Windows/Mac/Linux versions.
> Media coverage
This week, I don’t think we got a lot of media coverage… since it was E3! Oh gosh, did you see Rayman’s Origins, From Dust, Journey, Sound Shapes, PixelJunk: Side Scroller? It was quite refreshing in a middle of all that ‘Modern War Shooter’ things.
Anyway, here are the sales since the last report.
As you can see, the game sold massively in France and…not much elsewhere, due to a lack of marketing / media coverage.
It seems we’ve got some difficulties to appeal UK and US players!
Here are the numbers, day by day. As you get used to it, it’s not useful to remember you that the format is ‘sales / download (conversion rate)’!
– d23 (6/3/2011) : 61/ 280 (21.7%)
– d24 (6/4/2011) : 86 / 251 (34.2%)
– d25 (6/5/2011) : 99 / 285 (34.7%)
– d26 (6/6/2011) : 47 / 171 (27.4%)
– d27 (6/7/2011) : 33 / 83 (39.7%)
– d28 (6/8/2011) : 33 / 86 (38.3%)
– d29 (6/9/2011) : 28 / 77 (36.3%)
– d30 (6/10/2011) : 27 / 89 (30.3%)
– d31 (6/11/2011) : 37 / 93 (39.7%)
– d32 (6/12/2011) :39 / 84 (46.4%)
– total: 244 / 683 (35.7%)
– global: 1850 / 9558 (19.3%)
And here is the chart of the sales history (including previous numbers):
1.850 sales in one month is not that bad… but this is not what will allow us to eat. That’s why the PC version is really important for the SSS future. We are far away from the 251.355 sales of FortressCraft :]
> From players side
We got more emails from players that finished the game, and they are fairly happy with the experience. So thank you all for your comments, still warm and constructive!
We also got some mails from impatient players who wonder when and how the game will be released on computers, and how the porting is doing.
For the first question, I haven’t got concrete answer yet, but for the port thing, I can give you some info!
> Porting “Blocks That Matter”
BTM is available on Xbox Live Indie Game, so it was developed using C# language and Xna framework. Xna is a framework only running on Xbox or PC (windows only). All of these take advantage of the .NET Framework 4.0, a Microsoft technology.
Since we really want to consider Mac and Linux users, we decided to port the game to those platforms with a single version.
There were some choices to make. I came with 2 solutions, and will see what will give the best experience on the 3 platforms.
>> The ‘easy’ way
Some dev friends (Garry, Marc and Elisée) pointed me out “Mono Game”.
Mono Game is a cross-platform port of the Xna Framework that uses Mono instead of the .NET Framework.
So, what is Mono (quiclky)?
Mono is a cross-platform implementation of the .NET Framework (including compilers). It means that if you program using Mono, you will write exactly the same code that if you were using .NET Framework itself… but your code will run on all platforms Mono supports.
Mono only deals with .NET Class/Compiler/CLS, there is no binding for libraries useful to make games (like hardware accelerated rendering, audio, gamepad input, etc).
In order to have such libraries support, Mono Game use OpenTK. OpenTK allows a .NET (and Mono) wrapping of C libraries such as OpenGL (for rendering) and OpenAL (for audio).
>>> Why this is the easy way?
With the last complicated paragraph, you may wondering why the hell this is supposed to be the ‘easy’ way, because it involves a lot of frameworks and libraries so far!
In fact all of those libraries help you to keep your originally written C# code, all you have to do is compile against those libraries, the syntax of your code will be the same. Sexy isn’t it?
>>> What I got so far with Mono Game
The Mono Game actual port take me less than a week-end. I made some modifications on the Mono Game library (which is open source) to be able to run Blocks That Matter because the library didn’t handle XML file loading/parsing, no keyboard input (only touch screen support for iPhone/Android).
There is no audio support for now in Mono Game, you’ll have to write it by yourself by using OpenTK (thanks to OpenAL binding), and make some Xna classes implementation too.
Since the sound support was not crucial for a first test, I decided to give it a try with no sound support.
Here is what I got in few hours:
The rendering is a bit ‘laggy’ and this is not entirely due to the Fraps capturing. Even without Fraps, I get some very bad frametime (more than 33ms, since our game loop threshold the deltatime, knowing that a 60fps game take 16ms to deal with a frame).
I must investigate to see where is the bottleneck… maybe it’s in Mono Game… or maybe it’s simply in Mono.
I don’t think it’s in the game code since the game was running well with the Xna/C#/.Net implementation, even on my crappy Mac Mini (running on Windows).
>>> Pros Mono Game
– Easy to maintain all the version (console, Win, Mac, Linux) since it’s the same codebase
– Not really much code to provide for the game to run with Mono Game
– Not really a port, more an ‘emulation style running’
>>> Cons Mono Game
– Very bad performances for now
– Not so easy to deploy on Linux (many dependencies)
– Not really a port, more an ‘emulation style running’ -(yep, that’s a cons too)
>> The ‘hard’ way
Here is the ‘hard’ way, not the ‘real hard’ one. It consists of porting the game code in Java, including an equivalent of the Xna Framework, and the functionalities brought by the .Net Framework.
Java is a programming language and has the particularity to be thought to ease the multiplatform deploying since it rely on Virtual Machines to run a bytecode.
Since Java is not meant to display hardware accelerated stuff, neither to play complex audio effects, a special feature allows Java to use some C or C++ libraries. It’s called JNI, and with it, some libraries like OpenGL (rendering) or OpenAL (audio) can be wrapped and manipulated from Java code.
That’s what I use through a ready to use library called LWJGL. This library eases the creation of many things (create window, OpenGL context, etc) and wraps useful library gaming oriented.
>>> Why this is the ‘hard’ way?
It’s the ‘hard’ way mainly because you have to rewrite some code (sometimes a lot), because Java and C# do not act the same way. Hopefully the two languages got some similarities: they both use a managed memory system, and propose a strong Object oriented programming.
Since C# is some kind of Microsoft response to Java, the two languages share the same DNA, and it’s not rare to see some troubling similarities in the classes from the Java Classes Library and .NET.
Here is a function that says if an upgrader can open or not when the player collects a new piece.
These codes are very similar, sometimes it’s worst than that. Let’s say it’s a regular porting case.
>>> What I got so far with Java
Every cinematics and levels are loading. The inputs (keyboard and gamepad) are handled, the sounds are not implemented yet. Here what I get after between 2 and 3 weeks of porting the thing:
As you can see, the framerate is much better than the one obtained with Mono Game (running on the same machine with the same capture tools for the same time).
There are still some stuff that are not very well implemented (like the font that are all fucked up, and the tetrobot eye positioning).
As for the Mono Game version, I didn’t implemented the sounds yet (even if part of the code have been ported).
>>> Pros Java
– performances are here for this little game
– sometimes really near from C# in term of code syntax
– in browser applet could be envisaged (to promote a level, or a demo)
– deploying on various platform with the same performance results (see image below)
>>> Cons Java
– sometimes really far from C# in term of code syntax
– have to rewrite (or copy/past and adapt) a lot of code
>> What would be the ‘real hard’ way?
The real ‘hard way’ port would have been rewrite the whole game in C++. But this mean that the rewrite would have been longer than Java, since C++ has nothing to do with C# or Java (except they are all Object oriented languages).
>> What’s next?
I think I will concentrate my efforts on the Java version since it’s the one with the best performances and easier deploying.
The next step for me is to get the sounds working. Then correct the little bugs here and there, replace the placeholder font handling and make some Java optimization (because there is a room for optimization, my Java is quite rusty sometimes). And of course, including new functionalities for the PC versions. Yep, that’s a lot of work! But you, PC gamers, deserve a decent version of the game too!
And I think we will need some volunteers to run a test sample on their machine (we already got some volunteers, but we will soon ask for more!).
See you next time!
Je serais ravis de vous aider en jouant les testeurs moi aussi, sur Ubuntu et/ou windows 7.
Bisous les loulous.
About press coverage, you are on Kotaku today:
Unfortunately, it’s not a test, only suggestions made by players, but anyway tht’s good. First is a site read by quiet a bunch of players. And you have enough people who like the game to recommend it.
GG guys! Keep going!
je ne sais pas si vous connaissez la SFML qui est une assez bonne bibliothèque (elle utilise OpenGL pour le rendu) et bien que je ne connaisse pas ses limites, elle est disponible pour de nombreux langages.
En attendant, quelque soit les outils utilisés, je me ferai une joie d’acheter ce jeu (surtout quand on a pas de Xbox).
Bonne chance pour la suite.
Hehe, thanks for your support :]
I add you into our list, and I go back to the port 🙂
I’m really happy you are porting it to pc. You will definitely get my money when it comes out.
As for testing, I am willing to test on Windows Vista if you need.
Thank you for all your hard work. I hope your sales will sky rocket and make you very wealthy when your pc/mac/linux port is ready for sale. I may just buy like 10 copies of the game just to support you!
This is awesome :]
We will let you know when we’re ready!
As for Wine, it will be fun to know how the Java windows executable runs :]
I never used Wine, only heard of it 🙂
I can test ubuntu 10.04 and windows vista 🙂
along with that i can also use wine (compatibility layer for linux, allows executing for exe or windows applications on linux)
We’ll let you know when we are ready to test with you :]
Thanks Guillaume for all these precious info!
Of course when the time will come you can also count me as a tester on Ubuntu, Max OS, Windows XP/7 🙂
Hi again z0rit0 :]
You’re right, I think we will opensource this crappy Java port, in case someone is interested 🙂
As for Microsoft XBLIG backoffice, we only had access to the numbers (sales / trial) by country / day. No Gamertag info.
Sometimes that are “unknown” country with 1 download (I remember seeing a unknown sale one day).
Redeem codes are also counted : there are obvious since you got 2 entries for the download numbers for one country, one of them is a 1 download a day.
That’s all we got from the backoffice :]
Thanks for the detailed explanation Guillaume. Yes you went the hard way. But the Flixel java port you did is a great thing that maybe will interest others. Or that you could also reuse yourselves.
Now I have another question! 🙂
With the XBLIG platform are you able to know who bought your game. I mean do you have the xbox live gamertags? Or is it a secret kept by Microsoft?
Thanks again and keep up with the incredible work!
Thanks Michael for your impatience :] We will definitely try to get in touch with IGN (and a lot of other PC or even console website that were not so very interested a XBLIG game! That’s comprehensible but it was a little bit sad).
Hehe, je veillerai à ce que le costard soit conforme (un costard de sudiste hein)
coucou la dedans. disponible pour test sur os x et windows seven.
très joli boulot à vous deux.
rdv à la fin du mois pour william (oublies pas le costard)
Hey thanks for taking the effort to port it i can’t wait for release, maybe you might even be able to get ign to advertise this game?
Yay! Thanks a lot!
Hi dageek,that’s cool.
I add you to our internal list to note your preferred OS, and we will make a special post to give you were you can get the testing version when it’s ready :]
I can test on ubuntu and windows 7 (64-bit)
Re salut Divide :]
Non je n’ai pas considéré Qt, c’est vrai que pour le fenêtrage c’est pas mal multipleforme.
En fait j’ai voulu privilégier Java parce que y’a quand même de fortes ressemblances (cf. l’image du code Java/C#). Donc en gros j’opère en copier/merder et Eclipse m’indique gentillement où faire des modifs (et les faits parfois pour moi, et quand une classe du namespace Xna n’existe pas, Eclipse me la créé et rajoute les méthodes vides dedans).
Passer en C++ le code, ça voudrait dire faire extrêmement attention aux allocations (jusque là managée en C# ou Java) et je pourrais moins faire de “copier/merder” parce que le code ressemblerait beaucoup moins 🙂
Tu as considéré aussi le framework Qt avec C++ ?
Really good question.
I asked myself the same one… and yes, there are almost ONE Steamworks Java powered game on Steam: “Altitude” http://store.steampowered.com/app/41300/
I don’t know if there are other ones. But that case was sufficient to allow a Java port :]
Speaking of Steam, we have no news for now. So as for today, we are not on Steam 🙂
Is there any game made in Java in Steam?
Make sure you can add Steamworks 😉
Thanks for your sweat words 🙂 We believe in Linux gaming too! And we will share with you our experience with that platform once the game will be released 🙂 Can’t wait.
Yes, it would be a great idea to open source this Flixel > Xna > Java port. If it can help anyone like X-flixel helped us, we would be glad.
And I put you on my list of people the the tests :] (we will make a dedicated post when we are ready!).
Thank you for sharing your experience on porting, very interesting stuff. Do you plan to open source your Flixel java port?
I’m voluntering to test on Windows if you need.
Thanks for the detailed article and kudos for the port work, there is an exponentially growing Linux market waiting for games like yours.
Thanks for reading us, again and again 🙂
Yes, you remember very well, we used a Flixel Xna port to help us building Blocks That Matter (X-flixel).
So for the Java port, I simply ported all the X-flixel classes in Java, as well as the game code, plus some Xna classes rewritten in Java (on what the X-flixel framework was depending on).
Since C# and Java share some classes, and even methods signature, it’s sometimes more a copy/past and adaptation than a complete rewriting.
There are just some trap in Java, for example there are no struct in Java, and no operator overriding for the classes.
So if in Xna/C# you got something like:
Vector2 myPositon = otherPosition; // where Vector2 is a struct
then if you make a Java Vector2 class, you’ll have to make such thing:
Vector2 myPositon = otherPosition.clone();
Vector2 myPositon = new Vector2();
and then later do:
…else the 2 objects will share the same Vector2 object reference, and will move together 🙂
Thanks again for your support :]
Thanks a lot for this very interesting article and also for keeping us up to date with the sales figures.
If I remember correctly you are using the XNA version Flixel in BTM. How did you manage to make it work in Java?
Bon courage for the rest of the java hard way!