"Game Programming" Ch. 5 [wip]

Tags:

Entering these chapter notes is a huge chore, but I’m confident that it helps my understanding of and my retention to type them out. This chapter introduced drawing lines, rectangles, circles, arcs, fonts, and some other stuff…

main() Function

if __name__ == "__main__":
    main()
    pygame.quit()

Scope

My New IDE — PyScripter

Various Draw Functions

pygame.draw.line()

pygame.draw.rect()

pygame.draw.circle()

pygame.draw.arc()

pygame.draw.ellipse()

pygame.draw.lines()

pygame.draw.aaline()

Importing images

imageHandle = pygame.image.load("IMAGE.JPG")

[convert tip again (possibly import to IDE? put in project dir?)]

Exporting Surface objects as Images

pygame.image.save(Surface, "IMAGE.GIF")

Possible Formats

Text

Font object from System- or Custom- Font

Creating a Surface object with Text specified

Manipulating that Surface object

More Event IDs (Event Handling)

Line Drawing Exercise

[I cheated … but made cooler tool anyway.]

paint.py

[Won’t do.]