Posts

The missing lore of DEEPDOOR

One of the best things about writing a blog is that every now and then I feel like rambling or just typing something that's on my mind, and I can. Like   Morning thoughts of a night owl , I just start writing and think very little until it's time to edit.  While explaining it to my wife recently, I felt like writing about the lore of DEEPDOOR , a short game I released in 2021.  Development and Release Originally meant as a submission for the Haunted PS1 gamejam, I started making DEEPDOOR a few days before the deadline and eventually missed it. While I did find myself out of the competition due to this, I was having way too much fun making the game. So I spent a couple more days working on it and tweeting updates. One of my posts was noticed by @horrorvisuals  and their repost got over 100 likes and maybe 30 new followers.  When the game released, in a matter of hours it was in top 50. Over the next few days it went to top 10 and stayed there for a week or so. Ho...

UniMic 3.3.0: Many StreamedAudioSource improvements, thanks to MetaVoiceChat

For a couple of months, I have been getting on a weekly call with a team that's integrating UniVoice into a project but they've been facing an issue. When it's just 2 people in the room, they can hear each other perfectly. But as soon as a third person joins, everyone's audio starts popping and gets a little jittery. You can still understand the person but the audio becomes noisy and irritating after a while. The popping effect is often the cause of writing audio data to an AudioClip on a buffer strip that's still being read. Or it can happen when you write data that's too close to your reading head and before the writing operation completes the read head is already on it. I've been looking into StreamedAudioSource.cs to fix a fix for this. But it was only last week that we finally figured out that the issue is in the Concentus Decode Filter instead and I've been looking in the wrong place.  But the great thing about this detour is that during this time ...

UniVoice recipe: Adding proximity audio

 A bunch of people have asked me how can be achieve proximity audio chat. Which is a fair question given that UniVoice is primarily targeted towards games and they're often 3D. Currently proximity audio is not supported out of the box. I do have something under works that would allow you to just drag and drop a component to an avatars head and the audio of players will originate from there.  That said, until that component is ready, it's possible to get proximity audio using some code. Using the OnPeerJoined event  Look at line 128 of  UniVoiceMirrorSetupSample script that is included in the UniVoice package.  That's an event that gets invoked for every other player in the game along with their ID. Note that the peer ID is the ID that Mirror assigns, so it can be used using Mirror APIs. This will come in handy later. Here's how it works. Say you join a game that already has 5 players before you, this event will be fired 5 times immediately upon your joinin...

UniVoice 4.5.1: Mirror Host mode support

A limitation of Mirror support in UniVoice so far as been support for Host mode. The main reason for this is that most teams using UniVoice have been doing so in a dedicated server environment. However, Host mode has its own uses: - makes it much easier to test in Unity. Run the server in the editor and the client on one build. - local networking and co-op experiences. - ParellSync and other tools can be used to test multiplayer using two editor instances So it only made sense to add support for it. I marked this as an enhancement I want to make in April, but recently there was a lot of activity on the Github issue  so I got to work on it. How it works The changes are pretty simple. See the commit  here   When in Host mode, the server needs to register local client with ID 0 immediately after starting up. This happens in MirrorServer.cs on line 85 When the server stops, or goes from Host to ServerOnly mode, the local client should disconnect. This happens on lines 99 and ...

Morning thoughts of a night owl

The residents in the apartments opposite us have started to turn their lights off and call it a night. Some of them are binge watching TV, and won't stop for many hours. The traffic on the road is starting to calm down. Not many passenger cars and cabs now. Most people have already endured their journey back home from their workplace, through the chaotic streets of Bangalore during rush hour. Now it's largely trucks and cranes and other heavy vehicles making the noise, many of them going to one of the construction sites near us. My wife and I have had dinner. She's done with her work and we're finally watching the series finale of Brooklyn 99, after over a year of watching an episode or two every now and then. There are 11 minutes left before it ends and it's 10:42pm right now. Perfect. Because I'd really like to finish this episode before 11pm, which is when I get on Discord to join daily standup and start my workday. --- I was recently talking to a couple of p...

UniVoice 4.4.0: Easy drag and drop integration with Mirror (also, YouTube tutorial)

Image
A tutorial for this blogpost is available on YouTube I've recently helped a lot of people setup a basic UniVoice integration in their projects. And it became clear that the sample scene is not minimal enough. The sample scene is basically an example app that also does some UI stuff. Going through the code shows how it can be used. But what most people are looking for is to get basic voice chat working as soon as possible. I've seen some people adding the example app script to their scenes, which will not work as expected. For this reason, I have now created a basic setup sample that provides a component that you can just add to your Mirror Network manager and get voice chat working immediately. This UniVoiceMirrorSetupSample.cs  easily allows you to check if voice chat is working by making sure you have setup UniVoice properly, pretty much just adding the UNIVOICE_NETWORK_MIRROR  compilation symbol to your Mirror project. The script also provides access to the IAudioServer<...

UniVoice 4.3.0: Easy Push To Talk

Push to Talk is a popular feature to: * Encourage users to user voice chat more intentionally * Reduce CPU and bandwidth usage on both the client and the server * Avoid excess chatter when connected to several peers as they'd all be transmitting audio without it Old approach using VoiceSettings UniVoice provides a VoiceSettings class that allows a client to mute or deafen a peer.  In theory, this can be used to create a push-to-talk feature. However this isn't as straightforward. After modifying VoiceSettings , you need to call SubmitVoiceSettings() to sync it with the server. The server then makes sure that the audio you send to it doesn't get sent to anyone. Usage would be like this: session.Client.YourVoiceSettings.deafenAll = true; session.Client.SubmitVoiceSettings(); This isn't too bad, but there are a couple of limitations: * Syncing the settings with the server takes a while, so it's not as instantaneous. * The client still continues to send audio to the s...