Package pyzzle
[hide private]
[frames] | no frames]

Package pyzzle

source code

Submodules [hide private]
  • pyzzle.DB
  • pyzzle.Hotspot: Sprites representing parts of a slide that the user can click.
  • pyzzle.Item: A collection of slides and hotspots that together represent an item within the game world.
  • pyzzle.Movie: Presents video/audio to the user in a manner similar to Slides
  • pyzzle.Panel
  • pyzzle.RelativeRect: A Rect style object whose coordinates are given as a fraction of another rect's width and height
  • pyzzle.Slide: The basic building blocks of myst games.
  • pyzzle.Switch: A collection of slides and hotspots that represent an object within on/off modes
  • pyzzle.Text: Presents text to the user
  • pyzzle.media: Provides high level functionality for accessing media from files
  • pyzzle.standard: A collection of commonly used, global functions

Functions [hide private]
 
init(screensize=(800,600), name='Pyzzle', iconfile=None, fullscreen=False)
Initializes the screen.
source code
 
load(datafilename)
Loads game data from an SQLite database file.
source code
 
save(datafilename=None)
Saves game data to an SQLite database file.
source code
 
cleanup()
Corrects capitalization of any image files mentioned in the loaded SQLite database file.
source code
 
play()
The main game loop.
source code
Variables [hide private]
  panel = Panel()
  cursor = pygame.sprite.Sprite()
  screen = None
  framerate = 30
  datafile = None
  globals = DB.Table('globals', (object,), {})
  stages = DB.Table('stages', (object,), {})
  design = False
  zip = True
  menu = sys.exit
  history = []
Function Details [hide private]

init(screensize=(800,600), name='Pyzzle', iconfile=None, fullscreen=False)

source code 

Initializes the screen. Must call before anything else.

Parameters:
  • screensize ((int,int)) - Dimensions of the screen.
  • name (string) - Text to display in the window's title bar
  • iconfile - name of the image file to display as the window's icon

load(datafilename)

source code 

Loads game data from an SQLite database file.

Parameters:
  • datafilename - name of the SQLite database file to load

save(datafilename=None)

source code 

Saves game data to an SQLite database file.

Parameters:
  • datafilename - name of the SQLite database file to load, or the currently loaded file, if none specified

cleanup()

source code 

Corrects capitalization of any image files mentioned in the loaded SQLite database file. Useful to prepare for distribution using dynamically downloaded content, but takes a while to run.

play()

source code 

The main game loop. Call this function only after you have finished scripting and other initialization.