2015-01-24 16:04:10

Hi,
Would anyone help me with 1. how to install box2d and 2. a full fledged audiogame in pyglet? I've got pybox2d installed, but i think I need to install box2d too...don't know how to do that

This is not a signature.

2015-01-24 16:38:19

I believe both of these are available through Pypi, which you access via pip.  You have it if you're using Python 2.7.9.  If you don't have Pip, then go read up on how to instal it because you want it anyway.  Once you have it, pip install packagename.
Pybox2d may not be available through that method, in which case you need to download it.  I do not know where; my physics library of choice is ODE, for now.
Pybox2d is a port of the C++ code to Python as I recall and, consequently, you shouldn't need anything else.  I cannot walk you through using it, I'm afraid; I use only Ode.  For what it's worth, Ode is more complicated in a lot of ways.

My Blog
Twitter: @ajhicks1992

2015-01-25 05:49:16 (edited by dhruv 2015-01-25 06:47:12)

Hi,
A few more questions:
1. Can I use ode with pyglet?
2. Are there any good tutorials for pyode?
3. Are there any good physics tutorial so I can start programming in games? I can't see so I don't know  where I should position objects, but some basic physics would be nice.
Thanks!

This is not a signature.

2015-01-25 18:35:03

The answer is yes.  You can use them together.  But you should be aware that you're asking if you can use your house with your car-they have no relation whatsoever.
I do not use Ode for physics because Ode is a 3D physics library and most audiogames need a 2d environment, usually involving tiles.  Pybox2d might be better if you're going to try physics simulation.  The killer feature of Ode is that you can use the Geoms without using the physics part.  This lets you apply velocities and stuff yourself in a "sane" way, but use Ode for fast collision detection of complicated scenes.  I do not believe Box2d can do this for you.
I learned  it by downloading and installing the Ode bindings from here, reading the C documentation, and using dir on the module to find the things I needed.  Ode is the kind of thing where a Python-specific tutorial isn't going to help you much-if you're a good enough programmer to make use of it, the C documentation is good enough (in all honesty, the C documentation for Ode is amazingly amazing, but I digress).  The hard part of Ode is not the API, it is understanding the concepts.  Spheres and boxes are easy, and don't need much but the constructor and setPosition for good use; other objects are harder and may involve transformation matrices depending on what you are trying to do.  The one notable feature of Ode and the reason you probably want it in the first place is raycasting, i.e. asking "does this ray hit anything?"  You can also do this without transformation matrices, as the ray object provides a function that takes the place of such manipulations.
The one thing you should never do in Ode is set the z axis to 0.  Doing this causes weirdness; to get around it, make all objects 1 unit high.
I can post a snippet, but it's part of an entity component system.  This means that it's very far from what you're used to.  It also handles multiple environments and a whole bunch of other stuff and is like 100 lines.  It's also a bit horrible at the moment, though I'm not sure there's a better way to write it.  I'm afraid I don't have a stand-alone example of using Ode, though some Googling can find you one in all likelihood.

My Blog
Twitter: @ajhicks1992

2015-01-27 12:56:47

Hi,
Can I simulate a 2d sound environment with pyglet? I don't think there is because it doesn't really allow positional coordinates for sound or anything of the sort. Sorry for my newbiesh questions, i'm just starting at this stuff.

This is not a signature.

2015-01-27 16:27:02

I have no idea, but probably.  If it has pan, then yes.  I'm using my own custom sound engine, etc.  The only thing you might want and might not have is pitch bending, but again I'm not using it for sound so can't comment.

My Blog
Twitter: @ajhicks1992

2015-01-27 21:04:25

Can you simulate a 2d environment with pan? I get a sidescroller, but i'm not sure how'd you represent something behind you with only pan.

This is not a signature.

2015-01-27 21:52:27

Nothing can simulate a 2d environment where something is behind you with something that's not pan, save for a very few games in BGT, Libaudioverse, OpebnALSoft, and some commercial packages.  It is what Swamp is doing, what Shades of Doom does now that Directx sucks beyond all telling for audio, etc.  It's not so much about can or should, it's more about not having much else in anything that you can use.

My Blog
Twitter: @ajhicks1992

2015-01-28 02:51:22 (edited by dhruv 2015-01-28 02:52:14)

Is libaudioverse near any sort of usage? I heard there was a alpha release released a while ago, and if it's shareware I probably couldn't get it.

This is not a signature.

2015-01-28 05:12:34 (edited by camlorn 2015-01-28 05:13:13)

Libaudioverse is GPL.  I have to work out the pricing model and legal stuff for commercial licenses still.  I did put out a preview release a long time ago, but literally rearranged half the guts internally and redid the external interface for something this past week.
In the interest of getting something usable out, I've basically dropped all the advanced stuff I want to do; in a sense it looks like the final product.  This particular rearrangement got rid of 2 or 3 major limitations and at least one inconvenience, mostly because I had a brainstorm moment and figured out how to do something I thought was computationally expensive in a way that costs basically nothing.
But the best ETA I can give is "when it's ready."  if life could stop getting in my way, we'd be down to weeks at most, but I'm in my final semester of undergrad right now.
Given the sheer amount of time something like this takes, it'd take some serious convincing to make me make it free for everyone, but I intend it to always be free for open source projects and possibly free for closed source but free projects.  My opinion on this latter point is that if you're going to be closed source and free, you've either got a reason that involves money and can consequently share some of it or are simply being stubborn.  My market is also definitively not just blind people.

My Blog
Twitter: @ajhicks1992