README
----------------------------


Introduction:
-----------------

	This graphics library was written to be compatible with the library in the book: 'Python for the Absolute Beginner'. The book took livewires and made its own version. This version was incredibly simple to use and had many features. As the book became outdated, the copies of the library became harder and harder to find. Trying to find a copy to teach some newcomers to python and failing, we decided to write our own library, compatible with the book's tutorials. Hopefully this will help a few people.

	The book's graphic library was inturn based on the libary livewires. If you have a copy of the book, or any of its programs, you only have change the line: 'from livewires import games' to: 'from superwires import games' and it will work as intended. If you don't have the book and just want a good graphics library for python, read the tutorial ahead, read the documentation at:

https://googledrive.com/host/0B2I9paZB7gk9ckl6cjB3WFA1S0E/
and at:
https://googledrive.com/host/0B2I9paZB7gk9VGVOaXZ1U0pzODA/
or go to the project website at: 
https://sites.google.com/a/supernovaapps.com/superwires/

If you have any questions go to:
https://groups.google.com/forum/#!forum/superwires

About the package:
---------------------
The original graphic library from the book (and this one) are a 
wrapper around pyagme. You need to have pygame to use either one.
Get pygame at pygame.org or https://pypi.python.org/pypi/Pygame/1.7.1

Tutorial
---------------

Simple Program:
----------------
from superwires import games

games.init(screen_width=640, screen_height=480, fps=50)
#makes screen with width, height, and frames per second

games.screen.mainloop() # event loop

That made a black window!!!

Now add this line in the middle:
games.screen.background=games.load_image('filename.png')

That made a background!!!

Now this:
games.screen.add(games.Sprite(games.load_image('file.png'), x=320, y=240, dx=3, dy=3))#dx and dy stand for delta x and delta y

That made a moving sprite!!!!

Overriding Sprite:
-----------------------

First make a class:

class Bouncy_Ball(games.Sprite):
	def __init__(self):
		super(self, Bouncy_Ball).__init__(games.load_image('ball.png'), x=320, y=240, dx=3, dy=3)#normal super init

	def update(self): #this is empty by default but is called every frame
		if self.left<=0 or self.right>=640:#right and left edges to check if on edge
			self.dx*=-1#reverse x velocity
		
		if self.top<=0 or self.bottom>=480:#top and bottom edges to check if on edge
			self.dy*=-1#reverse y velocity

Now instead of adding a sprite do:
games.screen.add(Bouncy_Ball)

That made a bouncing ball!!!!!
