Posts

Monogatari v2.0.0.beta.12

Download Link: Monogatari-v2.0.0.beta.12.zip

Remember this is a Beta release meant for testing and bugs are expected, everything is also prone to change a lot. If you're using it to release a game, you should warn your players as chances are it will eventually break.

📰 Release Change Log

🌟 New Features

It is now possible to add pauses and change the speed of the typewrite animation for the dialogs on the fly. Pauses are defined in milliseconds:

// Pause the dialog for 300ms before continuing:
'This is some... {pause:300} dialog with a pause'

Speed on the other hand, respects the user's settings for text speed so changing speed in-dialog requires you to provide a percentage instead of a fixed value.

A value of 100 refers to the 100% of the user's selected speed so anything below that will be slower and anything higher will be faster.

// This will make speed be 2x (200%) what the user selected:
"Let's see how {speed:200} fast you can read!"

// This will make speed be 1/2 (50%) of what the user selected:
"Let's see how {speed:50} fast you can read!"

🐛 Bug Fixes

📦 Misc

How To Upgrade

If you were already using a previous release from v2.x.x, then upgrading is as simple as replacing the files in your engine directory with the new ones.

If you are planning to upgrade from a game made with the v1.4.1 release, we recommend you reading the Upgrade Guide

Work In Progress

Just as a general announcement, layered sprites are now under development! Until now, all your characters sprites had to be a single image and that works just fine for many games but when you start having many different expressions, poses and even clothes, creating an image for every combination of those can get insane.

With layered sprites, you will be able to use the individual images to make up a full sprite. This is still in a very early stage and will probably take a while to be released as it will require quite a lot of work.

Current State

Right now, when you define a character, you can add a list of the layers your sprites will have and then, when defining the sprites, you can declare an image for each layer:

monogatari.characters ({
    'y': {
        name: 'Yui',
        directory: 'Yui',
        layers: ['base', 'mouth', 'eyes'],
        sprites: {
            happy: 'happy.png',
            normal: 'normal.png',
            sad: 'sad.png',
            surprised: 'surprised.png',
            angry: {
                'base': 'base.png',
                'mouth': 'mouth_alone.png',
                'eyes': 'eyes_alone.png'
            },
        },
    },
});

In your script, nothing changes. show character y angry will assemble the sprite by placing all the images in top of each other in the exact order you defined in your layers property.

This will require you to position each of the sprite parts manually, in CSS this would look this way:

character-sprite[data-character="y"][data-sprite="angry"] [data-layer="eyes"] {
    left: 24%;
    top: 10.5%;
}

character-sprite[data-character="y"][data-sprite="angry"] [data-layer="mouth"] {
    left: 38%;
    top: 17%;
}

The result

Layered Sprites Sample

The image on the left has been assembled using layered sprites while the one on the right is the full image. There are still a few differences on some proportions but some more tinkering should make it perfect.

There is A LOT of work to be done such as allowing you to change only one layer of any sprite from the script and doing the whole save/load logic for them but I hope we'll see the release of this feature later this year!

All the work around this is being done in the layered-sprites branch on GitHub so anyone feeling curious or wanting to help can take a look at everything there :D