More actions
SDL 라이브러리를 이용해서 만든 게임개발용 Python 모듈. 사용하기 정말 쉽다. Python Interpreter 에서 한줄 한줄 입력하면서 공부할 수도 있다.
- PyGame 홈페이지: http://pygame.org
데기는 PyGame 을 이용해서 3D Viewing System 을 만든바 있다.
pygame.Surface 를 상속받은 새 클래스를 만들 수가 없다. 이상하게도 다음 코드가 Attribute 에러가 난다. 적절히 제약부분에 대해서 생각을 해야 할듯.
class Background(pygame.Surface):
def __init__(self, aSize):
pygame.Surface.__init__(self, aSize)
def clearSurface(self):
self.fill((0,0,0))
def createBlackScreen(aSize):
back = Background(aSize)
back.clearSurface() <-- 여기서 Attribute 에러
return back