You can do this project either starting from either of:
You are going to make 1 small code change to your game. If you’d like to work with a friend, feel free.
Heart Click had a core pattern that looked like this:
Which in code, looked like this:
def main():
"""Main is the traditional name for the overall script function"""
clock = pygame.time.Clock()
screen = pygame.display.set_mode((640, 480))
pygame.mixer.init()
pygame.display.init()
state = setup_state(screen)
state['instructions'].play()
while True:
event = pygame.event.poll()
while not (event.type == pygame.NOEVENT):
state = check_user_input( state, event )
event = pygame.event.poll()
state = update_simulation( state, screen )
draw_game(state,screen)
clock.tick(60)
Note
The function above is from the Heart Click in Functions tutorial, if you’re curious how it works you can follow through that tutorial before starting this one.
What do you want to change about the game? Make it something small and simple, something you can describe in a couple of words:
When you’ve got your idea, add it to the Idea Board with your name.
What do you need to change?
We’ve only covered a tiny fraction of programming (and Python) so far, there are going to be lots of things you don’t know about yet. Yay!
>>> import pygame.font
>>> help(pygame.font)