Sound



  • Can you add some methods for playing pre-defined game sounds (embedded) and external sound files? Would like to see some methods for playing a sound for harvesting, upgrading, charging, building, etc. Maybe even a client side option for enabling a soundtrack loop?



  • Sounds interesting.

    👏


  • In any "running" room wouldn't there be so many sounds playing over each other that it wouldn't give any info? I know I have 2 harvesting, 1-3 upgrading and a few builders per tick. That said towers pew pewing could may be useful, though I'd have to be watching the room.



  • Loooong time ago I copy pasted this from someone. It worked about a year ago, but haven't checked this for a looong time. Maybe someone want to try?

    // The function below was developed late last year by @stybbe, published in // Screeps Slack's #share-thy-code channel. No license was applied; all
    // rights remain with the author. Minor fixes were made by @SemperRabbit // to get it working again.

    // NOTE: that this code works in chrome and firefox (albiet quietly // in firefox) but not the steam client.

    global.defaultVoice = "Deutsch Female"; // can be changed // see https://responsivevoice.org/text-to-speech-languages/ // for options global.voiceConsole = function voiceConsole(text) { console.log(`${text}