2019-04-01 21:45:30 (edited by keithwipf1 2019-04-02 20:51:46)

I was messing around on the internet, and I looked up the obvious in Google.
How to make audiogames in Python.
It was probably a silly thing to look for since I had some things anyway, but I found this on git hub.

https://frastlin.github.io/PyAudioGame/

Edit: It's a set of tools or an engine for making audio games in Python.
You can even install this with pip 'pip install pyaudiogame', but first install pywin32 and pygame.
I tested the hello world app in the tutorial and it worked.
Maybe this helps someone.

2019-04-02 17:40:52

that sounds quite interesting.

Lamas with hats, but with sponge bob as carl Stay tuned.

https://www.youtube.com/channel/UCvAUQt … subscriber

2019-04-02 17:57:25

Yeah, it says it has a mixer, it can use NVDA or TTS and it supports keyboard input.
There was other stuff too.

2019-04-03 13:39:09

So it basically just wraps pygame and some other third party products yet, which is quite nice, but it doesn't amaze me yet. It can be a nice start however and if the documentation and tutorial becomes a bit more comprehensive and more modules and interfaces get added, it might become really usable.
Best Regards.
Hijacker

2019-04-03 16:48:40

I wonder if the developer is still around.
Maybe he might add things if he knew what else it needed for games.

2019-04-03 19:46:38

He is not around. It hasn't been updated in some time now

If you like what I do, Feel free to check me out on GitHub, or follow me on Twitter

2019-04-03 20:44:43

I took a quick look at this and here are my thoughts:
1: What else does the game engine provide? I mean, what would persuade me to use it instead of directly using pygame?
2: Did you know? Some tutorials do not work!
3: What exactly does it provide? There is no clear documentation which lists features available to the engine.

2019-04-04 21:45:17

A newbie would probably use it because it is obviously built more for making audio games then Pygame is.
They probably don't want to go through all the display functions, trying to figure out which vague function will show them a window. You could always look it up on Google but it's easier not to.

I wonder which tutorial doesn't work?  I didn't try many of them.

You can probably find some extra features by going through the source, which seems commented.
I didn't look at that much, either.

2019-04-07 00:46:29

looks like it only supports python 2. poop.

2019-04-07 04:07:08

@8, Pygame is not very hard to use. There is no "complicated, hard-to-find display functions". There are tutorials and other documentation on it that this engine does not have.

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.
My Github

2019-04-08 16:41:48

@8
This does support Python 3.
I think it just comes with python 2.
@9
You are right on that, but if I was too lazy I would just look through the API documentation.

2019-04-16 20:26:04

pyaudiogame is similar to create-react-app for audio games in python and is not even an engine, but more of a library of scripts that I wrote to help develop games. If you know anything about pygame, then this library will just be boilerplate.
Originally, the project was meant to be a very good library for building audio games, but I felt as if my coding experience was not good enough at that point to really make it work.
I have recently updated many of the modules to be more robust, but I would still consider the set of scripts to be in alpha. The code is pretty well commented, but I haven't had the time to rewrite the documentation and API to show the new grid and audio system.
The cool things are that this system has a grid module that allows you to make maps like in Tactical battle and Super Egg Hunt in almost no code, and there is basic 3D audio support using only pygame's mixer module.
So at this moment, I would say to look at this as a set of scripts that you can plug and play into your projects.
I'm using it in a project of mine, so have been making updates to it and will keep making updates to it as I build new helper scripts for my projects. There is an email list and the github, so if you have questions or pull requests, I'll look at them, but my time is very limited, so I don't know how responsive I'll be.

2019-04-16 20:32:04

I did join the mailing list, though it seems to be empty.
By the way, the sound modules support pan, right?
I guess so but I didn't see any pan things in Pygame.mixer last time I was in the docs.

2019-04-16 21:52:10

The pyaudiogame mixer module had an overhaul in December. pygame supports pan through the volume method where the first argument is the left channel and the second argument is the right channel. That pans. Pyaudiogame has a listener object that can move around the map and the sound objects can be positioned in space to sound around the listener object.

pyaudiogame.mixer.set_listener(x=1,y=1, o=90)


If you are looking for something like a side-scroller, you can just use the X coordinate and you'll have all the panning taken care of.

To set a sound's position, you can either pass the starting pos in when you make the sound or set the pos after the sound is created:

sound1 = pyaudiogame.mixer.Sound("my_sound.ogg", position=(5, 1))

Then if you want the sound to move 1 square to the left, or down on the x coordinate, do:

sound1.move_pos(x=-1)

Then to set the pos back to it's starting position, do:

sound1.set_pos(x=5, y=1)

Hope this helps.

2019-04-17 03:24:20

hello
I would say nvgt; because that's what mason uses and it's deesint

my new youtube channel. click subscribe if you like my stuff
https://www.youtube.com/channel/UCzL-l8 … YCkjOm3FIg

2019-04-17 08:18:31

I don't think NVG is accessible to everyone yet, just wait until it's released. It sounds like it will do what you want, though.

ReferenceError: Signature is not defined.

2019-04-17 09:13:20

right now NVG is closed source with no plans to release it.

Much less active on this forum than in the past.

Check out my live streams: http://lerven.me
follow me on Twitter: http://twitter.com/liamerven

2019-04-17 09:23:59

o ok, thanks for shairing the news

my new youtube channel. click subscribe if you like my stuff
https://www.youtube.com/channel/UCzL-l8 … YCkjOm3FIg

2019-04-17 17:26:04

Good news for this project:
pyodide
was just announced and this means python is coming to the web very very soon. You can actually use python for basic stuff already, similar to Brython, but pygame has an open issue, and once that is implemented, this library will be in the browser.
Although to be frank, there is no reason to use pygame if the browser APIs are available, as the web audio API is incredible, aria live regions work with all modern screen readers, and the web speech API is really easy to use. Other than that, the only major thing that you need is a main loop and everything works perfectly for audio games.
As Liam has pointed out to me though on other occasions, developing in the browser means that any client-side code is free for any person to modify or copy, so games like cyclepath could only be donation based projects or patrion, because it's extremely easy to copy new code and give it away for free. Runescape charges people to access new content from the server, and this allows them to charge subscriptions, but bots spam that place like you never believe.
Regardless, personally all my development, unless I'm working on an older project, will be in the browser, and as Piodide gets better, I will probably be moving this library to the browser, as I am 10 times more productive in python than I am in Javascript, just because of the language.

2019-04-17 18:11:22

The other problem to using programs in the browser is that you are limited by the browsers functionality. If the browser doesn't support a particular technology, too bad. (As a side note, Rust can create web assembly files letting you deploy your programs to the web, and this is native, right baked into the compiler as a component. Fucking badass!)

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.
My Github

2019-04-18 05:23:46

wow

my new youtube channel. click subscribe if you like my stuff
https://www.youtube.com/channel/UCzL-l8 … YCkjOm3FIg

2019-04-18 15:39:54

Well, I've poked into web audio and stuff... gotta say I'm one hell of an impressed person right now. I also enjoy how you can get instant feedback.

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.
My Github

2019-04-18 19:01:00

Rust was just labeled as the most loved language for 4 years in a row by Stackoverflow, so I really want to try it out and see if I like it better than python.
Since it can be compiled to web assembly by default, I really really want to try it now.
The browser has more funding behind it than any other system out there and is gaining functionality at a prestigious rate. You can do just about anything in the browser currently, including full VR and AR experiences, IoT applications, connection to console controllers, touchscreen support, an audio API that is one of the best I have ever seen, an amazing web speech API, an amazing UI widget library (through HTML and Aria), full keyboard and mouse support, completely cross-platform, extremely easy to connect to a server, long-term storage, off-line support, works with every screen reader, is inexpensive, and the biggest tech companies in the world (Facebook, Google, Amazon, Netflix, Microsoft, Apple...) are investing trillions into their browser and web-based technologies.
There is still a small place for native applications, but with React Native, or Electron, it's hard to say what is a native or web-based application anymore.

2019-04-18 19:53:49

web audio is great, it does have some issues, like I have seen no way to actually stream audio (i.e. you have to load the whole sound into memory before it can be played, which is not so optimal for audio games, but it works for the games I want to make.

ReferenceError: Signature is not defined.

2019-04-25 17:04:48

By the way, can someone please please! Show me how to play a sound in Pygame.
I tried importing pygame, initializing it, creating a sound object from pygame.mixer.Sound with a string filename of my sound, then I called sound.play(), and nothing happened.
These sounds even play in sound_lib, and in the shell too, so I have no idea what the problem is.
Thanks.