• English
  • Français
  • Games by François Hautier

    Asterix & Obelix XXL Romastered


    Developed by OSome Studio and published by Microids, Asterix & Obelix XXL Romastered is the remaster of the game of the same name released on November 21, 2003, on PS2. A game that I played a lot at the time (on its PC version)! It’s therefore with great pleasure that I contributed to the development of this ’romastered’ version, over the period from October 2019 to June 2020.

    I was responsible for setting up and maintaining the tools necessary for the smooth running of the production, from restarting to maintaining the original game editor, as well as the creation and improvement of existing tools (like a C++ plugin for Maya and other Python scripts). I also worked on the development of the retro mode and on the general tweaking post-release of the game, among other things.



    How the remaster works?

    In the same way as the remaster of Asterix & Obelix XXL 2 released in 2018, Asterix & Obelix XXL Romastered is a technically unusual project, which works with two game engines: OEngine and K. OEngine is the proprietary game engine of OSome Studio, used for Asterix & Obelix XXL 3 or White Night. K is the proprietary game engine of Étranges Libellules used for most of their games, XXL included. By the way, it was the first game for which it was used: the engine was created simultaneously with the game!

    But how do we use two engines at the same time for one game? Actually, it’s not correct: indeed it’s OEngine which is used for the remaster. Simply, like a puppeteer and his puppet, it runs the original game code, in other words, K and XXL itself.

    Above, the drawing explains that. On the left side, the structure of the original game code: K, made up of its different units (Renderware for the graphic render, DirectInput for the inputs, and so on) runs the game. On the right side, the remaster structure: K is now included in OEngine and reduced of its units. OEngine runs K, which runs itself the game. Then OEngine takes care of the graphic rendering, the sound rendering, the input detection, and makes everything working on our modern Switch, PS4, Xbox One and PC.

    When I mention ’the game’ which is run by K, of course, I want to talk about the gameplay loop: character movement, AI behaviour, and so on. K takes care of more generic tasks from its side, for instance playing the 3D animations of the characters.

    To draw an image on the screen, OEngine copies the scene of K into its own scene, and places all the elements at the right place. If K instances 10 Romans in its scene, OEngine will instance 10 same Romans into its own. If the run animation of Asterix is played by K, each bone of its rig will follow in OEngine. The idea is to keep K running the game like at the time, while OEngine simply mimics the action to render it on the screen.

    The characteristic of that remaster is to be able in real time to switch between the remastered visual and sound rendering to the original visual and sound rendering. Contrary to what we can think, the original rendering isn’t handled by K, but well and truly by OEngine, exactly like the remastered rendering.

    Let’s dig into the visual rendering: how does it work? Previously, I explained that to draw an image on the screen, OEngine copied the scene of K into its own scene. Actually, it does that twice: once for the original visual rendering, and another time for the remastered visual rendering. The original and remastered objects are drawn into two different render passes. These passes (which are images) are then blended before that the final result is drawn on the screen.

    The return of Kal

    In the same way that Unreal Editor enables to create the games which are powered with Unreal Engine, K goes hand in hand with its own editor: Kal.

    The remaster counts many improvements, like 2 new game modes, difficulty modes, new animations, and so on. To integrate them in the original game, it was mandatory to use Kal in order to edit the historical data.

    I was entrusted to refurbish Kal: from the original source code, newly versions of the editor could be built, and then delivered as often as necessary to Corentin Loth-Guillon, our level designer on the project. However, everything wasn’t so simple: uninitialised variables, memory crashes or asserts of all kinds gave rhythm to the production, which didn’t help Corentin working in the best conditions. To let him edit all he needed (placing new crates, new Romans…), lots of time was dedicated to improve the stability of Kal, and we worked closely together to succeed in taming the beast.

    Between a few bug fixes, I had the occasion to add some features to the editor, for instance the possibility to modify the rotation of an object with the Euler angles. Common in our modern editors, that functionality didn’t exist in Kal, though practical it is!

    Although all that work won’t know the posterity, restoring a 17-year-old editor was a very interesting challenge as a programmer! Furthermore, seeing the behind the scenes of a game of my childhood was just as much touching! A true archaeological work!

    The KIF format

    Today, the FBX file format is commonly used to export 3D models and animations created from the softwares Blender or Maya to the game editors like OEngine or Unity. However, to design the 3D models of XXL and their animations, the artists of Étranges Libellules had used at the time a proprietary 3D software from the studio. These resources were exported to Kal in a proprietary file format too: the KIF format.

    Just as it was the case for the code, we had at our disposal the resources of the original game as raw material, including all 3D models in the KIF format. To allow the artists to remaster them and export them in FBX format to OEngine, we needed to be able to import these KIF files into Maya.

    Stroke of luck, for the production of XXL 2 in 2004, the proprietary 3D software was abandoned in favour of Maya … but not the KIF format, always used by Kal! The programmers of the time had therefore created a C++ plugin for Maya to import and export geometries or animations into KIF files. For the remaster production, one of these programmers, now cofounder of OSome Studio, passed me the torch: so I was responsible for maintaining and upgrading this Maya plugin.

    Very early in the project, I got down to write a Python script that enables to import one by one each KIF file into Maya to export them in FBX. Once the synchronisation between K and OEngine (mentioned in the first part of this article) was set up by Pierre Sénéclauze, I could directly check in-game if all of my imports and exports were correct … but it wasn’t!

    There are a number of reasons for that: the first is that the C++ plugin was designed at the time to import and export geometries created into Maya. Which was not the case here, because the KIF files of XXL had been exported from the proprietary 3D software of Étranges Libellules. Renamed bones, not centred rigs, scale problems … between these import problems and the crashes of Kal mentioned in the previous part of this article, I was sure to have lots of fun!

    The second reason is more trivial: since 2004, the 3D techniques have somewhat progressed! In particular, the skin import of geometries no longer worked. So, I needed to rewrite entirely this part of the C++ plugin. It was very interesting and rewarding: I won the occasion to bring my contribution, instead of simply fixing scattered problems.

    Once all the issues related to importing KIF files into Maya were resolved, the artists were able to begin designing the remastered 3D models!

    Reworked animations

    The remaster contains some reworked animations compared to the original game, especially the run of Asterix and Obelix. A nice benefit for the player which was not so simple to realise! Because as explained previously, it’s K which is responsible for playing the animations. To add new animations in the game, we needed to import them into Kal like at the time … which implies to be able to export them in the KIF format.

    Following my revamping work of the C++ plugin used to import KIF files into Maya, I was also in charge of restoring the export of geometries and 3D animations from Maya to a KIF file, in order to integrate them into Kal.

    Not an easy task: it was not enough to export each animation in a single KIF file. Actually, a KIF file contains the geometry (the mesh, the rig, the skin), but also all the animations used by the 3D model. For instance, asterix.kif contains no fewer than 80 animations! To just add one among them, it was necessary to reexport the whole KIF file. It’s exactly what caused me the most trouble, Kal hasn’t appreciated that I modified 17-year-old KIF files. Within the consequences: the change in the order of the bones in the rig, which detached the elements which were linked to the character’s rig by the bones index (by example, trails FX).

    The code ran to import animations from a KIF file to Maya wasn’t problems free either: the animation curves weren’t correctly understood (missing keys, broken rotations, …). It was also necessary to write entirely the code to import the ’hotspots’ (hooks on the character rig), which didn’t exist but was needed by Kal!

    The second challenge involved integrating the reworked animations only in the remastered visual rendering, and to keep the old animations in the original visual rendering. To do that, I operated directly in the K animation system, by replacing the dictionary of animations by a dictionary of animation pairs. So without touching the gameplay code, I multiplied by two each animation, allowing us to switch from one to the other at each change of visual rendering.

    A tribute to the original game

    From the beginning of the project, our intention was to bring back to life the original game, by being able to pass at any moment from the remastered visual and sound rendering to the original visual and sound rendering. Being in charge to import the original 3D models in their KIF format into Maya (so that the artists can create the remastered 3D models), it’s, of course, me which took care of reexport all the original 3D models in FBX format, to integrate them into OEngine.

    To ensure that these 3D models have the same visual rendering than at the time, it was necessary to exactly configure their materials and their textures in OEngine. To do this, I exported from Kal all the information I needed: material types (opaque, cutout, shiny or not, animated or not), filtering of each texture (pixelate or not), which material is associated to which KIF, which textures are associated to each material, and so on…

    Based on these data, I then created several tools allowing me to automatically configure each material and each texture in OEngine. All of that was done by iteration: this whole integration process being automated, I just needed to adjust my work tool to transcribe as faithfully as possible the visual rendering of the time.

    However, some visual elements required an extra effort: this is the case with water. Unlike the rest of the objects, this one was not a KIF object, but generated directly inside Kal. Based on the initial work of Pierre Sénéclauze, who had exported the original water surfaces as so many quads of a corresponding size (which were used in the remastered visual rendering), I had fun exporting directly the water meshes generated inside Kal into FBX format (including the nice little waves). Then I took special care to integrate them into the original visual rendering of OEngine, designing a water shader that even reproduced a colorimetric error present in the original game.

    The sky was also a special case, which we had to reproduce in OEngine. Thomas Bonis was in charge of creating the shader as well as the tools allowing graphic designers to colour the sky as they wanted in the remastered visual rendering. For the original visual rendering, I took care of inserting the sky colours calculated by K into the sky shader. But also to synchronising the display distance of the camera and the fog of the original game with those of the remaster. Under potion, under twister, in Egypt or in Normandy, the sky is therefore completely identical to the one that we could observe in 2003 on PS2!