Demo at DeNA / gloops Seminar

Tonight the Japanese mobile-app giant DeNA (ex-Mobage) was holding a joint conference in its Shibuya HQ, in collaboration with gloops. The seminar was titled:
Innovation in Browser Gaming – Advanced Technics and Multi-Device Development”.

Shibuya Hikarie
cc-by skp4288

The two companies were presenting their strategy to leverage the web-browser, especially through WebGL, to broaden their user base and the number of devices their games could reach.

DeNA is investing heavily into web-gaming, not only on PC but also on mobile. Their upcoming platform NBPF relies on HTML5 and WebGL, with a purely Javascript SDK, to put games into as many hands as possible. Login, friend list, even in-app purchases are supported in their SDK.

Even though WebGL is still quite a young technology they see it as a viable option and they presented several showcase applications to prove their point – one of them being Exp3D.

Toru Yamaguchi, senior architect at DeNA’s Open Platform division, introduced Exp3D with a live demo. He went on describing a bit the architecture of the code since the entire source has been made pubicly available on Github.

You can see some of the slides below.

DeNA and gloops also announced a new game they have been working on together: “Laplace Link” due for release in April 2016. The game can be played both on smartphone as an app or on desktop through a web-browser.

The full presentation is available here and reports in the Japanese press here.

Stay tuned for a future annoucement from Breaking Byte!

Exp3D is Now Open-Source

For the 2nd anniversary of the release of Exp3D, the entire source code of the game has been pushed to GitHub.

The code base is freely available under GPLv3.

The assets are also provided, but they remain proprietary; also some BGM songs could not be published due to restrictive license issues. But there is everything you need to recompile the game for Android, PC or Web. Feel free to play with it!

For more details about the internals of Exp3D, you can refer to a previous post I wrote on the topic.

On a side note, the WebGL demo has also been updated to work better on mobile screens, with a responsive design and support for touch events.

Beam Waves LWP Released

Beam Waves is a live wallpaper for Android featuring halos of light dancing on your screen.
Give it a try on your phone!

Here is a quick overview of what it looks like:

But to really appreciate it, you need to see it run at 60FPS in native resolution.
The following WebGL animation gives a much better overview.

The wallpaper features several options to customize the appearance, color presets…
It’s also super-light and battery-friendly: you can cap the refresh rate or downsize the FBO used to render the animation.

Download from Google Play
Beam Waves LWP page on Breaking Byte

Making Of Exp3D: Business Model

In the competitive market place for games on mobile, unless you’re already a big name in the industry, there is little chance you can charge the customer upfront 15$ for a title, like Square Enix does.
With the tons of free games being released every month, each one craving for attention, the traditional business model of a 1-time sale with a high-price tag is not sustainable for the small studios or indie developers.
Lately most of the games are released as “free-to-play” and Exp3D is one of them.

It’s free to download

Not charging means there’s no entry barrier, leading to more downloads and so more potential customers.
When playing Exp3D, it’s usually quite easy to pass the first level. The second chapter is just a preview, half-way through the level the player will be presented with the dialog below:

The “demo/full version” model

So one of the sources of revenue is the traditional “try free demo / buy full version” model. It is quite similar to what Shogun is doing, including a preview of the stages which are locked. Except that instead of having 2 APKs on Google Play, Exp3D combines the demo and the full version into the same APK. It makes updates much easier, and it also brings all the ratings and comments of users under the same application on Google Play.
In Exp3D the “full version” is purchased as an in-app purchase (IAP), but it’s actually a 1-time purchase: the transaction is saved on Google servers, you can uninstall the game, change phone and still get back your full version status upon re-install.
The fact that you can upgrade directly to the full version from within the game makes it a nicer user experience and you get to keep all the game progress.

Playing for free

You probably also noticed the “Just let me play for free!” button in the previous dialog.
If you manage to collect 100% of the orbs of the previous level you can actually unlock the next chapter and continue to play completely for free.
This is of course very difficult and reserved to the elite of the players. This concept is actually inspired from Wind Up Knight, I liked the idea of giving away the game to hardcore gamers.
Besides it’s important that the player doesn’t hit a wall “pay now or stop playing”. It’s better to provide some way to progress for free so the player doesn’t feel he is obliged to pay.

In-app purchases

Exp3D features a virtual currency: the orbs. There is a limited number of orbs you can earn at each chapter, no “farming” possible.
These orbs can be used to unlock a new chapter, or to upgrade the weapons of the ship. Orbs can be purchased through IAPs by spending some money.
Several packs of orbs can be purchased, the bigger the pack the cheaper the unit price becomes. Purchasing orbs with real money is in no way mandatory to enjoy Exp3D, especially if you bought the full version the orbs you earn for free by playing the campaign are more than enough to clear the game.
But some people like to play in “god mode” and won’t hesitate to build a very powerful ship if you just give them the possibility.


At first I was not planning to use any form of in-game advertising: unless you have a huge audience you’ll make only pennies so I figured ruining the game immersion with ads was not worth it.
When I became aware that Exp3D was becoming really popular in China, I wondered about a way to somehow monetize that success.
There was no possibility to charge directly the customers in China so as an experiment I published an update of Exp3D on Google Play: the updated version would display ads when the game was played in China.
A few days later, the APK was already being redistributed on Chinese markets and I started to get some ads revenue.

The breakdown

So how do these sources of revenue compare to each other?
Here is the breakdown:

Advertising represents 20% of my total revenue, but this is essentially thanks to China, my audience in all the other countries taken together is much smaller.
However, this small audience brings more revenue: the “full version” purchases represent 35% of the income, it’s a 2.9$ purchase which is considered “expensive” by today’s standards for a mobile game.
Exp3D being a niche game, players who love the genre are more willing to pay for it.

And the main source of revenue is IAPs which account for almost half of the income.
Exp3D made me realize the importance of not limiting a game to the traditional model of “free demo/full version”. Some players are more than willing to spend money to have a powerful ship, do not prevent them by having a simple one-time purchase! :)

As for the income itself, the money Exp3D brings every month barely amounts to a tiny fraction of the rent I pay for my appartment in Tokyo.
So, no: it didn’t make me rich in case you were wondering. ;)

Making Of Exp3D: Architecture

People asked me a few times what kind of technology was behind Exp3D, which programming language I used and how I could come up with a Javascript version… so I thought I would explain a few things here.
I didn’t use any popular game engine (like Unity), rather I wrote all my code from scratch, for fun, because I do enjoy writing engine code and experimenting with low-level stuff.

What might surprise some is that Exp3D is entirely written in Java.

Exp3D is 100% pure Java

Why? Because when you make a game, you need iteration cycles to be as short as possible.
You want to see the result of your code changes immediately on the screen.

Traditionally you would write a game in C++, and as the codebase grows, compilation time gets longer. Change one line in some file and you won’t be able to see the result before a few seconds or minutes. The process ends up wasting a huge amount of time and the issue is extremely difficult to solve in C++.

Interpreted languages (Python, Ruby, Javascript…) don’t suffer from this problem, but unfortunately as of today they perform too poorly on mobile platforms to run a game, even when JIT compiled.

So this leaves us with only 2 viable options: JVM languages like Java, or CLI languages like C#.
They both have good performances and short iteration cycles.

Live-coding is the future

An argument in favor of Java is that, while C# dramatically reduces iteration time by having a fast compilation phase, Java simply has no iteration time – at all.
Basically, while your game is running, you change some source file, hit Ctrl+S and boom, your changes appear in the game.
This is true live-coding. After you got a taste of it, there’s no coming back to the old “stop – compile – launch” process.

This is how Notch can write games from scratch so quickly:

So the JVM is great in that it can transparently replace the code of a function during its execution. However that doesn’t mean Java is a silver-bullet, far from it.

The pitfalls

Java is not perfect: unlike C#, there is no mechanism to explicitly allocate memory on the stack, which is a real bummer for game programming. Also the Dalvik VM on Android is quite young and the performance is nothing like its Oracle counterpart on the desktop, but it’s improving.
C# can provide more flexibility than Java but be ready to open your wallet because Mono licenses are not cheap.

But whether you use Java or C#, the garbage collector is your worst enemy. Arbitrary GC pauses are simply not acceptable in real-time applications, so you end up implementing pools for your objects like I did in Exp3D, just to have an allocation-free game loop.

In the end it all boils down to trade-off: iteration time, performance, money, programming efficiency…

Code structure

The structure of the program is roughly like this:

The core of Exp3D is about 25,000 lines of Java. This is exactly the same source shared on all the platforms.
To be able to do this, the game code relies on a small framework which acts as an abstraction layer, hiding platform-specific implementation details.

The framework has 3 backends:

Android backend

The rendering uses the OpenGL ES API of the OS. Sound and IO also rely on Java APIs of the OS like the SoundPool, the MediaPlayer and the Android file system.

Desktop backend

Here, the rendering is done through JOGL which provides an OpenGL ES API for Windows, Linux and MacOS. Sound uses JOrbis, a pure Java implementation of an OGG Vorbis decoder.

Web-Browser backend

This is where it gets interesting: GWT is a tool originally developed by Google that transcompiles your Java source files into Javascript code.
All I had to do was create some bindings that would expose to Java the browser API related to WebGL and HTML5 Audio. It’s very easy to integrate already-made bindings like gwtGL or gwt-voices. WebGL API being almost the same as OpenGL ES 2.0, implementing the rendering part was straightforward.

I first saw GWT in action in 2010 in the Atlanta Google offices, back then they had a demo of a playable version of Quake 2 running in Chrome.
In 2011, a HTML5 version of Angry Birds was released, also powered by GWT.
So I figured GWT could probably do the trick for a simple game like Exp3D and indeed it worked like a charm.

What about iOS?

Until recently, porting a Java game to iOS was extremelly difficult. The only “hack” was to run your Java program with IKVM, running on the top of Monotouch, but at the expense of performance. The situation changed completely over the last few months when Niklas Therning did something that Oracle should have done years ago by releasing RoboVM, an AOT compiler for Java specifically targeting iOS.
If in the future I port Exp3D to iOS, this is definitely the middleware I will use.


For my requirements, Java proved to be a good match:

  • no iteration time
  • good performance
  • cross-platform
  • open-source libraries and runtime, with no license cost

It was a huge time-saver, and I got a HTML5 version with very little effort.
But again, I was mainly focused on programming-productivity and license-free tools, your priorities might differ in which case another language might be better for you.

On a side note if you’re interested in this kind of Java framework, there are already some popular ones out there like libgdx or PlayN, I highly recommend them.
When I started Exp3D, more than 2 years ago, those frameworks were very young and not as mature as they are today, that’s why I rolled my own solution – in part because of this but also for the fun of coding my own framework. ;)

Early Statistics On Exp3D

At the very end of July I released Exp3D on Google Play.
Getting noticed among the tons of games published every week, especially in the saturated genre of space shooters is quite a challenge.

So how did it turn out for Exp3D?
Let’s take a look at last month’s download numbers.

Google Play statistics:

In the first month following its release the game has been downloaded 15,000 times.
It’s not too bad, but it’s not great either considering it’s a game you can download for free, with no entry barrier.

Here is the daily number of downloads per device:

The spikes correspond to reviews that were published on major Android news websites:
August 8th: FrAndroid article (biggest French Android community)
From August 19th: AndroidPolice Best New Games then AppsZoom review then Android And Me Best New Games and SuperGameDroid Indie Round-Up .

Google Analytics statistics

Analytics is bundled within the Exp3D APK so I can track anonymous data like the number of installs, the average in-game progress of the player.

For example here is the number of persons who are playing Exp3D each day:

An average of 6,000 players a day. Not bad!
But wait… how come 13,000 people were playing the game on August 11th while at the same time Google Play was reporting only 2,600 total installs?
The answer is simple: “China”.

China accounts for 80% of Exp3D players

That’s right, China is by far the country where Exp3D is the most popular with 200,000 playing sessions. In comparison the US represented only 12,000 sessions during the same period.

Such statistics don’t appear in Google Play because… nobody uses Google Play in China.
Most of the Chinese download Android applications through ‘alternative markets’ like this this one. Those markets mirror official APKs from Google Play (free as well as paid applications) and let you download everything for free.
This is all done without the developers consent, so I guess you could call that ‘piracy’.

Piracy has advantages

Honestly I don’t mind that much about piracy: I never believed one game stolen equals one lost sale, especially when people in mainland China have no legal way of purchasing a copy.
Besides, the game being free-to-play I have no problem with it being distributed for free.
I would even go so far as to say that as long as the binary is not modified, I’m happy Exp3D is ‘illegally’ distributed in China.
Because more downloads are never bad, it helps spreading the game. And even though in-app purchases are not available in China, AdMob works fine there so I’m still getting some additional revenue thanks to the Chinese audience.

The few APKs that I have downloaded from Chinese markets and examined were exact copies of the official binary.
However a few sessions with an incorrect build number showed up once in a while in Analytics, leading me to believe some Chinese marketplaces actually do modify and recompile the game.

Here is some overview of the real-time activity of the players around mid-August:

If you haven’t tried Exp3D yet, here is your chance.

Exp3D Released On Google Play

Today is a very exciting day: Exp3D is live on Google Play!
Go grab it now!

Exp3D is a vertical scroller shooting game.
But where does it stand out from the crowded competition on Android?
A lot of effort has been put into polishing the game:

  • Speed: High FPS and smooth gameplay have been the target from Day-One. Exp3D runs at 60FPS on most recent devices. On the original Nexus One it can sustain 30FPS.
  • Gameplay: No lag – the spaceship reacts immediately to your input. Piloting is dead simple: you can play with just one hand, actually with only one finger.
  • Rendering: unlike most of the ‘shmups’ on the market which use 2D sprites, Exp3D features full-3D ships and backgrounds. Plus GFX effects like shadows, explosions…
  • Soundtrack: Each chapter features its unique dramatic music.

You can try the game for free until the middle of Chapter 2. Or maybe beyond Chapter 2, that depends on your skills. ;)

There is also a HTML5/WebGL version so you can play Exp3D in your browser.