Back to the Middle Ages: Blend4Web for a point and click game

Started as a testbed for the European project V-Must - Virtual Museum Network, Back to the Middle Ages has been developed by VisitLab Cineca keeping in mind, as relevant concepts, the principles of: re-use, open-source, philological attention, cross-mediality.
Back to the Middle Ages, at present in its prototypal version, is an educational third-person adventure game for on-line PC platforms and mobile devices. It uses Blend4Web to thrust players into the role of a merchant's apprentice in 13th century Italian city of Bologna. Guido, the main character, falls into a time vortex and finds himself in Roman Bologna, where, through the accomplishment of some quests and the solution of funny educational riddles, he must figure out a way to get back home, in the 13th century.
The game uses several already available assets from the "Apa the Etruscan" movie, adapted for on-line game, plus some modified characters from BlendSwap and Cookie-Flex-Rig; the open-source production pipeline is grounded on Blender for modeling, adaptation of animated and high-poly models to real time and developement of gameplay scripting; OwnCloud for storage and sharing; Blend4Web for on-line gaming. The assets are based on precise archaeological references and realised under scientific supervision and the on-line game will be accompanied by an Augmented Reality application for iOS devices, to be used while strolling about the real city of Bologna.
In order to make the game playable on every touch-screen device we decided to adopt a "point and click" genre. Hence, some functionalities had to be added to Blend4Web by working with low level APIs, iterations, trigonometric functions and JavaScript. In our opinion, interesting aspects solved until now are:
  • The main character moves towards a point touched on the screen with a speed depending on the distance calculated inside a 3D environment, with the rotation of the body pointing towards the selected point of arrival. The animation is in walk or run mode depending on the speed and, when the character reaches the target, is in idle mode.
  • The inventory, essential in every "point and click game", was programmed starting from a pre-existent library that managed just textual objects. The inventory has become graphical and concealable (in a DIV) enabling the analysis of objects, their combination and their extraction from the inventory.
  • For the dialog system we started from a pre-existent library managing a direct dialogue with choice answers. This library has been extended in order to enable complex dialogues between the player and the characters inside the scene and to enable the conclusion of the dialogue by selecting the valediction.
  • The dialogue system and the movement of the main character have been integrated with the aim of enabling the interaction with NPCs only when we are near them and for starting dialogues and the zoom with the camera just by clicking on the selected character.
  • In order to enable a free exploration of at least part of the 3D environment, bounding boxes were created for limiting movements to defined areas.
  • The camera movement has been predefined and linked to different areas of the 3D environment, each one coupled with a different position of the camera. In this way, camera movements are activated only when the character reaches the specific area.
  • Characters made from Cookie Flex Rig have undergone a process of adaptation, in particular have been drastically simplified by eliminating every modifier and by applying all the shape keys.
  • The characters in T mode were then texture painted and baked by hand.
  • The armatures for the characters were generated with Rigify. With some minor adjustments, this kind of set up runs in real-time inside the Blender Game Engine, but it is not suitable for the Web. Hence, a copy of the characters were created and the armature underwent a drastic semplification process, reaching - at maximum - 40/50 bones; while, the complex versions were used to create the animations and to bake them. The animations were then incorporated inside the file for the Web.
  • At present, the prototype is in search of some fundings in order to be completed
    Of course, everything developed for such a gameplay can be adapted to other interactions inside non game-like 3D virtual environments.

    Technical information:

    People:

    Movie:


    Back to the Middle Ages: some recordings showing movement, interaction, the inventory and dialogues inside the on-line game in Blend4Web.

    Sample stills from Back to the Middle Ages:


    The medieval level: the market


    The roman level: the bridge


    The simplified armature of a NPC


    Node material for the dress of one of the merchants


    Bounding boxes set for the first level of the game


    Water reflexes cast on the bridge


    Node material for the water


    The inventory


    The dialogue system




    made with Blender