2014-08-18 21:56:21

Well, heh.  I'm about to release a preview of it, possibly this evening; it is lacking in features and documentation an isn't yet alpha quality, but the examples and basic 3d stuff works.  Describing it properly is going to require a full manual or me finding someone who gets it and is better at technical writing: the concept is fine, if you get something from "directed acyclic graph of audio processors", but otherwise needs informative examples/tutorials.  It's honestly not that bad, and the Python examples I'm going to put up are pretty clean and informative.  I've just spent so long thinking about graphs that I can no longer think of things like Libaudioverse in any other context, making writing about them in a less mathematical way difficult.  It's incredibly easy to use, at least in my opinion, just hard to document without saying "here, have some sample code".  In a sentence, it's basically Pyo but fast enough to be useful in games and not necessarily GPL.  Commercial licenses will happen, as I've been careful to be the only coder.  I wish I were a lawyer because then I'd have copyright agreements and could get help from others.  I'm the only coder I know who knows DSP at all and would be interested so that's kinda a moot point anyway.
Django doesn't hide things, in that you can access most of HTTp.  What Django is doing is providing a framework to say "if the user asks for /blog/posts/june2014, then call the get_archive function" and "whatever the get_archive function returns needs to go out as HTML".  It's not quite that simple, in that you also use Django for web API creation (a whole second beast and I can't talk much about it for lack of experience).  What's going on with Django is that Django speaks HTTP on your behalf, ending the connection appropriately when the function returns and figuring out what to call.  It also gives you a *ton* of free web behavior, i.e. you've got a full and capable (and accessible, actually) database editor in about 5 minutes-just as soon as you define the models.  It also provides a lot of nice stuff for database access/management and rendering templates-but neither is specific to HTTP.  I don't believe Django uses Twisted or anything under the hood, but would need to read its actual code to check.  In Twisted/whatever, you'd have to implement the HTTP protocol yourself; alternatively, call out to a library that accepts incoming data and interprets it for you.
Asyncio is built into Python 3.  Python 2 versus Python 3 is a big topic, and I'm not going to judge you one way or another.  There is a backport to Python 2 called Trollius that you can install.  As far as I can tell, Asyncio gets the best of the Twisted world and the best of the Gevent world at the same time, plus a few nice things that neither of them offer.  If you go far down the online game creation world in the direction of Swamp, you'll be writing your own protocol, so arguments about supporting Obscure File Transfer V 1.0 are kinda out the window.  But yes, learning one of them is probably a pretty good idea.  My argument about things like Pod6net is that they are lacking maturity: lots of people have used Twisted and Gevent, and the people who developed Twisted and Gevent brought a huge amount of "how we went wrong" to the Asyncio table.  When you start talking about obscure packages like this, you can sometimes find that you're giving up  a lot of nice stuff-for example, tutorials on how to do complex things and other libraries that complement the main framework specifically.
Also, Wysiwyg tends to be pretty inaccessible in my experience.  Is this for browser games or actual MMO-style things?  If the latter, you're going to hit the roadblock of not having a trimesh editor,  I suspect.  But I'm curious to see.

My Blog
Twitter: @ajhicks1992

2014-08-18 22:31:10

I look forward to the panning feature!
I'm not sure what you mean about talking in graphs, but in a game like Swamp or even Paladin of the Sky, if you don't mention graphs, life becomes very complex... "If you place the object at 5 squares ahead and 2 to the left, when you play it it will sound in your left speaker, not quite full-volume. If you go to where the object is 2 squares to your left, the sound will play very loud in your left ear..."
LOL
And I don't really read the words as a piece of code can speak a thousand words...
Just say:
to place an object on your map:
libaudioverse.stereo.object.set(x=10, y=8)
will place an object in the array that runs each game loop and will trigger when objects are at libaudioverse.stereo.distance.set(squares=10) squares away.
Really any example will be fine though, if you say it is easy, I'll believe you LOL.


I still use python 2.7, but that is because it has the most things that work on it. But slowly, life is becoming OK in 3.X in regards to packages. What will libaudioverse be in? (Although I think for calls you don't run into any problems between the two).

Asyncio doesn't seem to have any documentation that is directly related to gaming, so I would have to translate everything to what I would need it for.
PodSix is used in Construct which I don't think is accessible at all.
(btw, why don't we have a pythonic game "what you hear is what you get" engine? I can think of several extremely high-end ones for sighted people that have their own audio engine, multiplayer support, graphics rendering, map builders, events assigned to objects and all kinds of things that make game creation super nice and easy. (The kind of easy that allows my sighted brother to produce one small game a month).

2014-08-18 22:45:37 (edited by stewie 2014-08-18 22:45:57)

A graph is a structure in mathematical and computer science generally. It's a structure of interconnected nodes typically and used to represent structures. It's used for pathfinding algorithms etc. I really am not the expert in this field though. I think he meant that due to the complexity of hrtf and the audio engine in general, it would be difficult to switch to an abstracted view of the library.

Deep in the human unconscious is a pervasive need for a logical universe that makes sense. But the real universe is always one step beyond logic.

2014-08-18 23:46:16

No, no, no.
Firstly, Libaudioverse is currently Python 2, but the binding generator I wrote for it means that I can target anything and there's no reason that it can't also be Python 3.  And by anything, I mean anything, at least so long as the FFI has a specific set of low-level primitives (sorry, but BGT is out.  You don't have pointers to pointers, you don't have callbacks, any capable programming language neutral library for anything needs both).
In much the same way that someone who knows calculus III probably would have trouble teaching basic Algebra, I know enough about Graphs and computer science that "directed acyclic dependency graph of audio processors" tells me everything I'd ever want to know about the audio library in question.  For this reason, I find it hard to bridge the gap between what I know and what a user who doesn't know what graphs are needs to know-save, of course, via giving you examples.  When I actually write  them out, they're quite simple-I just can't get English itself to do what I want as I keep ending up using too many computer science terms.  This is a problem with me as a writer, not Libaudioverse itself.
In this case, a graph is not what you think.  A graph is a construct consisting of nodes which are connected by edges.  The particular position of the nodes is not important-graphs often represent things that don't even exist in actual, physical space!  Graphs, as a computer science term, occur in all sorts of places.  For example, computers connected by networks (the nodes are the computers and the edges the wires running between them), roads (edges) and intersections (nodes), etc.  Most of the classical examples use train tracks, but you can also look at air ports and the planes that fly between them this way.  A linked list, tree, and most other similar data structures are special cases of graphs.
Someone did try to do the Wysiwyg engine for the blind, but failed.  This was Audiogame Maker back in the day, and it honestly fell very, very flat.  I'm not too sure why we've not seen another attempt.  I suspect that partially this is due to the fact that it failed so hard and partially to the fact that we honestly don't have many programmers of the required level of experience in this community.
You're not going to find too much that documents specifically for games.  It's assumed that you'll have some idea what you want or need by the time you're looking at low-level network programming.  The difficulty is not the connection; the difficulty is figuring out what you have to send.  The one good-looking thing I found was Panda3d's networking package for automatically keeping objects in sync; then it turned out that, when Disney released it, they only released the client portion.  The server is the hard part for that, and no one ever got a stable implementation going.  Only a grad student at CMU ever tried.

My Blog
Twitter: @ajhicks1992

2014-08-19 04:52:22

I can't wait for you to post libaudioverse up on the forum! LOL *refreshes the forum every 10 seconds*
So basically a graph is a list of linked data structures that are connected by something. Basically like a chain or maze.
I'm sure my first uses of libaudioverse will have enough comments to constitute a small tutorial lol (I tend to program in the summer and breaks and do nothing in between, so I end up forgetting everything and need to remember what I was doing when I stopped LOL).


I'll let you know what these higher level packages are like.


How hard would it be to create an engine that is wysiwyg? Also, what was that older engine programmed in? I think what turns people off of languages like BGT or scripting languages like that is the fact you can't do anything but make audio games with that knowledge.
Also, like you say, people who have the knowledge to create these awesome engines often have a hard time expressing their concepts to non programmers in a basic way. That is why python has kind of become popular as a way to make audio games for newbies. Learn python the hard way is a super awesome tutorial that is written for non programmers and gets people to a place to where when they see
from libaudioverse import sound

class S(sound):
    def __init__(self, right=5, left=5, sound_file=None):
        sound.__init__()
        self.right = right
        self.left = left
        self.sound_file = sound_file


they don't freak.
My brother uses an engine that uses python as the base language and the tutorial kind of expects that people have gone through something like learn python the hard way before reading it.


Although, I'm sure one could make an awesome engine that is a little technical, then make another version that is really restrictive for really newbie people.
Because I find that a lot of my time is spent creaBbting modules that cycle through lists and whatnot in different ways.

2014-08-19 15:52:26 (edited by camlorn 2014-08-19 18:40:54)

Yes, exactly.  Except that the lengths of the corridors and whether they turn is considered unimportant.  The only information you're interested in is that two intersections are connected by a corridor.  In the most basic setup, nothing else is kept.  And just that is enough to write a program that can solve the maze.  Going further, you can actually represent really strange things as graphs, for example an in-progress checkers game, but that's a whole second discussion about AI programming and I'm by no means an expert.  I really should post my 15-puzzle solver one of these days.
A Wysiwyg engine of sufficient complexity to actually do something at all has to have scripting.  The problem is that, for those of us who know how one might go about doing it, it's pointless to actually do it.  We can already make whatever we want without such things.  I kinda started down that road with audiogame_engine, at least as far as the basic windowing and state transition stuff, but that doesn't even have talking menus yet.  Nor will it be Wysiwyg-the point is to provide the smaller pieces that everyone duplicates themselves for everything, not to be a side-scroller or what have you.  These engines can't come in two versions, and that's why Audiogame Maker (written in flash, if I recall correctly) failed.  It tried to be so ridiculously nontechnical that actually doing anything complex was impossible.  I said this back when I was using it in early high school and barely handling 50-lline programs; I'd probably have much worse things to say now.
Since this is already spiraling way, way off topic and I can't actually make it much worse, I'm going to try to explain Libaudioverse a bit without using the word graph.  I get the feeling my comments were misunderstood to some extent.
Basically, it's like having boxes and wires.  You can hook the input side of any box to the output side of any other box with a wire.  Because we're using special magical sockets, you can hook as many inputs from as many different boxes as you like to the same output--this allows feeding  sources with the same file and controlling them all by controlling the playback time and speed of the file.  The 3d simulation mostly hides this, save that a source is an object with one input that needs to be hooked to something--this enables doing things like making wind synthesizers or piping midi messages into your game world.  But if you want, you can drop down and use the low-level pieces directly and make media players, for example.  One of the C examples, as of yet not ported to Python because of laziness, does exactly this.  A full command line media player in exactly 75 lines of C (don't you hate license comments, the 10-line macro that's needed because C doesn't have exceptions, and the includes?).  I keep managing to get distracted by the fact that school started this week, already missed the promised date for releasing the preview, and consequently kind of want to port it so that it's there in Python before I do anything.   It shows off every feature of Libaudioverse save array properties, which are only used in one place anyway (speaker maps for the n-channel amplitude pannere).

My Blog
Twitter: @ajhicks1992

2014-08-24 21:38:51

I mentioned poking this thread when I'd tagged my blog.  To that end, here's everything I've written so far about the problem of realtime online games.

My Blog
Twitter: @ajhicks1992