Home News Features Games Authoring Community Forums About Contact
   

May 20, 2013, 12:53:59 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1] 2 3 ... 5
  Print  
Author Topic: OpenAL  (Read 11102 times)
BigMc
SLUDGE Linux/GTK+ Maintainer
Sr. Member
****
Offline Offline

Posts: 266



« on: February 02, 2010, 09:02:34 AM »

Hi,

I talked about having a open source sound library before, mainly about SDL mixer. In fact, SDL mixer is quite limited and doesn't meet our demands. I also explained somewhere that OpenAL has the problem that it doesn't handle decoding etc itself.

Then I found out that there is a new library that sits on top of OpenAL and does all the work for you: Alure (the git version)

I was curious if that would be a good solution, so added it to SLUDGE and it works great! It is as easy to use as BASS.

I need the OpenAL version if I want to package SLUDGE for a Linux distribution (e.g. set up an Ubuntu PPA). But of course I would like to see SLUDGE moving completely to OpenAL.
 
Especially for you, Trumgottist, there is one bad and one good thing to consider:

The OpenAL version has no mo3 support, because there is no free software that plays mo3 yet. This is the only thing where the OpenAL version behaves differently than the current BASS version.

If you wanted to switch, you could repack Frasse using uncompressed module files and we could drop mo3 support. There is also somebody working on a free mo3 decoder (or mo3-mod-converter, which would make the trick I think) but noone knows when or if he releases something that is useful for us.

The good thing is: You can add effects without restrictions!

OpenAL is a very powerful 3D sound library, so if you think that's a good idea, you could enable SLUDGE game developers to assign positions and velocities to sounds and to the listener and there you have 3D sound.

The cross platform implementation OpenAL Soft and the standard Windows implementation support the ALC_EXT_EFX extension, which provides reverb, echo, environmental effects and so on. If you want to read more about this, a big pdf about ALC_EXT_EFX is included in the OpenAL SDK, available here. (I had to download and install it to get the pdf.)

You also talked about interactive music. I don't know exactly what you mean by that. Concerning module files, my implementation uses DUMB for playing them, so check its documentation to see if it can do what you want.

So, what do you think?
« Last Edit: February 02, 2010, 09:12:35 AM by BigMc » Logged
Erwin_Br
Administrator
Longtime Member
*****
Offline Offline

Gender: Male
Posts: 1667



WWW
« Reply #1 on: February 02, 2010, 03:43:36 PM »

It sounds good to me, but I'm no expert.  Smiley

Am I correct that this library can't play .mo3 files, but it does support normal .mod files? And if so, is that a big disadvantage?
Logged

"You know you've achieved perfection in design, not when you have nothing more to add, but when you have nothing more to take away." --A. de Saint-Exupery
BigMc
SLUDGE Linux/GTK+ Maintainer
Sr. Member
****
Offline Offline

Posts: 266



« Reply #2 on: February 02, 2010, 04:04:13 PM »

DUMB is a library that plays .it, .xm, .mod and .s3m module files. Yesterday the creater of Alure (to whom I have mail contact) added DUMB support to Alure while I simultanuously added DUMB support to SLUDGE. So I removed the DUMB support from SLUDGE today and now it supports the files through Alure (like all the other filetypes). Smiley

mo3 is a module format invented by the creator of BASS and it allows ogg or mp3 compressed samples, so it's superior to the other formats.

The disadvantage of not supporting it is that a game with module files will become some megabytes bigger with uncompressed samples. But the bigger problem is that we have a game that wont have sound if it isn't changed: Frasse.

Logged
Trumgottist
Maker of SLUDGE
Longtime Member
*****
Offline Offline

Gender: Male
Posts: 1162



WWW
« Reply #3 on: February 02, 2010, 04:24:13 PM »

That's good news, and I'm cautiously positive. (I want to look into it closer before saying yes.) I have looked into DUMB before (I actually suggested its use to Tim back when he switched from FMOD), and know that it's good. It should be able to play the music in Out of Order without a problem. That's the main concern when it comes to playing tracker-based formats, since OoO and Frasse are the only two current games that use those formats (I think). Breaking OoO is a big no-no, but I am open to making a new version of Frasse if there are enough things to gain to make it worth it. (I actually already have plans to replace some of the music as part of a special edition to celebrate SLUDGE 2.0.)
Logged

"Programming is the computer game that makes all others possible." - Ron Newcomb
BigMc
SLUDGE Linux/GTK+ Maintainer
Sr. Member
****
Offline Offline

Posts: 266



« Reply #4 on: February 02, 2010, 04:29:26 PM »

I have tested all the five games I know and except Frasse I haven't found any issues. Even the punching sound in OoO works (first it also crashed, but i sent the sound to the author of alure and he fixed it).
Logged
ad7venture
Longtime Member
*****
Offline Offline

Gender: Male
Posts: 3127



WWW
« Reply #5 on: February 02, 2010, 05:43:00 PM »

Sounds good, especially being able to do a build for linux disto's.  Off topic slightly, but it would be a nice extra forum that was a list of finished games done with Sludge so people could take a look at what the engine does that are perhaps interested in using it.  Although I consider the older engine to be pretty limiting graphically after using it somewhat.  I don't quite understand using a format like tga and then not using the built in alpha channel.  Having a linux distro might give me the courage to put a dual boot back on my computer, but I'm just afraid of messing it up again.  Hopefully an ubuntu distro. 
« Last Edit: February 02, 2010, 05:50:15 PM by ad7venture » Logged
BigMc
SLUDGE Linux/GTK+ Maintainer
Sr. Member
****
Offline Offline

Posts: 266



« Reply #6 on: February 02, 2010, 05:46:40 PM »

Sounds good, especially being able to do a build for linux disto's.  Off topic slightly, but it would be a nice extra forum that was a list of finished games done with Sludge so people could take a look at what the engine does that are perhaps interested in using it. 

There is this site, which also has a link "Games made with this engine". Is that what you mean? It should be updated, though.
Logged
ad7venture
Longtime Member
*****
Offline Offline

Gender: Male
Posts: 3127



WWW
« Reply #7 on: February 02, 2010, 05:51:16 PM »

That's kind of embarrassing I didn't know about that.   Embarrassed
Logged
Trumgottist
Maker of SLUDGE
Longtime Member
*****
Offline Offline

Gender: Male
Posts: 1162



WWW
« Reply #8 on: February 02, 2010, 05:57:58 PM »

I don't quite understand using a format like tga and then not using the built in alpha channel. 
The reason for that is obvious: Having an alpha channel there would have made things both more complicated and slower (as it was all done in software). It was the change to use graphics hardware that made alpha channels practical to use.
Logged

"Programming is the computer game that makes all others possible." - Ron Newcomb
ad7venture
Longtime Member
*****
Offline Offline

Gender: Male
Posts: 3127



WWW
« Reply #9 on: February 02, 2010, 06:18:42 PM »

I've seen software renderers that use the gif alpha channel and it doesn't seem to limit speed.  Flash does.
Logged
Trumgottist
Maker of SLUDGE
Longtime Member
*****
Offline Offline

Gender: Male
Posts: 1162



WWW
« Reply #10 on: February 02, 2010, 06:22:41 PM »

Gif doesn't have an alpha channel.
Logged

"Programming is the computer game that makes all others possible." - Ron Newcomb
ad7venture
Longtime Member
*****
Offline Offline

Gender: Male
Posts: 3127



WWW
« Reply #11 on: February 02, 2010, 07:04:25 PM »

Looked it up because I've seen it, but it's a 2 state alpha channel which would explain why it would be a lot simpler to use.
Logged
Erwin_Br
Administrator
Longtime Member
*****
Offline Offline

Gender: Male
Posts: 1667



WWW
« Reply #12 on: February 03, 2010, 11:11:59 AM »

TGA and alpha channels have been a pain in the ass for me as well. Can't really remember why, but I switched to PNG very fast. And now SLUDGE is supporting it at well, I say goodbye to TGA forever. Wink

I know I should update the site's engine information, by the way. I'm planning a major overhaul of the entire site however, so I'm going to bundle this task with it.
Logged

"You know you've achieved perfection in design, not when you have nothing more to add, but when you have nothing more to take away." --A. de Saint-Exupery
ad7venture
Longtime Member
*****
Offline Offline

Gender: Male
Posts: 3127



WWW
« Reply #13 on: February 03, 2010, 11:33:56 AM »

Yeah, png is really great.  I like jpeg for the compression sometimes.  Those two are about all I use.
Logged
Trumgottist
Maker of SLUDGE
Longtime Member
*****
Offline Offline

Gender: Male
Posts: 1162



WWW
« Reply #14 on: February 03, 2010, 03:38:43 PM »

And to get back on topic… (If you want to keep discussing graphics, I suggest you start a new thread for that.)

Hm. This OpenAL thing is complicated. It's a good thing you've already implemented it, tested it and noted that it works fine, or I might have given up now and stuck with BASS.

Apparently end users (i.e. the players of the games) have to install OpenAL on Windows. That's not so great. Creative's installer can be integrated in the game's installer and run silently by it, but it's an additional step required by each game author (and it requires that the game use an installer program).

And after I install the OpenAL SDK and Alure on Windows, I still can't get it to build. ("alureStopSource was not declared in this scope") I should clearly leave this until when I have a bit more time. (I have already spent more time on this today than I should have.)

But OpenAL is included in Mac OS X, starting with Tiger. That's good. And Apple say that "OpenAL [is] the preferred method for developing game audio on Mac OS X." Even better. Alure is however not straightforward to use on Mac (there is a Windows package available, but nothing Mac specific) and as I don't have much time right now, so I haven't been able to test it yet. But that's just a problem for me (and other people who would be interested in compiling SLUDGE), and not for end users, so that's a very small obstacle and not something to hold against it.

I'll try to get time this weekend to get it running on Mac and Windows, and then we can make a decision on what to do with audio in SLUDGE.
Logged

"Programming is the computer game that makes all others possible." - Ron Newcomb
Pages: [1] 2 3 ... 5
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.8 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
 
Unauthorised reproduction of anything on this website is not allowed without our written consent.
Materials on this site are the property of their respective owners. Copyright © Adventure Developers. All rights reserved.