Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 23 additions & 8 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,32 @@
#Alpha, with Sarah Lasonia's edits! RasPi FTW!
#2012

#test

import pygame, random, time, player_info, moveable_dude
import pygame, random, time, player_info, moveable_dude, os # They forgot os -.-
from pygame.locals import *
from random import randint

randnum = randint(2,3) # 1 to 4, code is inclusive

pygame.init()

if randnum == 1: # Sarah added randomised titles.
rand = "Oh no, not the Aliens!"

if randnum == 2: # Sarah added randomised titles.
rand = "Spaaaccceee!"

if randnum == 3: # Sarah added randomised titles.
rand = "Developed by the RasPi Community!"

if randnum == 4: # Sarah added randomised titles.
rand = "Cheeseburgers are tasty."

screen = pygame.display.set_mode((640,480), 0)
screensize = screen.get_size()
center = [320,240]
centership = [288,226]
pygame.display.set_caption("Raspithon Game")
pygame.display.set_caption("Raspithon Game | A collaborative Project | " + rand) # Sarah added randomised titles.
pygame.mouse.set_visible(False) # We don't want the mouse to block the way.

font = pygame.font.Font(None, 32)

Expand All @@ -33,7 +49,6 @@
pygame.mixer.init()
# pygame.mixer.music.play(-1) As requested until we finish


#Display the ship
player = player_info.Player(screen)
alien = player_info.Alien(screen, clock)
Expand Down Expand Up @@ -74,14 +89,14 @@

#On keypress
keystate = pygame.key.get_pressed()
if keystate[pygame.K_RIGHT]:
if keystate[pygame.K_RIGHT]: # Key right
player.turnRight()
if keystate[pygame.K_LEFT]:
if keystate[pygame.K_LEFT]: # Key Left
player.turnLeft()
if keystate[pygame.K_F12]:
moveable_dude.initialiseDudes(900)
if keystate[pygame.K_q]:
pygame.quit()




Binary file modified player_info.pyc
Binary file not shown.