12 Mar

DOTween: How to append a tween to a sequence already playing?

I’m using the fantastic DOTween engine for creating and managing tweens on Unity, but the latest version cannot handle a specific case: how to append a tween to a sequence which is already playing? First a bit of background. After completing DragonScales 6, we’re focusing on a new game, a casual Match 3 with a traditional tile swapping gameplay. Our DragonScales games are created with Java and LibGDX. However, this new project will be built on Unity with C#, and we make intensive use of tweens.

In particular, we want the players to be able to keep playing and swapping tiles even if the game is simultaneously processing matches in other areas of the board. When a match is detected, tiles above those matched tiles will fall. We’re implementing this falling path with position tweens, via DOTween. However, new matches in other areas might alter the path of tiles which are already falling. In order to handle such cases we’ll be appending new tweens to the tweens which are already executing. The problem is that sequences in the current version of DOTween must be entirelly defined beforehand, which clearly does not suit our requirements.

Luckily, there’s a sound workaround published by user EvgenL in this pertinent and open DOTween issue. In short: use a queue of sequences. Here’s the class we’re using, completely based on the referred code:

public class TweenChain
{
    public Queue<Sequence> SequenceQueue = new Queue<Sequence>();

    public TweenChain()
    {
        // empty
    }

    public void AddAndPlay(Tween tween)
    {
        // Create a paused DOTween sequence to "wrap" our tween
        var sequence = DG.Tweening.DOTween.Sequence();
        sequence.Pause();
        // "Wrap" the tween
        sequence.Append(tween);
        // Add tween to queue
        SequenceQueue.Enqueue(sequence);
        // If this is the only tween in queue, play it immediately
        if (SequenceQueue.Count == 1)
        {
            SequenceQueue.Peek().Play();
        }
        // When the tween finishes, we'll evaluate the queue
        sequence.OnComplete(OnComplete);
    }

    private void OnComplete()
    {
        // Tween completed. Remove it.
        SequenceQueue.Dequeue();

        // Other tweens awaiting?
        if (SequenceQueue.Count > 0)
        {
            // Play next tween in queue
            SequenceQueue.Peek().Play();
        }
    }

    public bool IsRunning()
    {
        // Are tweens being processed?
        return (SequenceQueue.Count() > 0);
    }

    public void Destroy()
    {
        // Goodbye. Thanks for your hard work.
        foreach (var sequence in SequenceQueue)
        {
            sequence.Kill();
        }
        SequenceQueue.Clear();
    }
}

Hopefully future versions of DOTween will handle this use case in a straightforward fashion. We needed to append a tween to a sequence in execution and, for the time being, this class solves our requirement.

20 Nov

DragonScales 5: The Frozen Tomb clinches the top spot on iWin

Good news! Our newest game DragonScales 5: The Frozen Tomb has reached #1 entry on casual game portal iWin.com. Yet more, DragonScales 5 clinched the top spot for all its 3 categories:

  • Match 3
  • Puzzle
  • Brain/Logic

We know new and fantastic games are released every day, and these “top spots” are temporal things, but today we’ll enjoy our little victory. Thank you very much to all of you who made this possible!

02 May

DragonScales 3’s page is now active!

Hello everybody! The web page for our new game DragonScales 3: Eternal Prophecy of Darkness is already live! You can read a description of the game including its features, take a look at a few screenshots and the trailer, and of course, purchase the game. For the time being, DragonScales 3: Eternal Prophecy of Darkness is available for Windows and Mac. Here’s the link to the game’s new site: DragonScales 3: Eternal Prophecy of Darkness. We hope you like it!

14 Jul

DragonScales Deluxe available in 6 languages!

DragonScales Deluxe Multilanguage Localized
Great news! Our game DragonScales: Chambers of The Dragon Whisperer has been localized into 6 languages (German, Dutch, French, Spanish, Italian and Portuguese) thanks to the great work of GameHouse’s localization team. They’ve carried out a fantastic translation, which included localization of textual and non-textual elements of the game. All of this started a few months ago, with the adapting of a special DragonScales build suitable for localization. After weeks of hard work, we’re very excited to bring our original gameplay to a broader audience. As of today, the game is available on zylom.com:

A huge thank you to all of you who sent emails and were on the lookout for fresh news of DragonScales and our new projects. Thank you!

P.S. Stay tuned for news and updates on our next project: DragonScales 2! A new challenge lies ahead! More levels, new game modes, more fun!

13 Nov

Dragons and Nagi on Linux

These days we’ve been almost completely devoted to the launch of our new game, DragonScales: Chambers of The Dragon Whisperer. It’s a new tile-matching game, in which you play scales on a board in order to form combinations. Novel, fun, relaxed, and great for brain-fitness sessions and lovers of casual games. It’s available for Windows, Mac, and Linux.

 

Our previous game, NagiQ 2: Treasure Hunt, was initially available for Windows, Mac, Android and iOS. NagiQ 2 is an original and challenging word game, based on combining words on a board to collect coins, punch evil skulls, explode monsters, trim mustaches and defeat an evil pirate.

However, a few days after releasing NagiQ 2 we received emails from several customers asking for a version of NagiQ 2 for Linux. We promised a version would be eventually released, but time went by, and we were overtaken by DragonScales’ specifics and technicalities, meaning that NagiQ 2 for Linux had to be postponed. Until today.

Today we’re happy to announce that we’re also releasing both DragonScales and NagiQ 2 for Linux. You can purchase them here:

A promise fulfilled 🙂

13 Nov

DragonScales released by Big Fish Games

Big news! We’re very excited to announce that our new game, DragonScales: Chambers of The Dragon Whisperer, has been released today by the renowned game publisher Big Fish Games. Being launched by a top-tier publisher such as Big Fish Games means a lot to us, as our work will be known by more players. DragonScales: Chambers of The Dragon Whisperer is a new tile-matching game, a fun and novel twist to the Match 3 genre. Its gameplay develops on a board composed by hexagonal cells, in which you play scales to form clever combinations of scales having the same color. The dark and ferocious chambers of DragonScales will demand a lot of luck and intelligence.

DragonScales on BFG

DragonScales was presented in the section “Play it a day early” and today it has been officially released by Big Fish Games, for Windows and Mac. You can try DragonScales here, directly from Big Fish Games.