Whispering Tracks Devlog #1 - Adventure in music


In February 2020… Boy, 2020, the year I discovered depression. That was something! And it started that month, February. I joined a jam. The Potat0s Jam, third edition. It's a small french jam, with a friendly community. It was running for two days, and had for theme: Lost. An inspiring theme, I like the idea of games that can't be won, but mostly, I love losing myself in a game! Wandering and getting lost is a strong feeling, and I'd love to create a game that would convey it. And “good news”, I already had an idea for a game like that! This jam was a perfect occasion to test it! Sure, I was a little bit sad not to spend much time on looking for an idea (I really enjoy that creative part of a jam), but I had a promising concept! So Friday night I started working on it, was kinda satisfied with what I had Saturday night, and on the middle of Sunday… It was just bad. Not pleasant at all. I could still lower my goals, re-think some aspects, make it less ambitious to release something, maybe a prototype. That's what I usually do. Except that on this day I had lost all my motivation. I was tired, it wasn't a good time for a jam after all. So I gave up, and took the rest of the day for myself. I planned to continue this project later. What I didn't know then however, is that I was already in a light depression, that would only get worse in the following months (with a surprise lock-down to make it perfect!). I wouldn't have motivation for game development before a long time. In fact, the failure of this jam had an impact on my willing to make games! I lost my confidence, and enthusiasm. And thus it remained in hiatus. And ever after I felt better and started to make games again, I stood away from this project. It had a “cursed” aura.

But I still find its core idea interesting! So this year, I decided to get back to it! I started on May, and I'm making some nice progress. I won't lie though, it's not easy. Not only because it's ambitious, but also because I'm kinda afraid of putting a lot of efforts into it and still be disappointed. That's partly why I'm starting this devlog! I know that by committing to it, I feel more motivated to make progress that I can show. And there's a lot of cool new techniques that I'm discovering, and I want to share it with you! So welcome to the development blog of Whispering Tracks!

(That title is not definitive by the way. Found it during the jam, but it doesn't convey the feeling I want for the game)

The pitch

Okay, so what's the game? And what is its current state? Well, a picture is better than a thousand words. This is what I achieved to make on the jam:

See, there are numbered tiles, and the player has to walk on them in the correct order to solve the puzzle! Ain't that exciting?

Well, there's more to it of course. First, the tiles will kinda be invisible. More on that in a later post. The player will have to rely on sound to detect them, and find the correct order (it will play a musical scale). Furthermore, there will be a vast world to explore, and music will also be the element that will guide the player in his journey. Using the same techniques I used in Blood Not Allowed: when the player gets close to a specific spot, a musical loop will play, creating a dynamic soundtrack with different moods for each place. It's kinda as if the player was exploring the music itself! They have to use their sound memory to navigate and figure out where they are, and how to complete the puzzles.

As you can see, I already had the core engine working. Character that moves in 2D, checked, tiles that can be activated in the right order, checked, world that loops on itself, checked, dynamic audio according to player position, checked, exit and walls, checked! What's missing now is the art, and most importantly, the music! The first one will actually be easy, as a lot of things will actually remain “invisible” (again, this will be for another post). Music is what I must focus on! It's the core of the game, it must be good!

Unfortunately this is where I hit a wall. Usually when I write music during a jam, I vaguely plan ideas, then I experiment, fiddle with some instruments, melodies and chords, and see if it works out at the end. Sometimes I get pleasant surprises, sometimes it needs a little more work… And sometimes it fails horribly. This was one of those. I wrote the soundscape of two different zones, and it was just bad, bad, bad! Listen for yourself. Ew. It's bland, repetitive, hollow… Plus, I realized that having a sequence of four different chords created a lot of melodic restrictions! I could only create 4 bars loops, or 1 bar that would fit all, and you could easily hear where it loops. It was way too similar than what I did with Blood Not Allowed, which was nice, but, erf, I want do something different than repetitive melodies! This wasn't savable at all, I had to start all over again. It is when I came to this conclusion that I decided to take a walk, and eventually step down. I have the system programmed, I'll just write the music another time.

One. Year. Later.

The boring technical section

Before I talk more about the music, let me present you the tools I used to make this game. It is a web game, written entirely in Typescript. I used the game framework Phaser, and my own music tool Orchestre-JS.

I had already made two games with Phaser 2, In Octave and Step Out. It is a nice engine, but it had its flaw. However it was a long time ago, and since then Phaser moved to version 3, with a neat Typescript typing! Maybe it has improved? It also was a long time since I hadn't made a pure HTML5 game. So I tried Phaser 3, and… was overall disappointed. Some legacy flaws remain, like the overuse of this to instantiate any game object, which makes structuring a large project quite complicated. The typing itself isn't perfect, way too many magic strings (Typescript has enum, please use them!), and even some functions returning any. As for the doc, they updated it, but it is still a mess. Everything is sorted in alphabetical order, and while there is a lot of good small demos and tutorials, none of them really cover the structure of a full project. It is for the developer to find by themself how to elegantly nest game  objects (all "Sprite" by default, another weird thing) and optimize the loading of assets and dialogs between entities. While you can still create great things with Phaser, and it has neat features, it is too unorganized in my taste. Developing with it is laborious, and you face way too often issues linked to the framework's constraints and odd logic.

Orchestre-JS on the other hand… Okay, I will spare you the self-praising. It's a tool I built mostly for my own usage, so of course it fits perfectly in my projects. However it was also a long time since I hadn't use it (since I make a lot of games with Godot now)! I was eager to put it in use again. Especially for this project, which would be a fantastic demo for it! However, Orchestre-JS had one flaw: it was in Javascript. Which meant I could use it in my Typescript project, but I had to type everything as any. Not convenient at all! Back when I wrote it, Typescript wasn't as popular as it is today (Narrator: it still was pretty popular), but now a lot of the web development is made in Typescript. If I want this library to be used, I have to type it! And this is exactly what I did this year. It might be my first (indirect) addition to Whispering Track: I converted Orchestre-JS into Typescript (it is still named "-js" though, oh well)! It wasn't as laborious as it sounds. There are few classes, and they were already written in ES 6. I mostly typed every functions, and even changed the signature of some to make them more intuitive. The most fastidious thing was to properly export it, so that it could still be used in a JS project! And thus on February 2021, I released Orchestre-JS 2.0. A library I'm still proud of. It even got featured in Web Audio Weekly, a cool newsletter on Web Audio API, wow! It hasn't happened yet, but I hope to see one day a web project using it. It's a tool I made as user-friendly as possible, and while it does only a very specific task, I believe it does it pretty well, and allows to create nice things.

The sound of level-design

Finally, let's dive into the music! Or at least, how it is constructed. The world of Whispering Tracks is divided into several zones, which all have their own theme. Each zone has a background loop, that sets its mood. Inside, several instruments are placed on different locations. The closer the player gets to them, the louder they sound. Their range are also varied: some can be heard at a long distance, other require to be very close in order to be heard. Naturally each zone contains instruments that fits its theme, but instruments close to the edge of a zone can also be heard from the other one! The goal is to give players the feeling of navigating in the middle of an orchestra.

There will be 5 zones in total, including the one in which the player starts. Each one will have its own tiles puzzle, and to complete the game the player will have to find them all. Here is a map I draw during the jam:

Each square represents one screen. The player starts at the center. I chose to make the areas rectangular in order to make their disposition slightly unpredictable. As mentioned above, the world will loop on itself, meaning that if the player walks into an edge, they will find themself at the opposite edge. This way they can walk aimlessly, discover new zones, and be surprised when they get back to the start screen!

The music I made during the jam was intended for the start zone (kind of “wood” themed), and a “beach” zone. The first one has to be very discrete, like a tutorial area. It should not be overwhelming, in order to make the player understand that several instruments can be heard when they move, and they have to pay attention to them. The main issue I faced when I first composed it is, I think, that I wasn't inspired at all. I just had no idea of where I wanted to go, or at least no interesting one. I just made a generic wood level theme. And today the problem is… I still haven't found inspiration! I don't really know exactly what I want to do with that area. And thus I don't have much motivation for it.

However, I know that they are other areas for which I have a lot of ideas! In fact, they are the ones I intended the game for! I'm eager to compose them and discover new genres. So… Why should I start at the beginning? Let's hop on them immediately! This way, I'll make the starting area on last, when the other zones will have gave me lots of direction. Hopefully, by writing the beginning on the game after all the other, I would have gained enough experience to make it the best one! Right? Anyway, this approach was way more engaging, and thus during May I achieved to write and implement the first zone!

Steve Reicheries

The first zone is the one I call the "city". Actually there's nothing really urban about it, it's just that musically it inspires me a busy town with skyscrapers, machines, and circulation everywhere.

I wanted to write a minimalist piece, in the vein of Steve Reich's style. That's something I wanted to do for a while! I love minimalist music, and Reich compositions are one of the most inspiring and mesmerizing ones. My main inspiration here was Music for 18 Musicians, an incredible piece that you should seriously listen to. It is hypnotizing, and despite the repetition takes us to a wonderful journey. Its structure is also perfect for the game: single notes, one chord, short melodic patterns repeated… You can absolutely transcribe this into a musical space!

The first thing I did was searching for a scale and a chord that I would stick to. My error for the first version was to write a sequence of 4 chords. I should instead stay on one. This way I have way more freedom with the melodies! They can have any length, they will always land right. I also have to take into account some other zones for which I have plans. After some fiddling, I chose D Dorian. It's a minor chord, but don't worry, there's still a lot of smooth harmonies that can be made with it. As for the base loop of the zone, I wanted repeated notes on the piano. Like Music for 18 Musicians, piano, string, and marimbas, should be the main instruments of the zone. The piano was the one I wanted always present, to give the rhythm and the tone. Playing just a D minor wasn't really interesting, so I experimented, and eventually found this interesting pattern. It's pretty basic, but there's a lot of different harmonies that can emerge from it! 

Thus I began to write different sections. In quite a disorganized manner. I added strings sections, marimbas that would give a base note, short melodies played by different instruments, rhythmic patterns, long chords… Eventually I was able to separate ideas into three "sub chords", and different rhythmic categories. It was very unprepared, but I obtained something pleasant. However, it was really laborious! Writing several small melodies played each by a single instrument, on a DAW, takes a lot of time. At the end, I exported 38 different tracks, with some of them composed of two or three instruments!

This is not even half of it

Then another huge task was placing them in the game! I'm glad I know how to use multi-cursor in my IDE, because writing all the file paths would have been a nightmare. But it still took a while. Once again I didn't planned anything, so I placed most of them semi-randomly. Like I said, I categorized them according to the notes they were playing on, the instruments used, and their roles in the music. But I disposed them all at the same time, vaguely balancing them, to see what serendipity had in store for me. Since they had to be placed within the code, I used Inkscape to map them visually:

This is an actual representation of the music!

As you can see, instruments have different ranges. Three to be exact: small, medium, large. The challenge here was to not let any empty space, and have as much juxtapositions as possible (as emerging patterns from several instruments is what makes minimalist songs so captivating).

After some fiddling, this is the result I obtained: a walk inside the city area. There are still some equalization issues, and a lot of place still feel too "empty". Maybe I should duplicate some of the instruments, to make sure there is always an harmony playing. But to be honest, it's still satisfying! I'm glad I explored this genre, and actually I intend to revisit it in later projects. With generative music? You know me well.

Now is the time to attack the next zone! I'll talk about it once I have something for it, hopefully in two or three weeks. But I'll try to avoid one mistake I made with this one. Writing all the instruments, and placing them at the end, was maybe not the right way to approach this kind of composition. Instead, maybe I should place tracks immediately after I finished writing them, to better control the "landscape" of the music. It will take more time, but at the end, it might give more satisfying results.

Leave a comment

Log in with itch.io to leave a comment.