Nov 302016

Method 1: mega box collider

Use a single BoxCollider for all your planes. For example, if you have multiple aligned planes, remove their Collider component (Box, Mesh, whichever they have) and on only one of the planes, add a BoxCollider and adjust its center and size values in the component’s inspector to encapsulate all the planes.


  • Simple.


  • Supports only rectangular surfaces.

Method 2: generated colliders

If you are rolling your ball on a non rectangular surface, you will need to find a way to generate a mesh collider for all your planes. For this, choose one of the following:


  • Just works.


  • Uses noticeable CPU power when updating (baking) the colliding mesh in real time. Update sparingly.

Method 3: ramps as bridges

Create a set of meshes from a 3D software such as Blender to make invisible ramps which will be placed partly underground between your planes. They have to be large enough to make the transitions as smooth as possible. The height between the top of the bridge and the ground (the planes) should be approximately the value defined by the Default Contact Offset value in the Physics Manager.


  • No real improvement.


  • The ball may jump a little, especially at high speed.
  • Doesn’t work with small tiling (or when your successive planes are small): the longer the tiles, the longer bridges can be.
  • Requires a lot of testing.
  • Requires 3D software usage.
  • The result is not consistent.
  • Requires good workflow / toolchain.

Method 4: make custom extended planes’ colliders

This one should not work very well.

Create in a 3D software a planar mesh. Then, on its edges, extrude towards outside and lower down slightly the new edges. To put the words into image:

Photo of speed cushions.

Credits: Richard Drdul — cc-by-sa-2.0 (original)

Make them intersect, and hopefully the bouncing will be invisible.


  • Quite simple.


  • The ball may jump a little, especially at high speed.
  • Requires a lot of testing.
  • Requires 3D software usage.
  • The result is not consistent.
  • Requires good workflow / toolchain.

Method 5: turn slightly your planes’ colliders

Make your planes’ colliders slightly rotated so that, in the direction of movement, the end of a collider is slightly above the next plane’s collider. The height should be approximately the value defined by the Default Contact Offset value in the Physics Manager and hopefully no bouncing will occur.


  • Works flawlessly.


  • You will see the ball flying and falling a few units from one plane to another.

Method 6: do everything by script

Maybe the Physics is not what is the best for your gameplay. Write your own system with accelerations, collision detection. This is the old-fashioned way and is the choice of a lot of developers! ^^


  • Works flawlessly.
  • Permits game design driven gameplay and not by physics.


  • Not using the PhysX forces and gravity.
  • Requires to work (omg! 😉 ) to simulate fake physics.

Method 7: Make your ball much larger

By using a greater ball (x10, x100), this could lead to less edge detection.


  • May work.


  • The scale of the simulation would change: if you make everything at the same scale as the ball, objects falling by gravity will look like they fall in slow motion.
  • The result is not consistent.

Method 8: collision layers and raycast

This one is pretty cool.

  1. Keep single BoxColliders for each plane. Set the layer of the plane prefab to SinglePlanes (create the layer).
  2. Make a big Unity cube with a collider which encapsulates all the planes. Set the layer of the cube to ContinuousPlane.
  3. Create two layers: OnAPlane and NotOnAPlane.
  4. Set the ball prefab’s layer to OnAPlane.
  5. In Physics Manager, set the collision matrix so that:
    • NotOnAPlane and ContinuousPlane are not collidable (unchecked),
    • OnAPlane and SinglePlanes are not collidable (unchecked).
  6. On each Update(), do a raycast from the center of the ball towards Vector3.down on the layer SinglePlanes:
    if(!Physics.Raycast(ball.transform.position, Vector3.down, Mathf.Infinity, singlePlanesLayer))
        // Not on a floor anymore
  7. If the raycast returns false, the center of the ball is not on a plane. So now, we change the layer of the ball to NotOnAPlane. The ball will start to fall through the hole.
  8. If the raycast returns true, set the layer of the ball to OnAPlane.

For how to define a layer, please check the manual.


  • Works efficiently with dynamic floor layout.
  • You will learn how to deal with layers and Physics.


  • No real flaws.

Additional Information

  • Methods above may be combined.
  • You can adjust the physics project settings and / or set the physics materials to reduce the bounciness of your objects.
  • Make sure the thickness of the planes collision is not 0f. Make them 1f large or more.
  • There is a possibility to reduce the bounces, but I am not recommending it (may cause jittery and physics artifacts): set the Default Contact Offset to 0.0001. Again, I am not recommending it!
  • All of this post could be useless when the default PhysX embedded in Unity will be upgraded.
  • I originally posted this post as an answer on the Unity Answers website but none of the above methods have been considered as valid by the OP. Hence the removal from the answers website.
Nov 182016

Try to avoid naming your MonoBehaviour methods Main(). These would be triggered between Awake() and Start(). This Main() method supports IEnumerator flavors as much as Awake() and alike! But as useful as it could be, I would not recommend to use it as there is no official documentation entry in the manual. And usually, you should not need this method.

Évitez de nommer Main() les méthodes se situant dans vos MonoBehaviour. Celles-ci seraient déclenchées entre Awake() et Start(). Cette méthode Main() supporte la version en IEnumerator autant que Awake() et les autres ! Mais aussi utile que pourrait être cette méthode, je ne la recommanderais pas à l’usage puisqu’il n’existe aucune documentation officielle dans le manuel. Et normalement, vous ne devriez pas avoir recours à cette méthode.

Screenshot of Unity console

Awake() is fired, then Main() and finally Start(). But don’t use Main()!

Sep 132016

Partie française plus bas


If you are using Windows 10, you may want to pin the Photos live tile to the Start Menu. But some of the images from your pictures folders are not showing in the live tile, or even worse, no picture is displayed on the live tile.

You have tried (or not) the suggestions on the Microsoft forums like those on this thread: thread on Microsoft Answers website.


The last thing you could try before reinstalling or giving up (or switching to another OS) is this:

Pictures you want in the Photos live tile have to be 620px × 620px minimum.

I have spent a few hours to find the info about the problem on the internet but none of the websites I have visited have mentioned the size prerequisite. That’s why if you stumble upon my tip and your photos are now displaying correctly on your Photos live tile, do not hesitate to share this. 😉

Additional Notes

  • The images used by the Photos live tile are located here:


    You will find that your images have shrunk until the width or the height of the image was 620px.

  • If an image is not « compatible » with the live tile, it will not appear here.
  • When you update the contents of your images folders, it looks like there is a listener which will update automatically the images list of the Photos tile.

Partie française


Si vous utilisez Windows 10, vous pourriez avoir envie d’épingler la vignette dynamique de l’application Photos au Menu Démarrer. Mais certaines images de votre dossier d’images ne s’affichent pas dans la vignette dynamique, ou même pire, aucune image ne s’affiche dans cette vignette dynamique.

Vous avez essayé (ou pas) les suggestions des forums de Microsoft telles que celles sur ce fil de discussion : fil de discussion sur le site Microsoft Answers (anglais).


Voici une dernière chose que vous pouvez tester avant de réinstaller le PC ou d’abandonner (ou de changer d’OS) :

Les images que vous désirez voir apparaître dans la vignette dynamique de Photos doivent mesurer 620px × 620px minimum.

J’ai passé quelques heures à chercher l’information sur internet mais aucun des sites web n’avaient indiqué un quelconque prérequis concernant la taille. C’est pourquoi si vous tombez sur mon site et que vos photos apparaissent enfin dans votre vignette dynamique, n’hésitez pas à partager cette information. 😉

Notes additionnelles

  • Les images utilisées par l’application Photos se trouvent ici :


    Vous trouverez que vos images ont été rétrécies jusqu’à ce que la largeur ou la hauteur fait 620px.

  • Si votre image n’est pas compatible avec la vignette dynamique, elle n’apparaîtra pas ici.
  • Lorsque vous mettez à jour les contenus de vos dossiers d’images, il semblerait qu’il y ait un écouteur (listener) qui mettra à jour automatiquement la liste des images de la vignette dynamique de Photos.
Août 292016

When you install a new Linux alongside another one, your computer will likely use the last installed OS’s GRUB instead of the one from the previous install.

In my case, I have installed Debian, and a few days later, a Linux Mint on the same disk. But the thing is I prefer the Debian’s GRUB because it is prettier, with a nice image background! Also, I want to keep Debian as my default choice on boot. I could have modified the boot order via Grub Customizer (I will let you Google that) but still! The Debian’s GRUB is better than the Ubuntu’s (Linux Mint’s) dark and ugly one. 😛

Step by step

To use the old install’s GRUB, use those commands from the old OS (Debian for me):

  • sudo grub-install /dev/sdX

    … with the X corresponding to your disk of installation. For example: sudo grub-install /dev/sda

  • sudo update-grub
  • Then reboot and enjoy!

I hope this helps! I have found those steps on the Ubuntu’s documentation:

Août 282016


The japanese IME on Debian, when installed properly, works pretty much similarly to the Windows 7 one… I was quite surprised by the quality of this software piece.

Step by step

  1. Install those packages from official repositories: ibus and ibus-mozc (along with their dependencies, of course).
  2. Launch the Region & Language settings app.
  3. In Input Sources, click on the + sign.
  4. Search for the Japanese (Mozc) input source and add it.
  5. You are ready to use the IME. 🙂 Quickly switch between input sources with Super (Windows key) + Space.

Okay, it’s possible it will not work on your side. I have done some other steps but I am not sure if they were useful or not (I started from a near fresh install). If the steps above didn’t work, you may have to open the Input Method app. Then click on Yes, Yes. Select ibus and click OK. Then OK again. Then restart your computer. From there, you should be able to add the Japanese (Mozc) input source in the Region & Language settings app.

Some day, I will try to redo those steps in a virtual machine to make sure the steps are working… Until then, 幸運を祈ります!

Additional Notes

  • Use the keyboard layout selector widget in the GNOME’s top bar to change the input mode from Direct to Hiragana.
  • In the Region & Language app, click on the Options button and select Allow different sources for each window if you find this behavior more practical (it’s my case!).
Août 032016

I was doing an ingame video capture and I needed to have it in a GIF format. A few frames of the animation could be optimized as there were sometimes still images. So if I wanted to remove those unnecessary frames (while keeping the correct duration, of course), one can simply use ImageMagick.

How to

ImageMagick should be included by default in Debian and probably other distributions. So you just have to use the convert command. Here is an example:

convert "gifToOptimize.gif" -layers RemoveDups -layers OptimizeFrame "removedDups.gif"

It will remove duplicate frames and try to optimize frames by looking at similar areas of the pictures across the animation so they don’t appear twice.

Now, if you have specific needs, you better check the documentation here: There are some examples which will give you an idea of how to perform the best optimization.

Août 032016


I am writing a little tutorial here for creating a QRCode for a vCard file. As I don’t use it that much, it feels like I need a memo for it.


We will use a vCard file named test.vcf which contains the following:

N:Family Name;First Name;;;
FN:First Name Family Name
TITLE:Your job title
ADR;HOME:;;123, avenue des Champs-Élysées;Paris;Île-de-France;75008;France
TEL;TYPE=cell:+33 123456789

Result file

A vCard image QR encoded

A vCard QR encoded

Generating the image


  • qrencode package with its dependencies.

Step by step

  1. In the Terminal, execute the following:

    cat test.vcf | qrencode -o "test.vcf.png"

That’s all! A file named test.vcf.png will be created or overwritten if it already exists.

If you want to change or get rid of the margin, use the -m option with the size in pixels:

cat test.vcf | qrencode -o "test.vcf.png" -m 0

If you want to change the dots size, use the -s option with the size in pixels:

cat test.vcf | qrencode -o "test.vcf.png" -s 4

Please check the manual if you need more options such as output format (PNG, EPS, SVG, ASCII, etc.).

Additional Notes

The same thing with an UI

You can also use frontends to generate QR encoded files: qtqr package (available on Debian repository) seems interesting.

vCard syntax

  • If you want to add or remove your own fields, my advice would be to check the properties on the Wikipédia page:
  • Make sure to use the right properties for the right vCard version. I am using 2.1 in my example.

Things to consider to prevent reading failures

  • Make sure the color contrast between the dots and the background is sufficient.
  • Dots should remain dark and the background should remain clear.
  • Make sure the dots are large enough if you want devices with fixed focus (such as my Moto E 1st Gen) to read the image. For instance, the example image was generated with a 4px dot size; 3px dot size was not readable by my Moto E on a 22″ 1920×1080 screen.
  • If you resize your image in a graphics software, it is best to use nearest neighbor interpolation algorithm to preserve sharp dots.
  • If your dot size is 1px, don’t shrink your image as it will lose information. (pretty obvious)
  • Make sure the QR code users will physically have access to the space right in front of the image / print. So don’t put a barrier in front of the image…
Juin 262016


We will use this file named texfile.tex as the .tex to convert:

\pagenumbering{gobble}% Remove page numbers (and reset to 1)
My first \TeX~document.
$s_n = (Ta)_n = \displaystyle\sum_{k=0}^\infty T_{nk} a_k$

Result file

PNG demonstration

PNG demonstration

Generating PNG images

Packages you need:

  • texlive (or any other TeX program, I guess)
  • dvipng

Step by step

  1. In the Terminal, go to the directory containing the .tex file.
  2. Execute this:
    $ latex texfile.tex
    • Output:
      This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2015/dev/Debian) (preloaded format=latex)
       restricted \write18 enabled.
      entering extended mode
      LaTeX2e <2014/05/01>
      Babel <3.9l> and hyphenation patterns for 2 languages loaded.
      Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
      (/usr/share/texlive/texmf-dist/tex/latex/base/size12.clo)) (./texfile.aux
      ) [1] (./texfile.aux) )
      Output written on texfile.dvi (1 page, 584 bytes).
      Transcript written on texfile.log.
  3. Convert to PNG at 150dpi (to get a larger image than default):
    $ dvipng texfile.dvi -D 150 -o texfile.png
    • Output:
      This is dvipng 1.14 Copyright 2002-2010 Jan-Ake Larsson
  4. Remove the border white spaces of the page and add some borders using imagemagick:
    $ convert texfile.png -trim -bordercolor white -border 5x5 texfile_trimmed.png
  5. Your file is ready as texfile_trimmed.png.


I have made a little script to automatize the conversion, with auto-remove of intermediary files:

if latex $1
	echo Base name is: $BASENAME
	dvipng $BASENAME.dvi -D 150 -o $BASENAME.png
	echo Output file name is: $OUTPUT_FILENAME
	convert $BASENAME.png -trim -bordercolor white -border 5x5 $OUTPUT_FILENAME
	if test $# = 2
		if test $2 != "-keeptempfiles"
			rm ${BASENAME}.{aux,dvi,log,png}
		rm ${BASENAME}.{aux,dvi,log,png}
exit 0
  1. Save the above script as tex2png, anywhere you want, usually near your .tex files for convenience.
  2. Make it executable: $ chmod +x tex2png.
  3. Syntax: tex2png filename [-keeptempfiles].
    • Example: $ tex2png texfile.tex.
    • Alternatively, you can omit the .tex extension: $ tex2png texfile but I would not recommend it.
    • If you want to keep the intermediary files (dvi, log, etc.), add the -keeptempfiles argument at the end: $ tex2png texfile.tex -keeptempfiles.
  4. The final image is named texfile_trimmed.png

Generating SVG images

Packages you need:

  • texlive

Step by step

  1. In the Terminal, go to the directory containing the .tex file.
  2. Execute this:
    $ latex texfile.tex
    • Output:
      This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2015/dev/Debian) (preloaded format=latex)
       restricted \write18 enabled.
      entering extended mode
      LaTeX2e <2014/05/01>
      Babel <3.9l> and hyphenation patterns for 2 languages loaded.
      Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
      (/usr/share/texlive/texmf-dist/tex/latex/base/size12.clo)) (./texfile.aux
      ) [1] (./texfile.aux) )
      Output written on texfile.dvi (1 page, 584 bytes).
      Transcript written on texfile.log.
  3. Convert to a SVG image with a 1.5 scale factor:
    $ dvisvgm texfile.dvi -TS1.5 --no-fonts
  4. Your file is ready as texfile.svg.


There is no padding in the SVG method. I have not found yet a method to add a little padding around the figure.

Also, the --no-fonts is necessary to prevent rendering issues about SVG fonts, especially with Firefox and the default SVG viewer of Debian. So the generated formula will not be selectable as a text, but at least, it will render correctly on every device with SVG support.


I needed to include some nice looking formulas on my new game design wiki. I am using MediaWiki but the math add-on was not working on my server (web hosting service, not mine). So I decided to create myself the images offline and upload them as regular image files, so that I don’t need to think too much about trying to set the add-on without having all the privileges I could have on a personal server.

Juin 192016


Time spent to get the info: one day. Length of the fix: a few lines. Haha, this is so ridiculous it makes me smile a little.

Okay, so you are:

  1. on fresh Debian Jessie (GNOME 3),
  2. on a laptop,
  3. with an integrated graphics unit,
  4. and it is an Intel CPU. In my case, I have a Core i3 Sandy Bridge CPU with HD Graphics 3000.

The backlight function keys:

  1. are working so you have an on-screen display feedback,
  2. are not changing the effective brightness of your screen,
  3. are changing the values of this file: /sys/class/backlight/acpi_video0/brightness (close and reopen in gedit to see the value changing or check by command line).

You have this folder: /sys/class/backlight/intel_backlight.

Yay! You may have a solution!

  1. Create a file:
    sudo gedit /usr/share/X11/xorg.conf.d/20-intel.conf
  2. Add this in the file:
    Section "Device"
            Identifier "card0"
            Driver "intel"
            Option "Backlight" "intel_backlight"
            BusID "PCI:0:2:0"
  3. Save file.
  4. Close gedit.
  5. Restart the computer.
  6. It should work now!

If this fix does not work on your laptop, I am sorry to hear that but I cannot help you further. Don’t ask the noob. I have just followed guidance on linux threads such as here: link to Ubuntu’s launchpad website. Good luck!

Juin 192016

Voilà quelques mois que je n’ai pas donné de nouvelles. 😛


En début d’année, j’ai eu l’occasion de travailler (omagad!) dans une société de développement de jeux vidéo qui s’appelle Nvizzio Créations, localisée à Montréal en plein dans le quartier du Centre-Ville sur la rue Sainte-Catherine. J’ai rejoint pendant deux mois et demi l’équipe qui travaille sur RollerCoaster Tycoon World, la suite de l’emblématique licence de jeu de gestion de parc d’attractions de Chris Sawyer ! Autant dire que j’ai eu beaucoup de chance d’avoir été pris car j’ai été contacté au départ pour un poste de développeur Unreal Engine pour le projet ROKH du même studio. Comme je ne connais pas la technologie, il m’a été demandé alors si je voulais rejoindre l’équipe de testeurs de RCTW avec comme possibilité d’évoluer vers un poste de développeur Unity ou peut-être de designer, chose que je ne pouvais refuser évidemment, en l’honneur des centaines d’heures passées sur les premiers jeux de la série.

Capture d'écran des crédits de RollerCoaster Tycoon World

La (moitié de la) team QA dans les crédits de RollerCoaster Tycoon World.

J’ai donc été pris en tant que Testeur QA, dans une équipe majoritairement anglophone. En plus des responsabilités habituelles d’un testeur QA, j’ai testé des fonctionnalités précises du jeu, notamment le système de contenu généré par l’utilisateur qui se base sur le Steam Workshop. Malgré les quelques semaines passées sur le système, je n’avais même pas fini de tester tous les cas de figure tellement il y avait de paramètres. Ces paramètres étaient grossièrement comme celles-ci :

  1. Le PC est-il connecté à internet ?
  2. Suis-je connecté à mon compte Steam ?
  3. Mon compte a-t-il accès au Workshop ?
  4. Que contiennent les dossiers locaux du jeu dans le répertoire :
    • %programfiles(x86)%\Steam\SteamApps\workshop\content\282560\
    • %userprofile%\AppData\LocalLow\Nvizzio Creations\Rollercoaster Tycoon World\
  5. Que contient le fichier X et Y, etc.

Et autour de ces paramètres, il fallait tester des cas comme « que se passe-t-il si des fichiers sont manquants après avoir chargé la partie après avoir sauvegardé sur un nouvel emplacement une partie en mode Scénario » ou « que se passe-t-il en cas de conflit de nom entre deux fichiers, l’un en ligne et l’autre en local ». Il faut dire que les rapports de bug se faisaient longs dans une bonne partie des cas et il m’a fallu recourir à un formatage strict — panel, noformat, listes, et cetera pour ceux qui connaissent JIRA — pour les vingt étapes et plus de reproduction. En mettant un peu de couleur et de style, ça devait rendre la lecture plus aisée pour celui qui devait corriger !

Ce fut ma première mission dans l’industrie du jeu vidéo dans une grande équipe, entre trente et cinquante personnes. Je suis plutôt content de cette expérience, même si je suis un peu déçu du résultat, ne partageant pas la même vision du design que celle qui est appliquée dans RollerCoaster Tycoon World. À noter que mon contrat n’a pas été reconduit au delà de la sortie du jeu en Early Access, Nvizzio Créations n’ayant plus eu besoin de mes services. Mon ancien responsable de l’équipe test a été promu game designer. Me concernant, je n’ai pas pris l’initiative de passer le test d’évaluation pour tenter de rentrer dans l’équipe de développement. Je l’aurais probablement réussi sans trop de problèmes, après avoir pris connaissance du pitch, mais je ne me sentais pas suffisamment motivé de rejoindre le développement.

Voilà comment s’est conclue cette expérience dans l’industrie du jeu vidéo. Cela m’a étrangement redonné envie de créer un wiki perso autour du game design. Il est temps que je m’y mette ! J’y reviendrai, mais pour l’instant, passons à autre chose !


Pour les PVTistes non-Canadiens qui font un aller retour Canada>France>Canada, au retour au Canada, il faut remplir la fiche de déclaration (celle qu’on remplit dans l’avion pour gagner du temps) comme si on était un résident du Canada. En fait, l’agente de la douane m’a indiqué qu’en tant que PVTiste avec le visa déjà approuvé, on a un statut de résident temporaire, ce qui fait que les règles sur l’importation s’appliquent de la même manière qu’un résident permanent.

Je pense avoir fait le tour de ce que j’avais à dire, à part que la prochaine fois, je ne serai peut-être plus au Canada…