I'm fairly new to python and I'm reading a book about creating games with pygame. I came across this piece of code in the book. I don't understand why Sprite.__init__(self)
is necessary. I have run the code with this commented out and it runs the same way.
class Creep(Sprite):
def __init__(
self, screen, img_filename, init_position,
init_direction, speed)
Sprite.__init__(self)
self.screen = screen
self.speed = speed
self.base_image = pygame.image.load(img_filename).convert_alpha()
self.image = self.base_image
Anybody have any idea why this is there and why people call init?