Jump to content

Responsive Game Music with Phaser


PhaserEditor2D
 Share

Recommended Posts

Hello

 

I just read this article:

 

http://gamedevelopment.tutsplus.com/tutorials/responsive-game-music--gamedev-7221

 

It is about to implement responsive music for your game. I tried to do this with phaser API but introduced some lag in the transition from one sound to other. Probably I am doing something wrong, but my question is if there is any plugin related to responsive music in phaser.

 

If there is not any plugin, maybe, if you give me some tips, I can try to develop it.

Link to comment
Share on other sites

If you are using Internet Explorer (or other browser without Webaudio API) you won't get smooth transitions. However with little bit work you can get it work fairly well. With Webaudio API (and Phaser is using that if available) you shouldn't have problems.

 

To overcome the small issues with audio we were able to solve those with small crossfades, and the music was such that it forgives small timing errors. Also layering background ambience and music further gave responsive illusion. The article you linked is fairly simple block sequencer based idea and is fine too and is using transition blocks. However it requires clever work from audio designer and the biggest issue are the block tails to create smooth transitions and that requires two blocks to play at the same time as well which is little bit problematic with IE. The article music is quite snappy, thus tails are short.

 

You can hear the crossfading game audio we developed (using Phaser with in-house audio manager on top for all the required extra code, which is not that much really) here  http://sc5.io/reference/Mayan-Aarre  (not possible to give playable demo)

 

The crossfade speed depends where the change happens. When transitioning from the start screen to game screen, there's longer crossfade. Also during the game play the music changes little bit with faster crossfade. Smooth looping is archived with overlapping tails in audio. It doesn't really have to be that complicated (or perfect), unless the game is really music based and timing is the core.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...