Nov-07-2018, 12:41 AM
I am learning python with my son and struggling with something quite fundamental!
We are working through a python games programming for kids book and just want to chuck a few sprites on screen and move them about and check collisions etc.
I was hoping to find a library that allowed me to put a sprite on a background using some sort of xor type operation so I could easily delete it and leave the background in tact.
So I have tried using various methods but haven't found one that does this.
Compounding my frustration is I cannot seem to use Actor. In the book I am using it has all the code at the back and it just has the following:
from random import randint
apple = Actor("apple")
When I run it, it not surprisingly says:
NameError: name 'Actor' is not defined
If I add import actors at the beginning it seems to get further but I get an error:
ModuleNotFoundError: No module named 'actors.internal'
Now it may well be that Actor is not what I need for manipulating sprites but I'd like to know what I am missing. There is little on the Internet on this, it's almost as if it should just work!
Thsnks
We are working through a python games programming for kids book and just want to chuck a few sprites on screen and move them about and check collisions etc.
I was hoping to find a library that allowed me to put a sprite on a background using some sort of xor type operation so I could easily delete it and leave the background in tact.
So I have tried using various methods but haven't found one that does this.
Compounding my frustration is I cannot seem to use Actor. In the book I am using it has all the code at the back and it just has the following:
from random import randint
apple = Actor("apple")
When I run it, it not surprisingly says:
NameError: name 'Actor' is not defined
If I add import actors at the beginning it seems to get further but I get an error:
ModuleNotFoundError: No module named 'actors.internal'
Now it may well be that Actor is not what I need for manipulating sprites but I'd like to know what I am missing. There is little on the Internet on this, it's almost as if it should just work!
Thsnks