Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
126 commits
Select commit Hold shift + click to select a range
f5c367b
Sporksymbiote.
Mar 24, 2016
cb02414
Hahahahaha i have stolen all your spaghetti
SeanFoley123 Mar 24, 2016
043f15f
Such important Readme info
KaitlynKeil Mar 24, 2016
a965240
oaihegMerge branch 'master' of https://github.com/SeanFoley123/bug-fr…
SeanFoley123 Mar 24, 2016
502e9e6
This was fun!
SeanFoley123 Mar 25, 2016
9c7b7bd
Going to sleep. Here are some ideas of how we can implement what we w…
SeanFoley123 Mar 25, 2016
a206faf
Added a txt of useful sites
SeanFoley123 Mar 25, 2016
5d4dc2c
This may ruin my computer, backing up
SeanFoley123 Mar 25, 2016
7573c70
Okay done for now
SeanFoley123 Mar 25, 2016
546eb1b
Mmmm
SeanFoley123 Mar 26, 2016
70566b2
MMmmmmm
SeanFoley123 Mar 29, 2016
c953acf
Create Review1
SeanFoley123 Mar 29, 2016
f876709
Added some falling stuff
SeanFoley123 Mar 30, 2016
6dc0e16
Merge branch 'master' of https://github.com/SeanFoley123/bug-free-spork
SeanFoley123 Mar 30, 2016
4fa7b67
wooohoooo
SeanFoley123 Apr 1, 2016
54a12ad
Fred
SeanFoley123 Apr 1, 2016
368fb8f
Tried combining the jumper thing online with some of our code, got a …
KaitlynKeil Apr 2, 2016
ff19ebe
Adding death and water
KaitlynKeil Apr 4, 2016
7d26e14
Updated how it adds things
KaitlynKeil Apr 4, 2016
11695f4
Creating the reflection document-Guys, we gotta get this done
KaitlynKeil Apr 5, 2016
d66b454
Added a game over screen and also corruption
KaitlynKeil Apr 6, 2016
86ab833
Added to the synthesis section.
Apr 6, 2016
f875e88
Started a Spore class
KaitlynKeil Apr 6, 2016
0dc237b
dur
SeanFoley123 Apr 6, 2016
87eb0d7
oiahiegwoies
SeanFoley123 Apr 6, 2016
10d26cf
ouhewfoiharg
SeanFoley123 Apr 6, 2016
a88dbd4
Added a decomposition spore that you can shoot using space
KaitlynKeil Apr 6, 2016
faf5cdd
Added spores you can shoot and enemies that move and can be killed
KaitlynKeil Apr 6, 2016
ce7bfcf
Merge branch 'master' of https://github.com/SeanFoley123/bug-free-spork
KaitlynKeil Apr 6, 2016
a9fab0d
SO MUCH STUFF
KaitlynKeil Apr 7, 2016
fc90181
oihiaeteoiohiaewg;ooihiaegie;lilihae;liiheiie
SeanFoley123 Apr 7, 2016
28ace28
Merge branch 'master' of https://github.com/SeanFoley123/bug-free-spork
SeanFoley123 Apr 7, 2016
49f8df8
Made a LivingThings class
KaitlynKeil Apr 10, 2016
d241cce
Made things drop mushrooms when they die
KaitlynKeil Apr 10, 2016
8a36974
mmm
SeanFoley123 Apr 11, 2016
8092423
Merge branch 'master' of https://github.com/SeanFoley123/bug-free-spork
SeanFoley123 Apr 11, 2016
66726b8
Updated README.md
KaitlynKeil Apr 11, 2016
7c2ad31
Added a climb ability and switching between spore types
KaitlynKeil Apr 12, 2016
122bf4b
My code review file
KaitlynKeil Apr 14, 2016
1107dc5
Sean Foley Code Review
SeanFoley123 Apr 14, 2016
b5d429c
Merge branch 'master' of https://github.com/SeanFoley123/bug-free-spork
SeanFoley123 Apr 14, 2016
ff2a983
mushroom-view-controller
Apr 15, 2016
73107ba
Flipping implemented, but drowning does not resume when you flip back…
Apr 17, 2016
cdc8b05
Trying to make github work
KaitlynKeil Apr 17, 2016
a2599b6
Merge branch 'master' of https://github.com/SeanFoley123/bug-free-spork
KaitlynKeil Apr 17, 2016
21b4081
Changed the order of a couple things, added in some HUD elements
SeanFoley123 Apr 18, 2016
98b366c
Some more small changes. HUD works pretty well now.
SeanFoley123 Apr 18, 2016
7119a6f
Delicious
SeanFoley123 Apr 18, 2016
78b87c4
Updated floating and movement
KaitlynKeil Apr 19, 2016
5a7a013
Rawr
SeanFoley123 Apr 21, 2016
ebd3cda
Merge branch 'master' of https://github.com/SeanFoley123/bug-free-spork
SeanFoley123 Apr 21, 2016
41c2465
No more floaty ledges
KaitlynKeil Apr 21, 2016
46aebba
Merge branch 'master' of https://github.com/SeanFoley123/bug-free-spork
SeanFoley123 Apr 21, 2016
6fa4dc4
no more permanent spores
KaitlynKeil Apr 21, 2016
045f520
Merge branch 'master' of https://github.com/SeanFoley123/bug-free-spork
SeanFoley123 Apr 21, 2016
a4bbb71
Create TechnicalReview2
SeanFoley123 Apr 21, 2016
db45165
Improved the ledge fungus thing
KaitlynKeil Apr 21, 2016
77895f5
Merge branch 'master' of https://github.com/SeanFoley123/bug-free-spork
KaitlynKeil Apr 21, 2016
fbb3c43
Merge branch 'master' of https://github.com/SeanFoley123/bug-free-spork
SeanFoley123 Apr 21, 2016
7d8282a
Starting to do the changing direction of the ledges
KaitlynKeil Apr 25, 2016
d1f8c05
added png sprites via upload
Apr 25, 2016
86e2b55
Made a new level
KaitlynKeil Apr 25, 2016
b8f97ce
opaegwih
SeanFoley123 Apr 25, 2016
b0f863d
Merge branch 'master' of https://github.com/SeanFoley123/bug-free-spork
SeanFoley123 Apr 25, 2016
7a1296b
Adding videos
SeanFoley123 Apr 25, 2016
684774d
sprites w/ hopefully transparent backgrounds
Apr 28, 2016
d8d7eb4
Made it so ledges won't spread into the ground when spreading upwards
KaitlynKeil Apr 28, 2016
ec083e9
Merge branch 'master' of https://github.com/SeanFoley123/bug-free-spork
KaitlynKeil Apr 28, 2016
306163f
Wrote up our review reflection
KaitlynKeil Apr 28, 2016
be3bed2
Updated images and implemented health
KaitlynKeil Apr 28, 2016
0d02de3
reverting to working commit
SeanFoley123 Apr 28, 2016
b7fa366
Fixed?
SeanFoley123 Apr 28, 2016
dbe9cde
Added friends and killing friends
KaitlynKeil Apr 30, 2016
07144f9
Fixed the player image and made friends worse to kill
KaitlynKeil Apr 30, 2016
b39c78b
Merging.
Apr 30, 2016
645d582
Merge branch 'master' of https://github.com/SeanFoley123/bug-free-spork
Apr 30, 2016
3fd0091
First pass menu with basic functionality.
Apr 30, 2016
a8c7d4f
Merging
KaitlynKeil Apr 30, 2016
d5a10ce
Merge branch 'master' of https://github.com/SeanFoley123/bug-free-spork
KaitlynKeil Apr 30, 2016
59f14bd
Committing all chages except for weird HUD ones
KaitlynKeil May 1, 2016
4835f3c
Made health bar and talking
KaitlynKeil May 1, 2016
9356856
Added an intro sequence thing, added talking to your symbiote, made i…
KaitlynKeil May 2, 2016
54a8df3
No significant changes
SeanFoley123 May 2, 2016
6cfa907
Merge branch 'master' of https://github.com/SeanFoley123/bug-free-spork
SeanFoley123 May 2, 2016
dc67e3a
Fixed some bugs
SeanFoley123 May 2, 2016
1807906
Fixed jumping out of water bug, made enemies chase you, stopped text …
SeanFoley123 May 2, 2016
c512fda
A couple more bug fixes
SeanFoley123 May 3, 2016
64ff43a
Fixed a few buggy things
KaitlynKeil May 3, 2016
846478f
Updated the README
KaitlynKeil May 3, 2016
e59c05b
Adding intro sequence files
May 4, 2016
af702b1
Added new dialogue
KaitlynKeil May 4, 2016
1d950ca
Merge branch 'master' of https://github.com/SeanFoley123/bug-free-spork
KaitlynKeil May 4, 2016
ab13b62
Added a spore selector
SeanFoley123 May 4, 2016
97a74c0
Merge branch 'master' of https://github.com/SeanFoley123/bug-free-spork
SeanFoley123 May 4, 2016
b7657f9
Made the intro
KaitlynKeil May 4, 2016
aca41bd
Merge branch 'master' of https://github.com/SeanFoley123/bug-free-spork
SeanFoley123 May 4, 2016
5d30c76
Some pictures!
SeanFoley123 May 4, 2016
9741cd4
Working on Tutorial
KaitlynKeil May 4, 2016
09819b9
Merge branch 'master' of https://github.com/SeanFoley123/bug-free-spork
KaitlynKeil May 4, 2016
34ddd3c
No more deadly water
KaitlynKeil May 4, 2016
3849fac
oiaegh
SeanFoley123 May 4, 2016
f613c32
The tutorial is nearly there!
KaitlynKeil May 4, 2016
6ec0028
Merge conflict
SeanFoley123 May 4, 2016
0c9256f
Hi!
SeanFoley123 May 4, 2016
c9d37aa
Readme now has link to the zip file.
May 4, 2016
83d1f1f
Reorganization
SeanFoley123 May 4, 2016
69f68aa
Merge branch 'master' of https://github.com/SeanFoley123/bug-free-spork
SeanFoley123 May 4, 2016
61e0b7c
Added one more buggy level
KaitlynKeil May 4, 2016
2ff5ae0
Added final video
SeanFoley123 May 5, 2016
f14f453
Merge branch 'master' of https://github.com/SeanFoley123/bug-free-spork
SeanFoley123 May 5, 2016
f31e879
Final Comment Updates
SeanFoley123 May 5, 2016
39ed020
Added site to README
SeanFoley123 May 5, 2016
0a20b38
UML_Diagram
SeanFoley123 May 5, 2016
3bcf985
Poster pdf
May 5, 2016
a111ca0
Started commenting
KaitlynKeil May 5, 2016
7b52856
Trying to merge
KaitlynKeil May 5, 2016
4359d4c
Still trying to merge
KaitlynKeil May 5, 2016
301ce78
Added a few comments
KaitlynKeil May 5, 2016
3e1d693
Added drive w/ presentations
SeanFoley123 May 5, 2016
a4e56b6
Final
SeanFoley123 May 5, 2016
61669bf
Resume Better
May 5, 2016
aabd9cb
Merge branch 'master' of https://github.com/SeanFoley123/bug-free-spork
May 5, 2016
7d9e139
Added a to-do list to README.py
KaitlynKeil May 5, 2016
9181cdc
Fixed level 2
KaitlynKeil May 8, 2016
b2b5537
Fixed the level thing
KaitlynKeil May 8, 2016
85b93c3
Updated README to-do list
KaitlynKeil May 8, 2016
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
Binary file added Final_Presentation/doing_battle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Final_Presentation/gladiator.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Final_Presentation/midair.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Final_Presentation/start.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Final_Recording.mp4
Binary file not shown.
142 changes: 142 additions & 0 deletions HUD.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
import math, sys
import pygame
from pygame.locals import *
"""This file contains all the HUD elements. These are all drawn onto the screen itself (not the world) after everything else has been drawn to it. So,
in the current framework, HUD is drawn over characters and spores and terrain. """

class HUD_Object(pygame.sprite.Sprite):
""" Base class for parts of the HUD. """
def __init__(self, view, player):
pygame.sprite.Sprite.__init__(self)
self.view, self.player = view, player


class Text(HUD_Object):
""" Text displayed at the bottom of the screen. """
def __init__(self, view, player, words, duration, speaker):
HUD_Object.__init__(self, view, player)

# Initialize font and draw it with the given words
drawing_font = pygame.font.Font(pygame.font.get_default_font(), 18)
self.image = drawing_font.render(words, True, pygame.Color('black'), pygame.Color('azure3'))

# Duration means how long the message stays on the screen in clock ticks
self.timer = duration

# Set parameters: rectangle for positioning, words for string, and speaker for order of importance
self.rect = self.image.get_rect()
self.speaker = speaker
self.words = words

def update(self):
""" Keeps the words at the bottom of the screen and keeps track of time. """
self.rect.center = (400, 550)
self.timer -= 1
if self.timer <= 1:
self.kill()

def __cmp__(self, other):
# Ascending order of importance: Monster, Mushroom Hat, Friendly
if self.speaker == other.speaker:
return -1 #This will always make it return the last entry in a list.
elif self.speaker == 'Enemy' and (other.speaker == 'Player' or other.speaker == 'Friend'):
return -1
elif self.speaker == 'Player' and other.speaker == 'Friend':
return -1
else:
return 1

def __str__(self):
return self.words

class HealthBar(pygame.sprite.Sprite):
""" A red on black health bar drawn on the left side of the screen. """
def __init__(self, player):
# Set the height and position of the red surface,
# inner_rect, based on the player's current wound value.
pygame.sprite.Sprite.__init__(self)
self.player = player
self.max = self.player.max_wound/5
self.current = self.max - self.player.wound/5
self.health_diff = self.player.wound/5

# image is slightly larger than the red bar at max, in order to have a border of 2 px
self.image = pygame.Surface((24, self.max+4))
self.image.fill((0,0,0))

# puts it on the left side of the screen, halfway up the side
self.rect = self.image.get_rect()
self.rect.centery = 300
self.rect.centerx = 32

# creates the red health bar inside the black boundary
self.inner_rect = pygame.Rect(2, 2, 20, self.current)
self.inner_rect.centery = self.rect.centery
self.inner_rect.bottom = self.rect.bottom-2

def update(self):
# Update based on changing wound values, blits the new over the old
self.inner_rect.height = self.max - self.player.wound/5
self.inner_rect.top = 2+self.player.wound/5
self.image.fill((0, 0, 0))
self.image.fill((255,0,0), self.inner_rect)

class Spore_Boxes(pygame.sprite.Sprite):
""" A class that contains all the possible spore indicators. """
def __init__(self, current_room):
pygame.sprite.Sprite.__init__(self)

# List of all possible spores
self.spores = [One_Spore('q'), One_Spore('e')]
self.image = pygame.Surface((32, 84))
self.image.set_colorkey((0,0,0)) # Makes the default color of a surface, black, into transparent

# Draws each OneSpore onto self.image
for index, spore in enumerate(self.spores):
self.image.blit(spore.image, (0, 52*index))

self.rect = self.image.get_rect()
self.rect.centerx = 32
self.rect.y = 420
self.current_room = current_room

def change(self):
# Updates the currently boxed OneSpore based on the current spore selected in current_room
self.spores[self.current_room.spore_list.index(self.current_room.active_spore)].change_state()
self.image = pygame.Surface((32, 84))
self.image.set_colorkey((0,0,0))
for index, spore in enumerate(self.spores):
self.image.blit(spore.image, (0, 52*index))

class One_Spore(pygame.sprite.Sprite):
""" Each spore indicator. The currently selected spore is boxed in blue. """
def __init__(self, key):
# Key means which key each spore corresponds to
self.key = key

self.image_unselect = pygame.Surface((32, 32))
self.image_select = pygame.Surface((32, 32))

colors_dict = {'q':pygame.Color('chartreuse3'), 'e':pygame.Color('darkgoldenrod4')}

self.image_unselect.fill(colors_dict[key], pygame.Rect(10, 10, 14, 14))
self.image_select.fill(colors_dict[key], pygame.Rect(10, 10, 14, 14))
pygame.draw.rect(self.image_select, pygame.Color('cyan'), pygame.Rect(0, 0, 32, 32), 2)

# By default, q, the devour spore, is selected
if key == 'q':
self.selected = True
else:
self.selected = False

if self.selected:
self.image = self.image_select
else:
self.image = self.image_unselect

def change_state(self):
self.selected = not self.selected
if self.selected:
self.image = self.image_select
else:
self.image = self.image_unselect
68 changes: 68 additions & 0 deletions Intro.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
### This module provides the beginning text intro

import math, sys, pickle
import pygame
from pygame.locals import *

class IntroMovie(object):
""" This class contains the images for the different intro screens as a list. """
def __init__(self, screen):
# IntroMovie must be given the screen you want it to blit onto
self.screen = screen
self.done = False

# Initialize the list of images in order of which you want displayed. Does not currently resize anything.
self.image_list = [pygame.image.load("png/title.png").convert_alpha(),
pygame.image.load("png/frame2.png").convert_alpha(),
pygame.image.load("png/frame3.png").convert_alpha(),
pygame.image.load("png/frame4.png").convert_alpha(),
pygame.image.load("png/frame5.png").convert_alpha(),
pygame.image.load("png/frame6.png").convert_alpha(),
pygame.image.load("png/frame7.png").convert_alpha(),
pygame.image.load("png/frame8.png").convert_alpha(),
pygame.image.load("png/frame9.png").convert_alpha(),
pygame.image.load("png/frame10.png").convert_alpha(),
pygame.image.load("png/frame11.png").convert_alpha(),
pygame.image.load("png/frame12.png").convert_alpha(),
pygame.image.load("png/frame13.png").convert_alpha()
]

# Set the starting image
self.image_index = -1
self.change_image()

def change_image(self):
# Moves to the next image and centers it
self.image_index += 1
self.image = self.image_list[self.image_index]
self.rect = self.image.get_rect()
self.rect.center = self.screen.get_rect().center

def update(self):
# Check for any updates, such as they are trying to skip through it all.
# Controller is not currently running, so this must be done within IntroMovie
for event in pygame.event.get():
if event.type == pygame.QUIT or (event.type == pygame.KEYDOWN and event.key == pygame.K_ESCAPE):
self.done = True
if event.type == pygame.KEYDOWN:
if event.key == pygame.K_SPACE:
if self.image_index < len(self.image_list)-1:
self.change_image()
else:
self.done = True

# Display on-screen with a black background, if applicable
self.screen.fill((0,0,0))
self.screen.blit(self.image, self.rect)

pygame.display.flip()

def run(screen, clock):
""" Makes things run. This is called in game_base.py before the game begins,
so that you only see it once. clock and screen are initialized outside of here
in order to make them be the same as the game will be played with."""
video = IntroMovie(screen)

while not video.done:
video.update()
clock.tick(60)
Loading