Re: [linux-audio-dev] game programming.

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] game programming.
From: Peter Hanappe (peter_AT_hanappe.com)
Date: Fri Jun 08 2001 - 10:17:10 EEST


Tobias Ulbricht wrote:

> simple question.
> How would you start to implement music (mod, midi) and audio support for a
> game?
>
> I looked for games-programming, but found only oss-dependent environments.
> Is there a favourite one of you?

We initially developped the soundfont synthesizer for gaming purposes.
(http://www.hanappe.com/iiwusynth.html)

What we needed was a simple and efficient sound rendering tool with
a simple API. Patch editors needed to be available, too.

Most importantly, the engine should try to use hardware accelaration
if it's available. Like OpenGL, if you have dedicated hardware, you get
the acceleration. Otherwise it should do it in software (on all
platforms - linux, win, mac).

We thought SoundFonts were the way to go but there may be other
solutions.

Another point is the future extension we're planning:

We're designing a generalized mod-like environment on top of the synth.
It's generalized in the sense that you define "states" and the
conditions to move from one state to another. States define what
patterns should be on and off, the volumes, the pans, selected programs,
etc... When you move from one state to another, you define a number of
transitions (fade in/out, program change, ...) and
the synchronisation (wait till beat 2, till the end of the measure, ...)

It's a more interactive concept than found in mod players.
Also, the patterns can have any length, aren't necessarily looped and
are read from MIDI files (so you edit them with your favorite
sequencer).

The game designer and the composer can work quite independently. They
only have to define the set of events on which the music should
respond. The composer can then work separately and decide how the music
should change when an event happens in a certain (musical) context.

It's still 100% vaporware as all this exists on paper only but if
anyone has some ideas about it I'd love to discuss it.

> Here is what I, newbie, would do:
> I would start a sound server,
> use maybe a music and an audio thread
> and add a client for music and audio to the external server.
>
> struggeling with artsd at the moment.
> using libartsc.so as a client
> and would use, i.e. libmikmod as input for mods.
> right?
>
> any suggestions, where to look for welcome.
>
> cheers, tobias.

-- 
Peter Hanappe
peter_AT_hanappe.com


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Fri Jun 08 2001 - 13:09:45 EEST