Blue Falcon Live, a 3D live wallpaper for Android
2012-05-29 00:30:47
It's been a long time since I've published a new app on Google Play.

Here we go:



https://play.google.com/store/apps/details?id=com.nicolasmy.bluefalconwallpaper

This is a tribute to F-Zero, for you all fans of the super nintendo, nintendo 64, and game cube. A super fast moving Blue Falcon blasting through your home screen with amazing smoke effect.

MesNewzMatos : French news app for Android
2012-04-30 00:03:24


https://play.google.com/store/apps/details?id=com.nicolasmy.mesnewzmatos

Because I'm not only making games, I've decided to make a news app dedicated to french computer hardware news. It's kind of a niche subject but popular among Android users, so I hope it'll enjoy a good popularity.
Mark Zuckerberg, Moving Fast And Breaking Things
2012-04-20 19:07:06
http://www.businessinsider.com/mark-zuckerberg-2010-10#ooid=BxeGU3MTodbuHGj5q4EcHWEjY9snwrDn

I like the sentence that illustrates this video :

 
"Unless you are breaking stuff," he says, "you are not moving fast enough."
 


That's the opposite of what I'm used to hear at work : "don't break anything", "maintain legacy software compatibility". Software code is never perfect at the first shot, it need continuous refinement. Just as in the Open-Source world, the best source code is code that has been polished for years.
At some work we are discouraged to make any changes. It's also true that having code that break often could mean, bad quality code (and coders).
The difference is that Facebook's developers are not your average developers, they are highly skilled and carefully selected for that, so when things break it's usually for a good reason.
In my opinion, MZ sentence might not be for everyone, but I would love to hear it from the company I'd work for.
New mobile application contest !
2012-04-19 10:16:28
AXA Banque (french bank) is offering 50 000€ for the best mobile application that will use its API.

https://developer.axabanque.fr/

Not that I think that money is ever important in life but that sounds like a sweet deal.
Factory, abstract factory, builder, prototype, anyone ?
2012-04-18 12:06:42
These are all creational patterns designed to provide a way to create components while hiding the underlying implementation of the created object (that is for instance system-dependent stuffs).

1. Factory is a specialized component that generate specifics components.

 
myCar = CarFactory.createCar()
 


2. Abstract factory is a generic component that will use a specific object (for instance a factory) to generate specifics components.

 
genericFactory = new GenericFactory(CarFactory);
myCar = genericFactory.create();
 


3. Prototype constructs a complex component by assembling the different passed component.

 
myCar = prototype.createCar(Wheel,Engine,Chassis)
 


4. Builder constructs a complex component without knowledge of the subcomponent types.

 
builder = new Builder(WheelFactory,EngineFactory,ChassisFactory)
myCar = builder.createCar()
 


From OpenGL ES 1.1 to OpenGL ES 2.0
2012-04-15 23:44:32
I have been working on porting my Android 3D engine to OpenGL ES 2.0 for a few days now.

At first glance one would think that it would be a small step from one version to another. Big mistake : in fact the two API are almost entirely different.

OpenGL ES 1.1 is meant to be easy to use with fixed-pipeline and all the matrix management. OpenGL ES 2.0 aim at speed and provides full control over the rendering pipeline. OGL ES 1.1 wasn't easy to understand but with OGL ES 2.0, it's yet another level, everything has to be done by the programmer : matrix managmenent, lighting and other special effect. Therefore it needs deep understanding of the rendering process.

Yet this is still the way to go to get most of current mobile devices. OGL ES 2.0 is available since iPhone 3GS and most Android 2.1 compliant devices.

I have two rendering class, one for OGL ES 1.1 and one for OGL ES 2.0. That can be dynamically loaded at runtime depeding on the device capabilities.

The OpenGL ES 2.0 should work with two shaders that describe the way that vertices and pixels will be processed for the rendering.

Vertex shader
 
uniform mat4 u_MVPMatrix;
uniform mat4 u_MVMatrix;
uniform ivec4 u_RenderStateVector;
 
attribute vec4 a_Position;
attribute vec2 a_Texcoords;
attribute vec4 a_Normal;
attribute vec4 a_Color;
 
varying vec2 v_texture_coordinate;
varying vec4 v_color;
varying vec4 v_normal;        
 
void main()
{
gl_Position = u_MVPMatrix * a_Position;
v_texture_coordinate = a_Texcoords;
v_normal = a_Normal;        
v_color = a_Color;
}
 


Fragment shader (very simple : basic lighting, texturing and color component managment)
 
precision mediump float;
 
uniform sampler2D my_color_texture;
uniform ivec4 u_RenderStateVector;
 
varying vec4 v_color;    
varying vec4 v_normal;        
varying vec2 v_texture_coordinate;        
 
void main()
{        
if (u_RenderStateVector[2] == 1)
{
vec3 lightdir = vec3( 10.0, -10.0, 10.0);
 
float colorlight = max(dot(normalize(lightdir),v_normal.xyz),0.5);
gl_FragColor = colorlight * texture2D(my_color_texture, v_texture_coordinate);
gl_FragColor[3] = texture2D(my_color_texture, v_texture_coordinate)[3];
}
else
{
if (u_RenderStateVector[1] == 1)
{
gl_FragColor = (texture2D(my_color_texture, v_texture_coordinate) * v_color);
}
else
{
gl_FragColor = texture2D(my_color_texture, v_texture_coordinate);
}
}
}
 
Chessmind3D : 5001 downloads
2012-04-15 21:33:54


Well it's not 9000 but over 5000 !
Lincity4droid version 1.1 out
2012-04-11 16:19:13
* Touch controls are modified, so that the user gets a visual feedback when placing buildings on the map.
* No more finger scrolling
* Fixed few missing graphics
The user experience with this version should be much better.

https://play.google.com/store/apps/details?id=org.libsdl.app
OMFG !
2012-04-04 21:44:35
I've badly failed at an interview recently.

I was ask to write a thread-safe singleton on a dashboard.

I've come up with one of the ugliest code I've ever made (at least, a code that woulnd't anyone to know about)

 
public class Singleton
{
public static gSingleton;
 
public void do()
{
}
}
 
//Calling code
P(Singleton.gSingleton)
Singleton.gSingleton.do();
V(Singleton.gSingleton)
//even forgot that the java keyword is "synchronized"...
 


=> No encapsulation.
=> Completely missed the fact, that "thread-safe singleton exercise" is not about protecting some "do()" method, but to protect the singleton instantiation.

 
public class Singleton
{
private static Singleton instanceSingleton;
 
private static Object lockObject;
public void do()
{
}
 
//Private constructor !
private static Singleton()
{
}
 
public static Singleton getInstance()
{
synchronized(lockObject)
{
if (instanceSingleton == null)
{
instanceSingleton = new Singleton();
}
}
 
return instanceSingleton;
}
}
 


The truth is that although I don't write a lot of code at work, failing to write to most elementary design pattern is unacceptable. It alway's hard to evaluate someone skills, failling to answer this simple question just killed me right away although the interview was going well so far.

This exercice is meant to see 3 things :
Knowledge of design pattern (singleton)
Knowledge of oriented object programming (encapsulation)
Knowledge of multi-threading (singleton initialization)

You want to put me in trouble in an interview just ask me questions about :
=> .NET framework
=> C++ STL
=> Oracle/PLSQL
=> MS SQL Server
=> SQL Optimization
=> Implementing design pattern !
BallJump3D, yet another game for Android
2012-03-25 11:25:19

Available on Google Play:
https://play.google.com/store/apps/details?id=org.nicolasmy.balljump3d


This is a real 3D game for your Android phone !
Ever thought about how it's like to be a ball ? Bet you did not !
Jump your way to the exit to get to the next level.
Tilt your phone to make the ball roll, and swipe the screen with your finger to make it jump.
See 10 older news | Back to the top