We want mobile gaming to be a more immersive and interactive experience, so we designed Wave. It's an open source Unity game engine Asset that makes 2 game dev features tremendously more accessible: elements of motion tracking for character control and real-time audio streaming between multiple devices. Check out a 2-minute demo video here.
Prerequisites
Getting Started
Gyroscopic Camera Controller
Translational Movement with Accelerometer
Real Time Audio
Assets Directory
Contribute
Team
- Unity 5
- Windows: 7 SP1+, 8, 10
- iOS: Mac OSX 10.8+ with Xcode
- Android: Android SDK
To get started you'll want to add the following things to any game object you want to be able to talk in real-time:
- AudioSource object
- VoiceController.cs
Currently, our audio feature is configured to only work with Unity's networking through their HLAPI and was written with Unity 5 in mind. To see an example of this feature being used with the HLAPI check out the 'demo' branch of this repository.
Configurable Options:
- Compression (defaults to Zlib)
- Recording Frequency (defaults to 16000Hz)
- Packet Sizes ...everything really
We provide multiple compression options such as: Zlib, Opus, NSpeex, and Snappy.
It's easy to adjust any of the settings you desire for your game. Just go to the VoiceController.cs script and change the variables at the top of the file. For example, if you want to record at higher frequencies, then just change the recordFrequency variable.
| Name | Description | | ------------------------------------------ | ----------------------------------------------------------------- | | Scripts/CameraController.js | Use the phone's gyroscope to control the in-game camera. | | Scripts/PlayerController.js | Use the phone's accelerometer to guide in-game movement. | | Scripts/VoiceController.cs | Facilitates real-time voice chat. | | Scripts/VoiceUtils.cs | Various compression and typecasting methods for audio info. | | Scripts/VoiceCompression.cs | Provides a list of audio codecs used in VoiceSettings.cs. | | Scripts/VoiceSettings.cs | Edit this file to select and implement different codecs. | | Scripts/CircularBuffer.cs | Used to prevent dynamic memory allocation when sending audio data.| | Plugins/Ionic.Zlib.dll | Codec for Zlib audio compression and decompression. | | Plugins/NSpeex.dll | Codec for Nspeex audio compression and decompression. | | Plugins/Snappy | Codec for Snappy audio compression and decompression. | If anything is at all unintuitive or unclear, please feel free to reach out. We'd love to incorporate any feedback from the community, especially given that this is an open source project. This is very much a continual work in progress, and we're constantly adding functionality. * Jessica Ayunani - github.com/jayunani * Michael Laythe - github.com/mlaythe * Jeremy Yip - github.com/jeyip