2019-08-14 18:26:46 (edited by amerikranian 2019-08-14 18:28:04)

I'm sure a lot of you already noticed my awful posts in the article room. Still, for those of you who didn't, I have written down enough information to get you started when it comes to Python, game developing, speech libraries, menus, timers, sound, etc. I do not give a full on game development and language tutorials, mostly because I believe I don't have enough experience to do so, but I did link to books I used along my way. Let me know if you have any issues with the guides.
The first part can be found
Right here
My hope is that we can make the guides as helpful as we can and link anybody asking these types of questions to them so they can read through the text and learn on their own.

Coding is not hard. No, not at all.
What is hard is making code that accepts different and sometimes unexpected types of input and still works.
This is what truly takes a large amount of effort on a developer's part.

Thumbs up

2019-08-15 19:11:56

Hi, i love those guides. they helped me a lot. for example, i did not know how to fully make the menu. i got the array storing all the items added to the menu, but i did not know where to put the key presses, and i also did not know how to see what the options were that the users selected. but thanks to your guide, i got it all figured out. You did a verry great job with the explaining. thanks a lot for that you don't know how much i appreciated it. keep up the great work!

best regards
never give up on what ever you are doing.

2019-08-15 21:00:10

Yeah man. I wouldn't know half the stuff I do about python if it weren't for our conversations on TT and these guides. You sure did help a lot.

Use the below link to get about 500 or so mb of extra dropbox space when you create an account.
https://db.tt/dDngEzFLo7

2019-08-15 22:45:58

hey, I tried to follow your guide but couldn't get sound_lib working. I put sound.py into my game directory and then sound_lib folder as well, then my script has import sound. But then I get an error that says there is no module called pybass. I didn't do any modifications. The sound_lib/external folder does have the pybass.py file.

I like to sleep, Sleep is good,
This is how I do it: Lie on a nice warm cozy bed, and dream dreams about how to rule the world!
Follow @TheGreatAthlon5 on twitter for humorous facts and game updates!
If you like my posts, thumb me up!

2019-08-16 05:20:03 (edited by amerikranian 2019-08-16 05:33:04)

Posts two and three,  you’re welcome.
Post for. Try the following:
pip install pybass
If it still does not work or you just feel lazy, post the entire traceback.  I want to know where exactly doesn’t crash.

Coding is not hard. No, not at all.
What is hard is making code that accepts different and sometimes unexpected types of input and still works.
This is what truly takes a large amount of effort on a developer's part.

Thumbs up

2019-08-16 12:20:52

Collecting pybass
  ERROR: Could not find a version that satisfies the requirement pybass (from versions: none)
ERROR: No matching distribution found for pybass

Traceback (most recent call last):
  File "stuff.py", line 1, in <module>
    import sound
  File "C:\Users\sleep\Documents\python\sound.py", line 5, in <module>
    import sound_lib
  File "C:\Users\sleep\Documents\python\sound_lib\__init__.py", line 1, in <module>
    from . import external, effects, channel, listener, main, music, recording, stream, encoder, input, config
  File "C:\Users\sleep\Documents\python\sound_lib\encoder.py", line 1, in <module>
    from sound_lib.external import pybass, pybassenc
  File "C:\Users\sleep\Documents\python\sound_lib\external\pybassenc.py", line 6, in <module>
    import pybass
ModuleNotFoundError: No module named 'pybass'

I like to sleep, Sleep is good,
This is how I do it: Lie on a nice warm cozy bed, and dream dreams about how to rule the world!
Follow @TheGreatAthlon5 on twitter for humorous facts and game updates!
If you like my posts, thumb me up!

2019-08-16 14:55:29

Try this version of sound_lib. I think I fixed the bug when I first used it but I don't remember how I did it

Coding is not hard. No, not at all.
What is hard is making code that accepts different and sometimes unexpected types of input and still works.
This is what truly takes a large amount of effort on a developer's part.

Thumbs up

2019-08-16 14:58:24

Do you cover only game development?

Thumbs up

2019-08-16 15:22:00 (edited by keyIsFull 2019-08-16 15:59:32)

Thanks americranian that did solve the problem. Interestingly enough I had a similar problem when I was trying to use Masonason's Audio Game Kit, and it was trying to initialize the sound library. In the __init__.py file it had:

import sound
import sound_positioning
import sound3d

Now, there were files called sound.py, sound_positioning.py, and sound3d.py just like the import statements said, but it still gave that error. I wonder if this is some new change with python 3.7 or something? I just don't know. Or maybe the have  to be made into .pyc files?
Edit: It seems like if you want to import files from the same folder and they aren't like, the base  file you're running it from you have to use from . such like
from . import sound
and then it will at least get past that.
And yeah this masonasons audio game kit looks pretty neat. I can upload the zip file with all the code changes I had to make to an upload site of choice. It has examples and stuff too. He also built a rapper around the keyboard input which makes it a lot easier to use, so you don't have to poll for events yourself anymore, and he also has a libaudioverse wrapper though I am not sure how reliable that is. He's also got sound-lib wrapped in case you want to just use non-3d sound. All really nice stuff.

I like to sleep, Sleep is good,
This is how I do it: Lie on a nice warm cozy bed, and dream dreams about how to rule the world!
Follow @TheGreatAthlon5 on twitter for humorous facts and game updates!
If you like my posts, thumb me up!

2019-08-16 19:25:53 (edited by amerikranian 2019-08-16 20:26:04)

@8, yes. The guides are aimed at game development, though they're also good for getting started with the language. Why, what would you like to see instead?
@9, Good to know. I'll edit the guide to link to the sound lib above.
Where'd you find Masonasons game toolkit? This is the first time I'm hearing about it.

Coding is not hard. No, not at all.
What is hard is making code that accepts different and sometimes unexpected types of input and still works.
This is what truly takes a large amount of effort on a developer's part.

Thumbs up

2019-08-17 04:30:29

@10, nothing, just a question and that's it.

Thumbs up

2019-08-17 13:34:15

https://github.com/masonasons/AGK
requires a good bit of modification to actually get working, but it does work. I have yet to test out the 3d audio components though.

I like to sleep, Sleep is good,
This is how I do it: Lie on a nice warm cozy bed, and dream dreams about how to rule the world!
Follow @TheGreatAthlon5 on twitter for humorous facts and game updates!
If you like my posts, thumb me up!

2019-08-17 14:00:54

Heads up, that version of AGK requires python 2.7. If you want a version that works with python 3, go to
http://github.com/cartertemm
You'll find a mirror to agk3.

Use the below link to get about 500 or so mb of extra dropbox space when you create an account.
https://db.tt/dDngEzFLo7

2019-08-17 15:04:37

Ah, I knew about that one. Sorry about the confusion.

Coding is not hard. No, not at all.
What is hard is making code that accepts different and sometimes unexpected types of input and still works.
This is what truly takes a large amount of effort on a developer's part.

Thumbs up

2019-08-17 15:51:36 (edited by keyIsFull 2019-08-17 15:55:20)

Oh man, if only I'd known about that before! I made all the python 3 modifications myself, took about 3 hours of work for me. Oops. Well no worries. I also got the sound positioning in 2d functions to work with behind pitch decreases, but I guess he already fixed that himself too.
Edit: Turns out he did not. I might do some work on it myself and upload it eventually. I want to experiment with the eax effects available in bass, as well as the libaudioverse wrapper.

I like to sleep, Sleep is good,
This is how I do it: Lie on a nice warm cozy bed, and dream dreams about how to rule the world!
Follow @TheGreatAthlon5 on twitter for humorous facts and game updates!
If you like my posts, thumb me up!

2019-08-17 15:58:38

Hello.
I have a problem in python.
Basicly, when I launch my code, the windows showes for 1 second, and freezes and stops responding.
Here's the code:
import pygame,pygame.locals as pl
import timer
import sound
from sound_positioning import *
pygame.init()
screen=pygame.display.set_mode((400,200))
pygame.display.set_caption("test")
s=sound.sound()
t=timer.timer()
s.load("citybirds.ogg")
s.play_looped()
def main():
x=0
while 1:
  position_sound_1d(s,x,10,5,2)
  keyloop()
  pygame.time.wait(5)
def keyloop():
keylist=pygame.key.get_pressed()
if keylist[pl.K_SPACE]:
  x+=1
main()

follow me on twitter:
@lavandric04

Thumbs up

2019-08-17 17:04:07

@key, if you can make it work I for one would be interested. The last time I tryed to mess with AGK I ran into a hole bunch of strange issues I wasn't sure how to fix.

Use the below link to get about 500 or so mb of extra dropbox space when you create an account.
https://db.tt/dDngEzFLo7

Today 02:34:53

Post 15: sorry for the late response.  Check the keyboard section of my guide and compare it to yours and you’ll find your answer.

Coding is not hard. No, not at all.
What is hard is making code that accepts different and sometimes unexpected types of input and still works.
This is what truly takes a large amount of effort on a developer's part.

Thumbs up