frastlin / PyAudioGame

PyAudioGame is a python toolkit for making audio games in python
http://frastlin.github.io/PyAudioGame/
MIT License
5 stars 4 forks source link

Completed Documentation for PyAudioGame? #1

Open tbreitenfeldt opened 9 years ago

tbreitenfeldt commented 9 years ago

Hi, I have gone through the tutorials that are available for PyAudioGame, and it seemed that starting with lesson 7 in the basic tutorial is not complete. I was wondering when you were going to complete the tutorial? I just started learning python recently, and I have enjoyed learning how to build games a lot since I have always wanted to build jient audio games.

Sincerely,

TJ Breitenfeldt

frastlin commented 9 years ago

Hello TJ, I would suggest you start on Learn Python the Hard Way http://learnpythonthehardway.org/book/ You will find it teaches python in full and not in the subset that I was teaching in, so you can then go through and read the pyaudiogame advanced documentation and files to figure out what is going on. I am currently learning about different engines and figuring out how they all work and what really works the best. Then I plan on choosing a version of pyaudiogame that works the best and using that. You can download the branch on github called panda3d and try to figure out how the app module works, but panda3d is a little more complex than the pygame version, but it is way more powerful. I think panda3d is what I will end up using.

The engine you are using is really simple and probably won't work for really complex games, so that is why I stopped writing for it.

What you need to still learn is: classes, dictionaries and loops.

To give a really really quick overview:

create the dict

my_dict = {}

add an item to the dict

my_dict['item1'] = 42

add another item

my_dict['fred'] = 'oranges'

now get items from the dict

f = my_dict.get('fred')

z = my_dict.get('item1')

Now f is 'fred' and z is 42.

here is a class:

class Cat(object): def init(self, name): self.name = name self.age = 0

 def meow(self):
     spk("Meow")

 def set_age(self, age):
     self.age = age

frisky = Cat("frisky") midnight = Cat("midnight") frisky.set_age(2) midnight.set_age(5)

spk(frisky.age)

midnight.meow()

A class is a template for different cats. You can have as many different instances of Cat as you want. We have frisky and midnight above. self is a way to access the current cat's variables. self is like storage for the current cat. so you can add functions, lists, dicts, variables and instances of other classes inside self. different instances of Cat can not see each other.

Loops are pretty easy. There are only 2: while and for.

x = 0

while x < 10: x += 1 spk(x)

while loops can be dangerous so be careful. if you happen to get a loop that is never ending, press ctrl c to end it.

The for loop is better to use. It works like:

my_list = ['fred', 'joe', 10, 90]

for i in my_list: spk(i)

or do what we did in the while loop above:

x = 0

for blah in range(10): x += 1

spk(x)

for says that it is a for loop. blah is the variable we are going to refer to in the loop. in is always there. range(10) or my_list are the lists or something we can iterate over. In range blah will be numbers. in my_list blah will be the items in my_list.

There is one other type of for loop that is more complex, but is faster.

my_list = [i for i in range(10)] this will produce a list from 0-9. what you are basically doing is creating a list using a for loop. These are called list comprehensions.

These are the 3 concepts you need in order to create a pretty good game.

learn python the hard way explains them way better, but if you wanted to use pyaudiogame, you can just use these. thanks,

Brandon Keith Biggs http://www.brandonkeithbiggs.com/ On 8/7/2015 3:58 AM, breitenfeldt wrote:

Hi, I have gone through the tutorials that are available for PyAudioGame, and it seemed that starting with lesson 7 in the basic tutorial is not complete. I was wondering when you were going to complete the tutorial? I just started learning python recently, and I have enjoyed learning how to build games a lot since I have always wanted to build jient audio games.

Sincerely,

TJ Breitenfeldt

— Reply to this email directly or view it on GitHub https://github.com/frastlin/PyAudioGame/issues/1.

tbreitenfeldt commented 9 years ago

Thanks for the information and the resources. I might try Panda3d and see how well it works. I would assume that it is still running with Python? Also that it would work with my screen reader. Is Panda3d built to design audio games like pyaudiogame is?

I am actually taking a classs on python in the fall, I am just learning as much as I can now. Also, as I said, I have always wanted to build a game like swamp, but make it into a larger scale game like Skyrim or rune scape.

I have some experience with programming, but I am currently pursuing my bachelors degree in computer science.

TJ Breitenfeldt

On 8/6/15, Brandon notifications@github.com wrote:

Hello TJ, I would suggest you start on Learn Python the Hard Way http://learnpythonthehardway.org/book/ You will find it teaches python in full and not in the subset that I was teaching in, so you can then go through and read the pyaudiogame advanced documentation and files to figure out what is going on. I am currently learning about different engines and figuring out how they all work and what really works the best. Then I plan on choosing a version of pyaudiogame that works the best and using that. You can download the branch on github called panda3d and try to figure out how the app module works, but panda3d is a little more complex than the pygame version, but it is way more powerful. I think panda3d is what I will end up using.

The engine you are using is really simple and probably won't work for really complex games, so that is why I stopped writing for it.

What you need to still learn is: classes, dictionaries and loops.

To give a really really quick overview:

create the dict

my_dict = {}

add an item to the dict

my_dict['item1'] = 42

add another item

my_dict['fred'] = 'oranges'

now get items from the dict

f = my_dict.get('fred')

z = my_dict.get('item1')

Now f is 'fred' and z is 42.

here is a class:

class Cat(object): def init(self, name): self.name = name self.age = 0

 def meow(self):
     spk("Meow")

 def set_age(self, age):
     self.age = age

frisky = Cat("frisky") midnight = Cat("midnight") frisky.set_age(2) midnight.set_age(5)

spk(frisky.age)

midnight.meow()

A class is a template for different cats. You can have as many different instances of Cat as you want. We have frisky and midnight above. self is a way to access the current cat's variables. self is like storage for the current cat. so you can add functions, lists, dicts, variables and instances of other classes inside self. different instances of Cat can not see each other.

Loops are pretty easy. There are only 2: while and for.

x = 0

while x < 10: x += 1 spk(x)

while loops can be dangerous so be careful. if you happen to get a loop that is never ending, press ctrl c to end it.

The for loop is better to use. It works like:

my_list = ['fred', 'joe', 10, 90]

for i in my_list: spk(i)

or do what we did in the while loop above:

x = 0

for blah in range(10): x += 1

spk(x)

for says that it is a for loop. blah is the variable we are going to refer to in the loop. in is always there. range(10) or my_list are the lists or something we can iterate over. In range blah will be numbers. in my_list blah will be the items in my_list.

There is one other type of for loop that is more complex, but is faster.

my_list = [i for i in range(10)] this will produce a list from 0-9. what you are basically doing is creating a list using a for loop. These are called list comprehensions.

These are the 3 concepts you need in order to create a pretty good game.

learn python the hard way explains them way better, but if you wanted to use pyaudiogame, you can just use these. thanks,

Brandon Keith Biggs http://www.brandonkeithbiggs.com/ On 8/7/2015 3:58 AM, breitenfeldt wrote:

Hi, I have gone through the tutorials that are available for PyAudioGame, and it seemed that starting with lesson 7 in the basic tutorial is not complete. I was wondering when you were going to complete the tutorial? I just started learning python recently, and I have enjoyed learning how to build games a lot since I have always wanted to build jient audio games.

Sincerely,

TJ Breitenfeldt

— Reply to this email directly or view it on GitHub https://github.com/frastlin/PyAudioGame/issues/1.


Reply to this email directly or view it on GitHub: https://github.com/frastlin/PyAudioGame/issues/1#issuecomment-128575297

frastlin commented 9 years ago

Hello TJ, Panda3d is much more robust than pygame and it is written in both python and C++. You can use them almost interchangeably. In order to make something like Skyrim you will need all the programming and game design experience you can get! Panda3d could probably handle it, but you may wish to build your own engine for something that big. thanks,

Brandon Keith Biggs http://www.brandonkeithbiggs.com/ On 8/7/2015 8:56 PM, breitenfeldt wrote:

Thanks for the information and the resources. I might try Panda3d and see how well it works. I would assume that it is still running with Python? Also that it would work with my screen reader. Is Panda3d built to design audio games like pyaudiogame is?

I am actually taking a classs on python in the fall, I am just learning as much as I can now. Also, as I said, I have always wanted to build a game like swamp, but make it into a larger scale game like Skyrim or rune scape.

I have some experience with programming, but I am currently pursuing my bachelors degree in computer science.

TJ Breitenfeldt

On 8/6/15, Brandon notifications@github.com wrote:

Hello TJ, I would suggest you start on Learn Python the Hard Way http://learnpythonthehardway.org/book/ You will find it teaches python in full and not in the subset that I was teaching in, so you can then go through and read the pyaudiogame advanced documentation and files to figure out what is going on. I am currently learning about different engines and figuring out how they all work and what really works the best. Then I plan on choosing a version of pyaudiogame that works the best and using that. You can download the branch on github called panda3d and try to figure out how the app module works, but panda3d is a little more complex than the pygame version, but it is way more powerful. I think panda3d is what I will end up using.

The engine you are using is really simple and probably won't work for really complex games, so that is why I stopped writing for it.

What you need to still learn is: classes, dictionaries and loops.

To give a really really quick overview:

create the dict

my_dict = {}

add an item to the dict

my_dict['item1'] = 42

add another item

my_dict['fred'] = 'oranges'

now get items from the dict

f = my_dict.get('fred')

z = my_dict.get('item1')

Now f is 'fred' and z is 42.

here is a class:

class Cat(object): def init(self, name): self.name = name self.age = 0

def meow(self): spk("Meow")

def set_age(self, age): self.age = age

frisky = Cat("frisky") midnight = Cat("midnight") frisky.set_age(2) midnight.set_age(5)

spk(frisky.age)

midnight.meow()

A class is a template for different cats. You can have as many different instances of Cat as you want. We have frisky and midnight above. self is a way to access the current cat's variables. self is like storage for the current cat. so you can add functions, lists, dicts, variables and instances of other classes inside self. different instances of Cat can not see each other.

Loops are pretty easy. There are only 2: while and for.

x = 0

while x < 10: x += 1 spk(x)

while loops can be dangerous so be careful. if you happen to get a loop that is never ending, press ctrl c to end it.

The for loop is better to use. It works like:

my_list = ['fred', 'joe', 10, 90]

for i in my_list: spk(i)

or do what we did in the while loop above:

x = 0

for blah in range(10): x += 1

spk(x)

for says that it is a for loop. blah is the variable we are going to refer to in the loop. in is always there. range(10) or my_list are the lists or something we can iterate over. In range blah will be numbers. in my_list blah will be the items in my_list.

There is one other type of for loop that is more complex, but is faster.

my_list = [i for i in range(10)] this will produce a list from 0-9. what you are basically doing is creating a list using a for loop. These are called list comprehensions.

These are the 3 concepts you need in order to create a pretty good game.

learn python the hard way explains them way better, but if you wanted to use pyaudiogame, you can just use these. thanks,

Brandon Keith Biggs http://www.brandonkeithbiggs.com/ On 8/7/2015 3:58 AM, breitenfeldt wrote:

Hi, I have gone through the tutorials that are available for PyAudioGame, and it seemed that starting with lesson 7 in the basic tutorial is not complete. I was wondering when you were going to complete the tutorial? I just started learning python recently, and I have enjoyed learning how to build games a lot since I have always wanted to build jient audio games.

Sincerely,

TJ Breitenfeldt

— Reply to this email directly or view it on GitHub https://github.com/frastlin/PyAudioGame/issues/1.


Reply to this email directly or view it on GitHub: https://github.com/frastlin/PyAudioGame/issues/1#issuecomment-128575297

— Reply to this email directly or view it on GitHub https://github.com/frastlin/PyAudioGame/issues/1#issuecomment-128795101.