I'm an autistc girl trying to make games.
I first learned python and used pygame.
Then i made 2 example games i found on youtube: pong and snake
Both were made using classes.
I didn't know about pygame zero and I now want to use this.
But i'm having some problems to understand how i can uses classes with pygame zero.
Am i supposed to use actors inside my classes as member variables? And what about the draw and update function? How to use that in combination with my classes?
For exzmple the snake game had a snake and apple class which each have a draw function (for pygame) that called pygame draw functions
. Is it maybe possible to give an example of the game snake programmed in pygame zero with 2 classes 'snake' and 'apple' so I can see how to do this in combination with actors (and also the draw and update function)?
That would help me a lot! I don't find any example that's using classes.
I hope you understand me!
Ps: I also have sent an email so you can answer there maybe?
I used the email found on your website when clicking on your name.
Hi
I'm an autistc girl trying to make games. I first learned python and used pygame. Then i made 2 example games i found on youtube: pong and snake Both were made using classes.
I didn't know about pygame zero and I now want to use this. But i'm having some problems to understand how i can uses classes with pygame zero. Am i supposed to use actors inside my classes as member variables? And what about the draw and update function? How to use that in combination with my classes? For exzmple the snake game had a snake and apple class which each have a draw function (for pygame) that called pygame draw functions
. Is it maybe possible to give an example of the game snake programmed in pygame zero with 2 classes 'snake' and 'apple' so I can see how to do this in combination with actors (and also the draw and update function)? That would help me a lot! I don't find any example that's using classes.
I hope you understand me!
Ps: I also have sent an email so you can answer there maybe? I used the email found on your website when clicking on your name.
Thx Greetings from London, UK Jessica