2015-09-09 02:46:09

Hi folks,

Some of you might know me as one of the guys behind Accessible Apps, the company which brings you Chicken Nugget, the most powerful and popular Twitter client for Windows, as well as other awesome software.

Today I'm writing to introduce you to one of the things I have been working on for a bit, an audio single-player fps engine.

Some of the features that I've got working so far:
Full HRTF-enabled multidimensional audio, made possible by the powerful Libaudioverse library.
Integration with an off-the-shelf physics engine for a realistic environment incorporating destructable objects and other complex physical behaviors. Think of grenades being able to bounce off walls and similar.
Automatic map generation from a simple declarative language. In particular I'm using YAML, an easy language for describing data structures and relationships for creating templates which I feed into my map generator, which then produces full levels.
Multiple input methods: Currently both keyboard and mouse are supported. I feel that the mouse has been demonstrated as a very useful input device for audio games.
Audio occlusion: Physical items in the game world, including walls, dampen audio but do not necessarily completely cut it off. This means you can hear stuff in other rooms, and when you approach an open exit, the sounds become more noticeable. This is also true if, for instance, an npc is behind a piece of equipment or shelving.
Room-dependent reverb: Again relying on the powerful Libaudioverse library, different rooms will have different reverberation characteristics. Small rooms sound small, and the inverse is also true.

I have created a minimal playable level to showcase what I've got so far, and to solicit feedback. I'm extremely interested in what the community has to say, and would like to involve you all in the process as I create something marketable.

Currently the demo runs on Windows. You can find it at: https://q-continuum.net/shooter.zip

I'm certain that you will find issues. Heck, it might not even run at first on your system. I was previously trying to use convolutional impulse responses for the reverb, and that did not run on several peoples' computers. I believe the new computational reverb will work better, but I have also heard reports of random freezing and crashing depending on display drivers and other random things. I've done my best, but let me know what issues you come across.

Notes on development:

As I mentioned, a lot of this is made possible by Camlorn's powerful Libaudioverse library (which I would link to, but the forum is telling me I may only have 1 link in this post.) He's built something quite amazing there, so you should probably check it out. I'll post subsequently with the URL.

This engine, like all of the other apps from Accessible Apps is written in Python.
I often see questions about what language to learn, or if Python is the right language on this forum, and always restrain myself from jumping in as a Python fanboy when I see people start suggesting BGT or other similarly hobbled languages. I do feel it worth noting that this is just under 2000 lines of code written in under two months with other projects taking a majority of my time, and most of this is a direct result of both Python's expressiveness and immense and thriving ecosystem.

I chose YML to represent input to the map generator because it fit my mental model and procedural map generation fits well into the single developer trying to build a large complex game situation I find myself in. But I am extremely interested in working on infrastructure for nonrandom maps which could really highlight the power of the environmental audio engine with familiar environments, for instance a supermarket or gymnasium. This will require further development.

There's a lot of quick and dirty prototype stuff in the game. For instance the escape key pauses the world, useful for debugging, but there's no unpausing. escape twice exits. The inventory screen is very minimalist and only lets you equip things. Lots of small polish issues.

I look forward to your feedback. It's time to revolutionize audiogaming.

2015-09-09 02:49:03

Here's that link to Libaudioverse on GitHub

2015-09-09 02:59:10

I'd love to see something come of this.  Nicely done Crhis.

2015-09-09 03:06:43

Hi Ctoth and welcome to the forum!
This is great I will try and test it out today or tomorrow. From what you described it sounds very promising.
Don't worry after you have about 5 or 10 posts on this forum you will be able to post multiple links.
Btw, how is camlorn? I haven't talked to him since he was driven off this forum.
Didn't you also make accessible output 2? Or is that somebody else.

Guitarman.
What has been created in the laws of nature holds true in the laws of magic as well. Where there is light, there is darkness,  and where there is life, there is also death.
Aerodyne: first of the wizard order

2015-09-09 03:20:45 (edited by Kyleman123 2015-09-09 03:21:15)

getting an error here win 7 64 bit  run from an external if that makes any difference.
Traceback (most recent call last):
  File "main.pyw", line 11, in <module>
  File "sound.pyc", line 7, in <module>
  File "libaudioverse\__init__.pyc", line 305, in initialize
  File "libaudioverse\_lav.pyc", line 57, in initialize
WindowsError: exception: access violation writing 0x0005002A

I don’t believe in fighting unnecessarily.  But if something is worth fighting for, then its always a fight worth winning.
check me out on Twitter and on GitHub

2015-09-09 05:04:37

hmm, nice. not bad at all. It actually worked on my system without any notable issues. I hope camlorn records some sort of demo like he did with camlorn_audio, as that was fascinating.

If you have issues with Scramble, please contact support at the link below. I check here at least once a day, so this is the best avenue for submitting your issues and bug reports.
https://stevend.net/scramble/support

2015-09-09 05:14:20

Oh cool I don't know how I missed that where can I get that demo?

Guitarman.
What has been created in the laws of nature holds true in the laws of magic as well. Where there is light, there is darkness,  and where there is life, there is also death.
Aerodyne: first of the wizard order

2015-09-09 14:56:27

oh, well it would seem that it has been deleted from his blog. But I'll post up a temporary Dropbox link in an hour or so when I get to school, because it is stored on my school computer. But I'm serious that thing is so freaking cool that I'm still fascinated with it even though I downloaded it a year ago. Best 3d sound I've ever heard that wasn't actual reality. Literally you can tell! When objects are behind and in front, above  in below; I even flinched the first time I listened to it because it sounded like the song being played was truly about to hit me in the face. I'll definitely post that link for you

If you have issues with Scramble, please contact support at the link below. I check here at least once a day, so this is the best avenue for submitting your issues and bug reports.
https://stevend.net/scramble/support

2015-09-09 15:40:11 (edited by The Dwarfer 2015-09-09 15:41:02)

Hi all,
https://dl.dropboxusercontent.com/u/492 … o_demo.ogg
If it doesn't work when you click then it's still uploading. Let me know when I'm ok to remove it.

It really shouldn't take too long. If libaudioverse is anything like the demo I heard, then Audio Games will definitely become revolutionary soon.

If you have issues with Scramble, please contact support at the link below. I check here at least once a day, so this is the best avenue for submitting your issues and bug reports.
https://stevend.net/scramble/support

2015-09-09 17:29:51

That demo is still up, here.
I haven't made another one because Libaudioverse is substantially the same, though less tinny in real-world configurations.  The difference with Libaudioverse is primarily performance, stability, and a much more sane API.  I think OpenALSoft has better vertical, but I'm not able to look at or use his algorithms: doing so would make Libaudioverse permanently GPL and strip me of my ability to offer commercial licenses.  I've about matched the reverb quality, and I support (and have the potential to support) a bunch of other stuff related to synthesis, i.e. instrument design.  Keep in mind that this is a pre-release Libaudioverse, we're still at least weeks away from me declaring 0.8.
And to answer the other question I've been getting: Libaudioverse is the only piece of this that doesn't run on Mac and Linux to my knowledge, but it will in the future.  Not the immediate future, though.

My Blog
Twitter: @ajhicks1992

2015-09-09 20:06:25

Hi camlorn,
Thanks for posting it. I just didn't see the blog post with the demo.

If you have issues with Scramble, please contact support at the link below. I check here at least once a day, so this is the best avenue for submitting your issues and bug reports.
https://stevend.net/scramble/support

2015-09-09 21:58:37

There isn't one anymore.  It's on the project page for Camlorn_audio.  As I recall, the old post was lost in my migration from one VPS provider to another after the first managed to lose all the data for all their customers, but it might still be floating around...somewhere.

My Blog
Twitter: @ajhicks1992

2015-09-10 04:40:53 (edited by nyanchan 2015-09-10 04:57:47)

I think the audio processing is grate, but it might not be fast enough to use in the actual game, especially if you want this to be a shooter engine. I have experienced crackling noises while rotating myself in the area where multiple objects are placed.
Audio card: Realtec HD audio
Windows 7 Home Premium Edition, 64bit
CPU Intel(R) Core(TM) i5-2450M CPU @ 2.50GHz
4GB ram
By the way, will this be released as a set of DLL's or exclusively for python?

I don't speak as good as I write, and I don't listen as good as I speak.

2015-09-10 05:45:18

Wow, I would like to take a look at the sourcecode for this! big_smile
I am not 100% sure how the scripting language works, but it looks pretty clear from just glancing through it.

The turning with the keyboard is a little too quick though, I have a little problem figuring out where I'm facing.

Just wondering, why use YAML rather than python? Is it because it is safer? I didn't know that there was a pre-built parser for a declarative language like that, it's pretty cool!

Also, why not create a single .exe file rather than lay all the .pyd files out there? I know accessible_output2 and libaudioverse along with sounds and the map files need to be outside the .exe, but that should be it.
Awesome work!

2015-09-10 06:02:42

Can you post how much CPU task manager says the game is taking?  If it says 0, hit F5.  This will tell us if the crackling is an audio backend problem or a performance problem.  Our CPUs are similar and I can run the game without a problem myself, so this extra piece of information would be helpful.
Performance of Libaudioverse is already pretty close to as good as it can get, everything from here out is cutting corners in audio quality, i.e. turning off Hrtf for some things.  I've already pushed it pretty much as far as it can go without a drop in quality, but there are some rather high limits on the number of math operations required that you can't get below no matter how much you try.  I'm probably going to be able to squeeze a bit more out, but not much.
Is anyone else getting crackling and, if so, can you post the same info?
Libaudioverse is a C API plus a custom bindings generation toolchain.  I will be rolling out bindings for lots of languages post 0.8.  Of interest to this community, however, is that I can't do BGT.  Proper Libaudioverse bindings require the ability to call into your language from C and the existence of support for threads and threading primitives.  The actual stuff going on under the hood in the Python bindings in order to make them easy to use is actually quite extensive, verging on black magic.  You simply can't do it without these things.  If BGT has gotten these things, then let me know and it will be back on the table, all be it with somewhat low priority.

My Blog
Twitter: @ajhicks1992

2015-09-10 06:11:53

And, since I can answer more questions that were posted while I'm posting:
Yaml is a data format, not a full language.  It acts as a serialization format that happens to be human-editable, like json or xml but more convenient.  Q and I both use it because it's more convenient than typing everything out as Python syntax and because you can save in that format, too.
.pyd files are actually C Python extension dlls with the extension changed to indicate this fact.  To my knowledge, they have to be outside the executable and in the same directory as the executable for Python to find them.  There might be some sort of hackish way to get them into the exe, but why bother?
You get to take any gameplay questions up with Q, I'm only here because this pertains to Libaudioverse directly and I need to monitor for horrible breakage, given that this is the first full piece of software to reach even a somewhat wide audience.  If there is not horrible breakage in Libaudioverse somewhere, then I simply haven't waited long enough yet (or this game doesn't use it yet, I suppose that's possible too).

My Blog
Twitter: @ajhicks1992

2015-09-10 06:38:23

Everything works great on my end with libaudioverse!
I can totally hear the room ambiance change and the footsteps and other sounds sound great. There are no sounds for hitting walls and no sounds exiting screens or moving between menus, so I can't really put it through its paces.
The behind is awesome, but sometimes what will happen is when I walk past an item it will jump behind me. It maybe because my square is really big, but it is really difficult for me to center on the objects when they are close. I can do it when there is the beeping with the t key, but the electrical items are way more difficult.

for Game play:
I keep having problems with pressing a turn and a walk key at the same time or the shoot key and the walk key at the same time. One will stop and I will need to repress the key.
I get lost really easy, probably because I can't tell what direction I'm going and when I hit a wall right away.

2015-09-10 07:22:06

Here is the result.
Maximum:33%
Around 25%
Part of the experiment: https://dl.dropboxusercontent.com/u/102 … rackle.mp3

Perhaps, drivers or audio software installed in my computer might be causing an extra lug since I have the same experience using DAW software. Also, NVDA uses around 18% CPU in my computer. So, the crackling might be happening for only my environment.

I don't speak as good as I write, and I don't listen as good as I speak.

2015-09-10 15:45:24

well camlorn, i kind of had horible brakage. any reason why that might be giving me that error. tried it on external and internal hd's as well as with both built in sound card and external usb logitech headphones. still geting some form of an access violation error. i get it on first run of the program. and running it as admin doesn't help. if anything its worse, because running as admin doesn't do anything.

I don’t believe in fighting unnecessarily.  But if something is worth fighting for, then its always a fight worth winning.
check me out on Twitter and on GitHub

2015-09-10 17:11:53

@yukionozawa
I don't know what's going on in your situation, it's somewhat odd.  I'd not expect the game to be taking an entire core, but I'm pretty sure it's not audio backend trouble.  The only thing I can think of that might be causing it is if your Ram has low bandwidth, as Libaudioverse very definitely doesn't fit entirely in the cache.  But I'm not sure that shows up as increased CPU usage.
@kyleman123
I can't figure out what's going on in your situation without more info.  The Python traceback is unhelpful, as the crash is happening in the C++ piece.  I've improved Libaudioverse's logging to try to catch it, but the current version of the game doesn't have that change in it at the moment.  Initialization involves something like 15 functions and 500 lines of code, it's the single largest code path that is exposed as one function.
Running from an external shouldn't have an impact on it, at least not at the stage of initialization.  I'm  betting it's crashing in audio backend initialization.  What is your OS?

My Blog
Twitter: @ajhicks1992

2015-09-10 17:28:15

said it in my first post win 7 64 bit.

I don’t believe in fighting unnecessarily.  But if something is worth fighting for, then its always a fight worth winning.
check me out on Twitter and on GitHub

2015-09-10 21:26:44

I am having the same problem as Kyleman123
I can't open the game on my windows computer

2015-09-10 22:24:16

Does it give the same traceback?

My Blog
Twitter: @ajhicks1992

2015-09-10 23:19:47

I tried to run the game the other night and ran into the same problem. Pretty sure the traceback was the same, except the access violation address was all zeros. I got it to run exactly once, but never again.

2015-09-11 04:23:01

I just gave it a whirl. I didn't get out of the first room but I think I smashed some electronics and killed a monster. Pretty cool. I didn't have any weird audio issues.