October 19, 2018

Global Illumination in Godot Engine @ Gamelab BCN 2018

My talk at this year's Gamelab is finally online!

Slides available on GitHub!

As I say in the video description I feel very thankful to these people:
  • Juan Linietsky (reduz, Godot's main developer), for putting trust in me to do this and for giving me some reference material and support.
  • Unai Landa (Digital Legends' CTO and technical track organizer), for the same trust-in-me reason.
  • Attendees, for their attention and interest on the subject.
  • Watchers of the video, for the same reason.

Here, a picture of me in the speech room with my audience in the background:

Crafting this video was headache because I only had the audio recording. What I did was:
  1. Exporting the presentation from PowerPoint as a videoclip (including transitions, etc).
  2. Loading it and the audio into Adobe Premiere.
  3. Making hundreds of cuts, frame loopings, etc. to synchronize what's being said to what's being seen.
It took me a number of hours, but having been able to reconstruct it was worth it. (Next time I'm considering using certain PowerPoint's feature about recording intervals during the actual speech.)

April 25, 2018

Setting a data dump non-breakpoint in JS debugging

This works for Firefox, Chrome and probably other browsers with integrated developer tools.

If you have programmed on other platforms or debugged with other tools, you may be missing a very handy feature: the ability to set a breakpoint that really dones't break but dumps the value of some variable or expression when it's hit.

The truth is that there is no such explicit feature. But you have it implicitly. Let me explain myself:

The trick is simple: use a conditional breakpoint instead, with a condition such as console.log(yourVariable).

When the relevant line is hit, since that expression will evaluate to false, there will be no break, but, given the expression is evaluated indeed, console.log (or any other of its family) will be called, effectively dumping your value to the console.

March 20, 2018

Sketchfab integrates with Godot

This is cross-posted from the official Godot blog. I'm putting it here since I was the one that took the job from Sketchfab.

Sketchfab is a well-known site where you can browse a big library of 3D models and download them for use in your own projects. Many of them are free, covered by open licenses.

They have just announced their download API (announcement), which allows third-parties to integrate with it, giving any application access to hundreds of thousands of models in glTF, a standard format that many tools, Godot included, understand.

They have integrations for other famous game engines, like Unity and Unreal and have decided to provide an official plugin for Godot! It's also available on the Godot Asset Library. You can watch the video to get a better idea:

So it seems that more and more companies are taking Godot very seriously and it's becoming a big player in the game engine landscape.

In order to run the Sketchfab plugin, you'll need to wait until the upcoming Godot 3.0.3 is released since it contains some needed bugfixes, that were done after the last official version. If you are a Windows (x64) user and can't wait, you can get a build snapshot from the plugin repository, under which it will work.

December 09, 2017

Let people touch Godot!

This is cross-posted from the official Godot blog. I'm putting it here since I was the one that took the job from AdPodnet. By the way, very nice people!

Maybe you have already seen an AdPod around. They are three-sided giant multitouch-capable screens. The company behind them customizes them for very important customers for promotion campaings for things like movies (Disney, Universal).

They "skin" the device cosmetically for the targeted product and develop interactive apps that run on them. People walking by can interact with them, something which creates great product awareness and also entertains.

Now they have decided to use Godot for such development work! The switch from a well-known non-free engine they were using formerly has been a wise decision.

They were pretty confident about Godot's features and solvency, but they needed multitouch support on Linux. That's why they decided to hire someone to add it. However, as they feel so grateful for the Godot community for providing such a nice tool, they kindly decided to donate the code to the project!

What is more, they wanted to be sure that multitouch support is more widely available so the job was extended to ensuring it worked well on Windows too (it was already done, but needed some improvement) and creating well-commented examples in GDScript and VisualScript. Finally, they asked for all this to work on both Godot 2.1 and the upcoming 3.0.

We thank them for their contribution and for having become new Godot believers. They won't regret!

Next time you see an AdPod, you'll know Godot is ruling it. :)

For more information about them and what they do, you can visit their website: https://www.adpodnet.com/

November 26, 2017

Introducing onion skinning for the Godot game engine

You may already know about the great open source Godot game engine. I've been contributing to it since two years ago or so. Today I'm writing here to announce a feature I developed for the upcoming 3.0 version, and of which I'm pretty proud of: onion skinning.

So what's onion skinning?

It's a technique used in animation from its early days consisting in the ability to draw frames of animation on a semitransparent paper (onion paper) so you can see the previous frame through it. That provides the artist with a good reference to base his new drawing in.

Of course, this concept once brought to computers gets much more flexible: arbitrary number of see-through layers, ability to see the past and/or the future, etc. Every decent software package with an animation editor features it nowadays. And some people was requesting it for Godot.

This picture from the Adobe Animate CC documentation [CC-NC-SA] is fairly telling about the concept:

How it looks like in Godot?

This images are from the pull request I made and based on the main character from the 3D platformer example. (By the way, this works for both 2D & 3D.)

With the default past/present colors (that you can change in the editor settings), seeing one frame to the past and to the future.

August 21, 2017

Scroll to item-of-interest in Angular

Imagine you have a list of elements of some kind (by means of *ngFor). You'd like to make that Component aware of the fragment in the URL so it can scroll to the element identified by it.

For instance, you let the user create a new element in a form in one page and you want that on return, the list scrolls automatically to the item just added. You are using Angular routing facilities.

For more background, you can check the discussion on the issue on the Angular project.

There, some users have provided their approaches. On the basis of some solutions suggested there, I've built my own and it seems to work fine:


private fragment: string;

constructor(private route: ActivatedRoute { }

ngOnInit() {
this.route.fragment.subscribe(fragment => { this.fragment = fragment; });

ngAfterViewChecked(): void {
try {
document.querySelector('#' + this.fragment).scrollIntoView();
} catch (e) { }


I think this adds very little bloat and it handles these situations:

  • No fragment present in the route.
  • Fragment present but invalid (querySelector() throws).
  • Fragment present and valid, but the element is not present.

Actually, the try block is masking these situations rather than handling them. Nevertheless, usually you won't find yourself needing to do anything about them.

July 11, 2017

Fail: LinkedIn internationalization

Let's let LinkedIn open my public collection of technologic fails!

It looks as they had missed the translation to Spanish of a string during an update and what we are seeing is its key.

By the way, a few minutes later it rendered properly:

A 'shooting' fail. Maybe I should make a wish…