From f9b68f082d46c175a2beaad59922a14fea870828 Mon Sep 17 00:00:00 2001 From: Steve Clement Date: Tue, 2 Sep 2014 09:39:30 +0200 Subject: [PATCH] - Added readme so people can try it themselves, plus more details on what we used --- README.md | 102 +++++++++++++++++++++++++++++++++++++++++++++++ crystal.py | 4 +- game.py | 28 ++++++++++++- requirements.txt | 1 - 4 files changed, 131 insertions(+), 4 deletions(-) create mode 100644 README.md delete mode 100644 requirements.txt diff --git a/README.md b/README.md new file mode 100644 index 0000000..ae82815 --- /dev/null +++ b/README.md @@ -0,0 +1,102 @@ +# BBQ Game Jam 2 game: The Mushy Tales of Avo The Cado + +###tags: colored, voodoo, avocat, clicker, lawyer + +###GameJam Keywords (based on which we chose the theme of the game): colored, voodoo, avocat (French for avocado and Lawyer, double entendre) + +###Language: python3+pygame + +###Tools and Hardware used: Wacom Tablet/Photoshop CC, Ableton LivePush, Sublime, Canon 6D + +###Team: @kwisarts, @rafi0t, @SteveClement (Twitter) + +##Plot +Imagine a world where Avo Cado could be free. A world where mushing around would be a thing of the past. +To the greater chagrin of our protagonist Avo The Cado the evil Voodoo Lawyers are behind her. +The Lawyers try to pin down every Avo Cado in existence, especially the pink ones. +Your mission, should you decide to accept it, is to be this bastard evil Voodoo lawyer and just end the life of all Avo Cado People around. + +As every good Avo Cado hunter you have a Boss. Your Boss, Dr. Dredd, tells you what color of Avo Cado to go after. + +Because of a stagnating economy you are ill equipped and can only afford hair pins to make a painful point on the Cado people. +Some would argue it even hurts more, but we are not here to discuss that. + +Do not let the coloured guys go their way, or you will lose. + +Make it past level3 and enter the evil psycho mode where Dr. Dredd wants to test your brain skills. +The only thing that changes is, READ the Color -> Click the Color… + +moua mouaahah mouahahahaha + + +# Requirements + +#Installing py-game for python3 + +##OSX + +* http://florian-berger.de/en/articles/installing-pygame-for-python-3-on-os-x/ + +###Install HomeBrew + +``` +ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" +``` + +###Install dependencies + +``` +brew install python3 mercurial git sdl sdl_image sdl_mixer sdl_ttf portmidi +brew tap homebrew/headonly +brew install --HEAD smpeg +/usr/local/bin/pip3 install hg+http://bitbucket.org/pygame/pygame +``` + +##Linux + +```bash +sudo apt-get install mercurial +sudo apt-get install python3-dev python3-numpy libsdl-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsmpeg-dev libportmidi-dev libavformat-dev libswscale-dev libjpeg-dev libfreetype6-dev +hg clone https://bitbucket.org/pygame/pygame +cd pygame +python3 setup.py build +sudo python3 setup.py install +``` + +### using pip (currently not working due to C90 non-compliance) +```bash +sudo apt-get install mercurial +sudo apt-get install python3-dev python3-numpy libsdl-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsmpeg-dev libportmidi-dev libavformat-dev libswscale-dev libjpeg-dev libfreetype6-dev +pip install hg+https://bitbucket.org/pygame/pygame +``` + + +##Windows + +* https://www.python.org/downloads/ (3.4.x) +* http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame (3.4 compatible) + +#Testing it all out + +``` +python3 +>>> import pygame +>>> pygame.init() +(6, 0) +>>> pygame.display.set_mode((800, 600)) + +>>> raise SystemExit +``` + +#IDE (Integrated Development Environments) + +* https://www.eclipse.org/downloads/ (Standard) +* http://pydev.org/download.html (Copy Paste Install plugin URL) + +OR a standalone py-dev version called LiClipse (Beta as of August 2014) + +* http://brainwy.github.io/liclipse/ + +#CodeEditors + +* http://www.sublimetext.com diff --git a/crystal.py b/crystal.py index 01d6494..731b5de 100644 --- a/crystal.py +++ b/crystal.py @@ -34,7 +34,7 @@ class Crystal: def blitme(self): myrect = pygame.draw.ellipse(self.screen, self.thecolor, self.pos, 0) - if self.level > self.psychomode: + if self.level >= self.psychomode: self.text = self.font.render(self.colorTexts[self.color], 0, WHITE) self.screen.blit(self.text, myrect) @@ -42,7 +42,7 @@ class Crystal: def setColor(self, color): self.color = color self.thecolor = self.color - if self.level > self.psychomode: + if self.level >= self.psychomode: colors = [RED, GREEN, BLUE, YELLOW, PINK] self.thecolor = colors[random.randint(0,len(colors) - 1)] diff --git a/game.py b/game.py index 6db8313..ad3214d 100755 --- a/game.py +++ b/game.py @@ -23,7 +23,7 @@ class TheGame: # initialize the game canvas self.timeout = 30 self.level = 1 - self.psychomode = 3 + self.psychomode = 2 self.targetScore = 400 ############################## # Never set below 4, else we have a high @@ -94,6 +94,31 @@ class TheGame: pygame.mixer.music.load("""audio/level3.wav""") pygame.mixer.music.play() + def toggle_fullscreen(self): + global fullS + fullS = True + self.screen = pygame.display.get_surface() + self.tmp = self.screen.convert() + self.caption = pygame.display.get_caption() + self.cursor = pygame.mouse.get_cursor() # Duoas 16-04-2007 + + self.w,self.h = self.screen.get_width(),self.screen.get_height() + self.flags = self.screen.get_flags() + self.bits = self.screen.get_bitsize() + + pygame.display.quit() + pygame.display.init() + + self.screen = pygame.display.set_mode((self.w,self.h),self.flags^FULLSCREEN,self.bits) + self.screen.blit(self.tmp,(0,0)) + pygame.display.set_caption(*self.caption) + + pygame.key.set_mods(0) #HACK: work-a-round for a SDL bug?? + + pygame.mouse.set_cursor( *self.cursor ) # Duoas 16-04-2007 + + return self.screen + def fadeSound(self, sound=True): if not sound: @@ -292,6 +317,7 @@ class TheGame: elif event.type == pygame.KEYDOWN: if pygame.key.get_pressed()[pygame.K_f] != 0: print("Toggling full screen, in the Future") + #game.toggle_fullscreen() elif (pygame.key.get_pressed()[pygame.K_q] != 0) or (pygame.key.get_pressed()[pygame.K_ESCAPE] != 0): running = False game.gameOver() diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 7a557c7..0000000 --- a/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -hg+https://bitbucket.org/pygame/pygame