A free cross-platform game development framework.
 
 
Go to file
cosmonaut 0cd2c799ee Audio Restructuring (#50)
This is a complete redesign of the MoonWorks Audio API.

Voices are the new major concept. All Voices can be configured with volume, pitch, filters, panning and reverb. SourceVoices take in AudioBuffers and use them to play sound. They contain their own playback state.

There are multiple kinds of SourceVoices:
TransientVoice: Used for short sound effects where the client will not be keeping track of a reference over multiple frames.
PersistentVoice: Used when the client needs to hold on to a Voice reference long-term.
StreamingVoice: Used for playing back AudioDataStreamable objects.
SoundSequence: Used to play back a series of AudioBuffers in sequence. They have a callback so that AudioBuffers can be added dynamically by the client.

SourceVoices are intended to be pooled. You can obtain one from the AudioDevice pool by calling AudioDevice.Obtain<T> where T is the type of SourceVoice you wish to obtain. When you call Return on the voice it will be returned to the pool. TransientVoices are automatically returned to the pool when they have finished playing back their AudioBuffer.

SourceVoices can send audio to SubmixVoices. This is a convenient way to manage categories of audio. For example the client could have a MusicSubmix that all music-related voices send to. Then the volume of all music can be changed at once without the client having to manage all the individual music voices.

By default all voices send audio to AudioDevice.MasteringVoice. This is also a SubmixVoice that can be controlled like any other voice.

AudioDataStreamable is used in conjunction with a StreamingVoice to play back streaming audio from an ogg or qoa file.

AudioDataWav, AudioDataOgg, and AudioDataQoa all have a static CreateBuffer method that can be used to create an AudioBuffer from an audio file.

Reviewed-on: MoonsideGames/MoonWorks#50
2023-08-03 19:54:02 +00:00
lib AV1 Video instead of Theora (#49) 2023-06-07 21:18:44 +00:00
licenses add Matrix3x2 and rename Matrix to Matrix4x4 2021-02-16 18:07:50 -08:00
src Audio Restructuring (#50) 2023-08-03 19:54:02 +00:00
.editorconfig Formatting pass 2022-02-22 21:14:32 -08:00
.gitignore initial input handling 2021-01-18 23:29:07 -08:00
.gitmodules fix dav1dfile submodule 2023-06-07 15:35:07 -07:00
MoonWorks.csproj AV1 Video instead of Theora (#49) 2023-06-07 21:18:44 +00:00
MoonWorks.dll.config update dll.config 2023-06-23 16:17:44 -07:00
MoonWorks.sln Combine all dependencies into the main csproj (#21) 2022-08-14 20:44:55 +00:00
README.md add dav1dfile dependency to README 2023-06-19 16:19:36 -07:00

README.md

MoonWorks

MoonWorks is a free cross-platform game development framework. Its implementation is heavily inspired by FNA, which is itself a free implementation of the Microsoft XNA API.

MoonWorks wraps native-code implementations in managed C# for clean high-level abstractions that still run fast. It's simple and it tries to stay out of your way as much as possible.

MoonWorks does provide the components you need to implement a functioning game: window management, input, graphics, 3D math utilities, and audio.

MoonWorks does not include things like a built-in physics engine, a GUI editor, or a standard rendering pipeline. These decisions and tools are better made per-team or per-project. In short, if you don't mind learning what a vertex buffer is, this framework is for you.

MoonWorks uses strictly Free Open Source Software. It will never have any kind of dependency on proprietary products.

Documentation

High-level documentation is provided here: https://moonside.games/docs/moonworks/

For an actual API reference, the source is documented in doc comments that your preferred IDE can read.

Dependencies

Prebuilt dependencies can be obtained here: https://moonside.games/files/moonlibs.tar.bz2

License

MoonWorks is released under the zlib license. See LICENSE for details.

MoonWorks uses code from the FNA project, released under the Microsoft Public License. See fna.LICENSE for details. By extension it uses code from the Mono.Xna project, released under the MIT license. See monoxna.LICENSE for details.