In this Mission Control, we learn how to build a game from the ground up in Python (which you already know!), with a focus on setting up the basic infrastructure of a game. This workshop will be interactive, so please bring your laptops, and try to get PyGame installed and working in your laptops before the session (Setting up PyGame can be a bit of a pain, but it is a one-time thing).
Presenter: Oh Shunhao (NUS Games Development Group)
Venue: SoC SR3
Time: 18:00-20:00
Date: 22 Jul 2015
PyGame Setup instructions
Windows: Python 2.7 – download binary here [http://www.pygame.org/download.shtml]
Python 3.4 – download binary here [http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame]
Mac: Follow instructions here [http://pygame.org/wiki/macintosh]
(From what I hear, it seems to be easier to setup for python 2.7. Also recommend installing brew first)
Unix: Haven’t really tried. Try looking here [http://www.pygame.org/download.shtml]
To verify that PyGame is working correctly, run this script in python:
[https://github.com/Ohohcakester/PyGameWorkshop/blob/master/testScript/test.py]
Same as below:
# If the test works, you should see a blue circle moving around the screen. import pygame pygame.init() screen = pygame.display.set_mode((480,360)) x = 0 y = 0 while True: x = (x + 10) % 480 y = (y + 10) % 360 pygame.event.get() screen.fill((0,0,0)) pygame.draw.circle(screen, (0, 127, 255), (x, y), 25) pygame.display.flip() pygame.time.delay(20)