Ghorthalon / audiogame-tools

Tools for providing audio game-like experiences in the web browser
MIT License
9 stars 4 forks source link

WARNING! Very early development

Audiogame Tools

This is a set of libraries written to aid in developing audiogames in the web browser.

Currently, this set includes:

Status

This library is very much incomplete and still a work in progress. Documentation is more or less non existent, and I will be pushing examples in the following days. This will hopefully change as time progresses. I'm working on this code and adding/improving things as my games need them. If you have anything you'd like to improve, fork the repository, make a change, and send a pull request. If you need help, simply open an issue, or use the discussion tab.

Motivation

I've previously open sourced a bunch of modules to help make audiogames in the browser. I've decided to combine them all into one repository to make using them easier, as well as provide some way to bundle the whole engine into a single JavaScript file. Most of the previous libraries have been completely rewritten, or are in the process of being rewritten. Everything's written in Typescript.

These libraries are things I find myself reinventing over and over. There is a rough plan for things to add as I go. The main one is adding a basic 3d World component I can reuse across games, together with an editor, and basic features like an in-game radar, zone announcements, etc. Together with the world editor, I would like to add a sound asset editor. The idea behind this is that you set up a sound asset which can have different properties, for example playing one out of a set of random sounds, pitch and volume randomization, etc. Then, in code, you would simply trigger the event, and the engine does all the work behind the scenes, such as selecting the right sound to play, randomizing the pitch and volume, setting its 3d Position, etc.

I'd like to state that these are things I work on in my limited free time and mainly for my own projects, however others might find use in them. If you'd like to help make them better, I'd highly appreciate it. Including this readme! 😉

Using these libraries in your own project

Right now, I do not publish these libraries in their incomplete state to NPM. To use them, you can do the following:

This links the libraries from their development directory into your current project, and you can use them like you would any other npm module and build using webpack, esbuild, etc.

You can also use yarn bundle:engine after building. This will produce an engine.js file which you can include in your project.

Again, if you have any questions, feel free to use the discussion tab on GitHub, or open an issue.