From 299d4792e4859ef6540a75fd277ba60a92540f69 Mon Sep 17 00:00:00 2001 From: olpc Date: Tue, 15 Jun 2010 16:13:58 +0000 Subject: Previous entry incorrect, this push adds new directories and files --- diff --git a/anim/spriteTest.py b/anim/spriteTest.py new file mode 100755 index 0000000..c06596a --- /dev/null +++ b/anim/spriteTest.py @@ -0,0 +1,109 @@ +#! /usr/bin/env python +import sys, pygame, time +pygame.init() + +print "Full Test - Authors Dave Silverman and Scott Mengel" +print "Set size to 600 x 400 px" +print "Running..." + +#-------------------------------------------------------------- +#CONSTANTS AND VARIABLES + +make=input("How many images would you like to load? ") +img={} +ft="" #filetype +r=0 #frame refreshes +i=1 #cycles images +size = width, height = 600,400 #screen sizes +t=0 #trial number n +colorkey=(255, 152, 0) + +ftArr=[ ["bmp","BMPs 16-Bits/"] , ["bmp","BMPs 24-Bits/"] , ["bmp","BMPs 32-Bits/"] , ["gif","GIFs/"] , ["gif","GIFs Transparent/"] , ["jpg","JPGs 1Low/"] , ["jpg","JPGs 2Medium/"] , ["jpg","JPGs 3High/"] , ["jpg","JPGs 4Max/"] , ["png","PNGs Indexed/"] , ["png","PNGs Transparent/"] ] + +screen = pygame.display.set_mode(size) #Screen Set 600x400 +background = 152, 251, 152 # pale green + +#The switch function +#------------------------------------------------------------- +def chngImg(): + cnt=make + while cnt>0: + switcher = { + 1: pygame.image.load("%s2 Button.%s"%(ft[1],ft[0])), + 2: pygame.image.load("%s3 Button.%s"%(ft[1],ft[0])), + 3: pygame.image.load("%s4 Button.%s"%(ft[1],ft[0])), + 4: pygame.image.load("%s5 Button.%s"%(ft[1],ft[0])), + 5: pygame.image.load("%s6 Button.%s"%(ft[1],ft[0])), + 6: pygame.image.load("%s7 Button.%s"%(ft[1],ft[0])), + 7: pygame.image.load("%s8 Button.%s"%(ft[1],ft[0])), + 8: pygame.image.load("%s9 Button.%s"%(ft[1],ft[0])), + 9: pygame.image.load("%s1 Button.%s"%(ft[1],ft[0])) + } + img[cnt,0]=switcher.get(i,pygame.image.load("%s1 Button.%s"%(ft[1],ft[0]))) + #img[cnt,0].set_colorkey(colorkey, pygame.RLEACCEL) + cnt=cnt-1 +#----------------------------------------------------------------- +#Collision detection + +def collision(): + cnt=make + while cnt>0: + if img[cnt,1].left < 0 or img[cnt,1].right > width: + img[cnt,2]=[ -img[cnt,2][0], img[cnt,2][1] ] + if img[cnt,1].top < 0 or img[cnt,1].bottom > height: + img[cnt,2]=[ img[cnt,2][0], -img[cnt,2][1] ] + img[cnt,1] = img[cnt,1].move(img[cnt,2]) + screen.blit(img[cnt,0],img[cnt,1]) + cnt=cnt-1 + pygame.display.flip() +#----------------------------------------------------------------- +#----------------------------------------------------------------- +#----------------------------------------------------------------- +#----------------------------------------------------------------- +while 1: + cnt=make + ft=ftArr[t] + print "Testing "+ft[1]+"N Button."+ft[0] + trial=5 + while trial>0: + while cnt>0: + img[cnt,0]= pygame.image.load("%s1 Button.%s"%(ft[1],ft[0])) #image.load + img[cnt,1]= img[cnt,0].get_rect() + img[cnt,2]= [2,2] #speed + m=cnt*40 # named m cause i wanted some m&ms + img[cnt,1]=img[cnt,1].move(m,m) #see? it wasn't as tastey though + cnt=cnt-1 + r=0 + start=time.time() +# ----------------------------------------------------------------- + while 1: + chngImg() + i=i+1 + if i>9: i=1 + + for event in pygame.event.get(): + if event.type == pygame.QUIT: sys.exit() + +# speed1=collision(ballrect1,speed1) +# ballrect1 = ballrect1.move(speed1) + + collision() + screen.fill(background) + +# cnt=make +# while cnt>0: +# screen.blit(ball1, ballrect1) +# screen.blit(img[cnt,0],img[cnt,1]) +# cnt=cnt-1 +# +# pygame.display.flip() + + r=r+1 + if r>500: break + +# ----------------------------------------------------------------- +# ----------------------------------------------------------------- + + print 1/((time.time()-start)/r) + trial=trial-1 + t=t+1 diff --git a/anim/test.py b/anim/test.py new file mode 100755 index 0000000..c06596a --- /dev/null +++ b/anim/test.py @@ -0,0 +1,109 @@ +#! /usr/bin/env python +import sys, pygame, time +pygame.init() + +print "Full Test - Authors Dave Silverman and Scott Mengel" +print "Set size to 600 x 400 px" +print "Running..." + +#-------------------------------------------------------------- +#CONSTANTS AND VARIABLES + +make=input("How many images would you like to load? ") +img={} +ft="" #filetype +r=0 #frame refreshes +i=1 #cycles images +size = width, height = 600,400 #screen sizes +t=0 #trial number n +colorkey=(255, 152, 0) + +ftArr=[ ["bmp","BMPs 16-Bits/"] , ["bmp","BMPs 24-Bits/"] , ["bmp","BMPs 32-Bits/"] , ["gif","GIFs/"] , ["gif","GIFs Transparent/"] , ["jpg","JPGs 1Low/"] , ["jpg","JPGs 2Medium/"] , ["jpg","JPGs 3High/"] , ["jpg","JPGs 4Max/"] , ["png","PNGs Indexed/"] , ["png","PNGs Transparent/"] ] + +screen = pygame.display.set_mode(size) #Screen Set 600x400 +background = 152, 251, 152 # pale green + +#The switch function +#------------------------------------------------------------- +def chngImg(): + cnt=make + while cnt>0: + switcher = { + 1: pygame.image.load("%s2 Button.%s"%(ft[1],ft[0])), + 2: pygame.image.load("%s3 Button.%s"%(ft[1],ft[0])), + 3: pygame.image.load("%s4 Button.%s"%(ft[1],ft[0])), + 4: pygame.image.load("%s5 Button.%s"%(ft[1],ft[0])), + 5: pygame.image.load("%s6 Button.%s"%(ft[1],ft[0])), + 6: pygame.image.load("%s7 Button.%s"%(ft[1],ft[0])), + 7: pygame.image.load("%s8 Button.%s"%(ft[1],ft[0])), + 8: pygame.image.load("%s9 Button.%s"%(ft[1],ft[0])), + 9: pygame.image.load("%s1 Button.%s"%(ft[1],ft[0])) + } + img[cnt,0]=switcher.get(i,pygame.image.load("%s1 Button.%s"%(ft[1],ft[0]))) + #img[cnt,0].set_colorkey(colorkey, pygame.RLEACCEL) + cnt=cnt-1 +#----------------------------------------------------------------- +#Collision detection + +def collision(): + cnt=make + while cnt>0: + if img[cnt,1].left < 0 or img[cnt,1].right > width: + img[cnt,2]=[ -img[cnt,2][0], img[cnt,2][1] ] + if img[cnt,1].top < 0 or img[cnt,1].bottom > height: + img[cnt,2]=[ img[cnt,2][0], -img[cnt,2][1] ] + img[cnt,1] = img[cnt,1].move(img[cnt,2]) + screen.blit(img[cnt,0],img[cnt,1]) + cnt=cnt-1 + pygame.display.flip() +#----------------------------------------------------------------- +#----------------------------------------------------------------- +#----------------------------------------------------------------- +#----------------------------------------------------------------- +while 1: + cnt=make + ft=ftArr[t] + print "Testing "+ft[1]+"N Button."+ft[0] + trial=5 + while trial>0: + while cnt>0: + img[cnt,0]= pygame.image.load("%s1 Button.%s"%(ft[1],ft[0])) #image.load + img[cnt,1]= img[cnt,0].get_rect() + img[cnt,2]= [2,2] #speed + m=cnt*40 # named m cause i wanted some m&ms + img[cnt,1]=img[cnt,1].move(m,m) #see? it wasn't as tastey though + cnt=cnt-1 + r=0 + start=time.time() +# ----------------------------------------------------------------- + while 1: + chngImg() + i=i+1 + if i>9: i=1 + + for event in pygame.event.get(): + if event.type == pygame.QUIT: sys.exit() + +# speed1=collision(ballrect1,speed1) +# ballrect1 = ballrect1.move(speed1) + + collision() + screen.fill(background) + +# cnt=make +# while cnt>0: +# screen.blit(ball1, ballrect1) +# screen.blit(img[cnt,0],img[cnt,1]) +# cnt=cnt-1 +# +# pygame.display.flip() + + r=r+1 + if r>500: break + +# ----------------------------------------------------------------- +# ----------------------------------------------------------------- + + print 1/((time.time()-start)/r) + trial=trial-1 + t=t+1 diff --git a/devtools/SpriteTypeTest/BMPs 16-Bits/0 Button.bmp b/devtools/SpriteTypeTest/BMPs 16-Bits/0 Button.bmp new file mode 100755 index 0000000..a36a681 --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 16-Bits/0 Button.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 16-Bits/1 Button.bmp b/devtools/SpriteTypeTest/BMPs 16-Bits/1 Button.bmp new file mode 100755 index 0000000..57630e3 --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 16-Bits/1 Button.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 16-Bits/2 Button.bmp b/devtools/SpriteTypeTest/BMPs 16-Bits/2 Button.bmp new file mode 100755 index 0000000..90af77a --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 16-Bits/2 Button.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 16-Bits/3 Button.bmp b/devtools/SpriteTypeTest/BMPs 16-Bits/3 Button.bmp new file mode 100755 index 0000000..1751a4a --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 16-Bits/3 Button.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 16-Bits/4 Button.bmp b/devtools/SpriteTypeTest/BMPs 16-Bits/4 Button.bmp new file mode 100755 index 0000000..1f292d1 --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 16-Bits/4 Button.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 16-Bits/5 Button.bmp b/devtools/SpriteTypeTest/BMPs 16-Bits/5 Button.bmp new file mode 100755 index 0000000..fd8cc0e --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 16-Bits/5 Button.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 16-Bits/6 Button.bmp b/devtools/SpriteTypeTest/BMPs 16-Bits/6 Button.bmp new file mode 100755 index 0000000..df3a2eb --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 16-Bits/6 Button.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 16-Bits/7 Button.bmp b/devtools/SpriteTypeTest/BMPs 16-Bits/7 Button.bmp new file mode 100755 index 0000000..51b0052 --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 16-Bits/7 Button.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 16-Bits/8 Button.bmp b/devtools/SpriteTypeTest/BMPs 16-Bits/8 Button.bmp new file mode 100755 index 0000000..9302c64 --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 16-Bits/8 Button.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 16-Bits/9 Button.bmp b/devtools/SpriteTypeTest/BMPs 16-Bits/9 Button.bmp new file mode 100755 index 0000000..f5c6191 --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 16-Bits/9 Button.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 16-Bits/Attack Button.bmp b/devtools/SpriteTypeTest/BMPs 16-Bits/Attack Button.bmp new file mode 100755 index 0000000..6adee99 --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 16-Bits/Attack Button.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 16-Bits/Battle Hand.bmp b/devtools/SpriteTypeTest/BMPs 16-Bits/Battle Hand.bmp new file mode 100755 index 0000000..80aef96 --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 16-Bits/Battle Hand.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 16-Bits/Blank Button.bmp b/devtools/SpriteTypeTest/BMPs 16-Bits/Blank Button.bmp new file mode 100755 index 0000000..cab745d --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 16-Bits/Blank Button.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 16-Bits/Clear Button.bmp b/devtools/SpriteTypeTest/BMPs 16-Bits/Clear Button.bmp new file mode 100755 index 0000000..1527b76 --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 16-Bits/Clear Button.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 16-Bits/Enter Button.bmp b/devtools/SpriteTypeTest/BMPs 16-Bits/Enter Button.bmp new file mode 100755 index 0000000..1df130b --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 16-Bits/Enter Button.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 16-Bits/Hand.bmp b/devtools/SpriteTypeTest/BMPs 16-Bits/Hand.bmp new file mode 100755 index 0000000..ad8c5ca --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 16-Bits/Hand.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 16-Bits/Item Button.bmp b/devtools/SpriteTypeTest/BMPs 16-Bits/Item Button.bmp new file mode 100755 index 0000000..0cad273 --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 16-Bits/Item Button.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 16-Bits/Magic Button.bmp b/devtools/SpriteTypeTest/BMPs 16-Bits/Magic Button.bmp new file mode 100755 index 0000000..aa7eb14 --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 16-Bits/Magic Button.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 16-Bits/Pause Screen.bmp b/devtools/SpriteTypeTest/BMPs 16-Bits/Pause Screen.bmp new file mode 100755 index 0000000..b3c34a8 --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 16-Bits/Pause Screen.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 16-Bits/Special Button.bmp b/devtools/SpriteTypeTest/BMPs 16-Bits/Special Button.bmp new file mode 100755 index 0000000..a3c291a --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 16-Bits/Special Button.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 16-Bits/bounce.py b/devtools/SpriteTypeTest/BMPs 16-Bits/bounce.py new file mode 100755 index 0000000..286205b --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 16-Bits/bounce.py @@ -0,0 +1,70 @@ +import sys, pygame, time +pygame.init() + +size = width, height = 600,400 +print "\n\n ---- ---- ---- ---- ---- ---- \nFiltype test - Authors Dave Silverman and Scott Mengel" +print "Set size to 1200 x 900 px" +speed = [2, 2] +black = 255, 255, 255 + +screen = pygame.display.set_mode(size) + +ball = pygame.image.load("1 Button.bmp") +ballrect = ball.get_rect() +i=1 +print "Ball Loaded, collision detection ready, Initiating Loop:" + +# R is the Renewed time +# init is the time started +# tt is the test time, gathered by adding the previous test time with +#the new elapsed time which is test.time()'s difference from init + +r=0 + +start = time.time() + +while 1: + # Homemade switcher for the purpose of selecting which img to load + switcher = { + 1: pygame.image.load("2 Button.bmp"), + 2: pygame.image.load("3 Button.bmp"), + 3: pygame.image.load("4 Button.bmp"), + 4: pygame.image.load("5 Button.bmp"), + 5: pygame.image.load("6 Button.bmp"), + 6: pygame.image.load("7 Button.bmp"), + 7: pygame.image.load("8 Button.bmp"), + 8: pygame.image.load("9 Button.bmp"), + 9: pygame.image.load("1 Button.bmp") + } + ball = switcher.get(i,pygame.image.load("1 Button.bmp")) + + #ball = pygame.Surface(rect.size).convert() + #ball.blit(self.sheet, (0,0), rect) + colorkey = (255, 156, 0) + ball.set_colorkey(colorkey, pygame.RLEACCEL) + + i=i+1 + + if i>9: i=1 + + for event in pygame.event.get(): + if event.type == pygame.QUIT: sys.exit() + + ballrect = ballrect.move(speed) + + if ballrect.left < 0 or ballrect.right > width: + speed[0] = -speed[0] + if ballrect.top < 0 or ballrect.bottom > height: + speed[1] = -speed[1] + + screen.fill(black) + screen.blit(ball, ballrect) + pygame.display.flip() + + r=r+1 + + val=1/((time.time()-start)/r) + print val + print r + if r > 500: + sys.exit(0) diff --git a/devtools/SpriteTypeTest/BMPs 16-Bits/ntest.py b/devtools/SpriteTypeTest/BMPs 16-Bits/ntest.py new file mode 100755 index 0000000..22c019f --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 16-Bits/ntest.py @@ -0,0 +1,103 @@ +import sys, pygame, time +pygame.init() + +ft="bmp" +r=0 +i=1 +size = width, height = 600,400 + +print "Nightmare test - Authors Dave Silverman and Scott Mengel" +print "Set size to 600 x 400 px" +print "Running..." +speed1=speed2=speed3=speed4=[2, 2] +black = 0, 0, 0 + +screen = pygame.display.set_mode(size) + +ball1=ball2=ball3=ball4=pygame.image.load("1 Button.%s"%ft) + +ballrect1 = ball1.get_rect() +ballrect1 = ballrect1.move( 200, 0) + +ballrect2 = ball2.get_rect() +ballrect2 = ballrect2.move( 0, 200) + +ballrect3 = ball3.get_rect() +ballrect3 = ballrect3.move( 200, 200) + +ballrect4 = ball4.get_rect() +ballrect4 = ballrect4.move( 0, 0) + +# ballrect = ballrect.move( 0, 0) + +print "Ball Loaded, collision detection ready, Initiating Loop:" + +start=time.time() + +#----------------------------------------------------------------- + +def chngImg(thisBall): + switcher = { + 1: pygame.image.load("2 Button.%s"%ft), + 2: pygame.image.load("3 Button.%s"%ft), + 3: pygame.image.load("4 Button.%s"%ft), + 4: pygame.image.load("5 Button.%s"%ft), + 3: pygame.image.load("4 Button.%s"%ft), + 3: pygame.image.load("4 Button.%s"%ft), + 5: pygame.image.load("6 Button.%s"%ft), + 6: pygame.image.load("7 Button.%s"%ft), + 7: pygame.image.load("8 Button.%s"%ft), + 8: pygame.image.load("9 Button.%s"%ft), + 9: pygame.image.load("1 Button.%s"%ft) + } + return switcher.get(i,pygame.image.load("1 Button.%s"%ft)) + +#----------------------------------------------------------------- + +def collision(thisBallRect,thisSpeed): + if thisBallRect.left < 0 or thisBallRect.right > width: + return -thisSpeed[0],thisSpeed[1] + if thisBallRect.top < 0 or thisBallRect.bottom > height: + return thisSpeed[0],-thisSpeed[1] + else: return thisSpeed +#----------------------------------------------------------------- + +while 1: + ball1 = chngImg(ball1) + ball2 = chngImg(ball2) + ball3 = chngImg(ball3) + ball4 = chngImg(ball4) + + i=i+1 + if i>9: i=1 + + for event in pygame.event.get(): + if event.type == pygame.QUIT: sys.exit() + + speed1=collision(ballrect1,speed1) + ballrect1 = ballrect1.move(speed1) + + speed2=collision(ballrect2,speed2) + ballrect2 = ballrect2.move(speed2) + + speed3=collision(ballrect3,speed3) + ballrect3 = ballrect3.move(speed3) + + speed4=collision(ballrect4,speed4) + ballrect4 = ballrect4.move(speed4) + + screen.fill(black) + screen.blit(ball1, ballrect1) + screen.blit(ball2, ballrect2) + screen.blit(ball3, ballrect3) + screen.blit(ball4, ballrect4) + + pygame.display.flip() + + r=r+1 + + if r>500: break + +#----------------------------------------------------------------- + +print 1/((time.time()-start)/r) diff --git a/devtools/SpriteTypeTest/BMPs 24-Bits/0 Button.bmp b/devtools/SpriteTypeTest/BMPs 24-Bits/0 Button.bmp new file mode 100755 index 0000000..5fa6a3f --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 24-Bits/0 Button.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 24-Bits/1 Button.bmp b/devtools/SpriteTypeTest/BMPs 24-Bits/1 Button.bmp new file mode 100755 index 0000000..e910cec --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 24-Bits/1 Button.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 24-Bits/2 Button.bmp b/devtools/SpriteTypeTest/BMPs 24-Bits/2 Button.bmp new file mode 100755 index 0000000..0545f38 --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 24-Bits/2 Button.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 24-Bits/3 Button.bmp b/devtools/SpriteTypeTest/BMPs 24-Bits/3 Button.bmp new file mode 100755 index 0000000..a154b29 --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 24-Bits/3 Button.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 24-Bits/4 Button.bmp b/devtools/SpriteTypeTest/BMPs 24-Bits/4 Button.bmp new file mode 100755 index 0000000..4ab21f9 --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 24-Bits/4 Button.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 24-Bits/5 Button.bmp b/devtools/SpriteTypeTest/BMPs 24-Bits/5 Button.bmp new file mode 100755 index 0000000..0a55d39 --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 24-Bits/5 Button.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 24-Bits/6 Button.bmp b/devtools/SpriteTypeTest/BMPs 24-Bits/6 Button.bmp new file mode 100755 index 0000000..ad3f1b1 --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 24-Bits/6 Button.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 24-Bits/7 Button.bmp b/devtools/SpriteTypeTest/BMPs 24-Bits/7 Button.bmp new file mode 100755 index 0000000..915ab5b --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 24-Bits/7 Button.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 24-Bits/8 Button.bmp b/devtools/SpriteTypeTest/BMPs 24-Bits/8 Button.bmp new file mode 100755 index 0000000..b36287d --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 24-Bits/8 Button.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 24-Bits/9 Button.bmp b/devtools/SpriteTypeTest/BMPs 24-Bits/9 Button.bmp new file mode 100755 index 0000000..2cab5a4 --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 24-Bits/9 Button.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 24-Bits/Attack Button.bmp b/devtools/SpriteTypeTest/BMPs 24-Bits/Attack Button.bmp new file mode 100755 index 0000000..9553638 --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 24-Bits/Attack Button.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 24-Bits/Battle Hand.bmp b/devtools/SpriteTypeTest/BMPs 24-Bits/Battle Hand.bmp new file mode 100755 index 0000000..281c528 --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 24-Bits/Battle Hand.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 24-Bits/Blank Button.bmp b/devtools/SpriteTypeTest/BMPs 24-Bits/Blank Button.bmp new file mode 100755 index 0000000..62a7a75 --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 24-Bits/Blank Button.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 24-Bits/Clear Button.bmp b/devtools/SpriteTypeTest/BMPs 24-Bits/Clear Button.bmp new file mode 100755 index 0000000..a348a0e --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 24-Bits/Clear Button.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 24-Bits/Enter Button.bmp b/devtools/SpriteTypeTest/BMPs 24-Bits/Enter Button.bmp new file mode 100755 index 0000000..ded46f3 --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 24-Bits/Enter Button.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 24-Bits/Hand.bmp b/devtools/SpriteTypeTest/BMPs 24-Bits/Hand.bmp new file mode 100755 index 0000000..02c3566 --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 24-Bits/Hand.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 24-Bits/Item Button.bmp b/devtools/SpriteTypeTest/BMPs 24-Bits/Item Button.bmp new file mode 100755 index 0000000..9302ae5 --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 24-Bits/Item Button.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 24-Bits/Magic Button.bmp b/devtools/SpriteTypeTest/BMPs 24-Bits/Magic Button.bmp new file mode 100755 index 0000000..e2f7e71 --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 24-Bits/Magic Button.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 24-Bits/Pause Screen.bmp b/devtools/SpriteTypeTest/BMPs 24-Bits/Pause Screen.bmp new file mode 100755 index 0000000..eb25e1a --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 24-Bits/Pause Screen.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 24-Bits/Special Button.bmp b/devtools/SpriteTypeTest/BMPs 24-Bits/Special Button.bmp new file mode 100755 index 0000000..b5cecab --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 24-Bits/Special Button.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 24-Bits/bounce.py b/devtools/SpriteTypeTest/BMPs 24-Bits/bounce.py new file mode 100755 index 0000000..396bd1f --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 24-Bits/bounce.py @@ -0,0 +1,70 @@ +import sys, pygame, time +pygame.init() + +size = width, height = 600,400 +print "\n\n ---- ---- ---- ---- ---- ---- \nFiltype test - Authors Dave Silverman and Scott Mengel" +print "Set size to 1200 x 900 px" +speed = [2, 2] +black = 255, 255, 255 + +screen = pygame.display.set_mode(size) + +ball = pygame.image.load("1 Button.bmp") +ballrect = ball.get_rect() +i=1 +print "Ball Loaded, collision detection ready, Initiating Loop:" + +# R is the Renewed time +# init is the time started +# tt is the test time, gathered by adding the previous test time with +#the new elapsed time which is test.time()'s difference from init + +r=0 + +start = time.time() + +while 1: + # Homemade switcher for the purpose of selecting which img to load + switcher = { + 1: pygame.image.load("2 Button.bmp"), + 2: pygame.image.load("3 Button.bmp"), + 3: pygame.image.load("4 Button.bmp"), + 4: pygame.image.load("5 Button.bmp"), + 5: pygame.image.load("6 Button.bmp"), + 6: pygame.image.load("7 Button.bmp"), + 7: pygame.image.load("8 Button.bmp"), + 8: pygame.image.load("9 Button.bmp"), + 9: pygame.image.load("1 Button.bmp") + } + ball = switcher.get(i,pygame.image.load("1 Button.bmp")) + + #ball = pygame.Surface(rect.size).convert() + #ball.blit(self.sheet, (0,0), rect) + colorkey = (255, 153, 0) + ball.set_colorkey(colorkey, pygame.RLEACCEL) + + i=i+1 + + if i>9: i=1 + + for event in pygame.event.get(): + if event.type == pygame.QUIT: sys.exit() + + ballrect = ballrect.move(speed) + + if ballrect.left < 0 or ballrect.right > width: + speed[0] = -speed[0] + if ballrect.top < 0 or ballrect.bottom > height: + speed[1] = -speed[1] + + screen.fill(black) + screen.blit(ball, ballrect) + pygame.display.flip() + + r=r+1 + + val=1/((time.time()-start)/r) + print val + print r + if r > 500: + sys.exit(0) diff --git a/devtools/SpriteTypeTest/BMPs 32-Bits/0 Button.bmp b/devtools/SpriteTypeTest/BMPs 32-Bits/0 Button.bmp new file mode 100755 index 0000000..c25785f --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 32-Bits/0 Button.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 32-Bits/1 Button.bmp b/devtools/SpriteTypeTest/BMPs 32-Bits/1 Button.bmp new file mode 100755 index 0000000..d4da79c --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 32-Bits/1 Button.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 32-Bits/2 Button.bmp b/devtools/SpriteTypeTest/BMPs 32-Bits/2 Button.bmp new file mode 100755 index 0000000..1f14c34 --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 32-Bits/2 Button.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 32-Bits/3 Button.bmp b/devtools/SpriteTypeTest/BMPs 32-Bits/3 Button.bmp new file mode 100755 index 0000000..8ae5bf2 --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 32-Bits/3 Button.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 32-Bits/4 Button.bmp b/devtools/SpriteTypeTest/BMPs 32-Bits/4 Button.bmp new file mode 100755 index 0000000..1c5f912 --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 32-Bits/4 Button.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 32-Bits/5 Button.bmp b/devtools/SpriteTypeTest/BMPs 32-Bits/5 Button.bmp new file mode 100755 index 0000000..8d08d71 --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 32-Bits/5 Button.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 32-Bits/6 Button.bmp b/devtools/SpriteTypeTest/BMPs 32-Bits/6 Button.bmp new file mode 100755 index 0000000..c9496e5 --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 32-Bits/6 Button.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 32-Bits/7 Button.bmp b/devtools/SpriteTypeTest/BMPs 32-Bits/7 Button.bmp new file mode 100755 index 0000000..2495c54 --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 32-Bits/7 Button.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 32-Bits/8 Button.bmp b/devtools/SpriteTypeTest/BMPs 32-Bits/8 Button.bmp new file mode 100755 index 0000000..0730613 --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 32-Bits/8 Button.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 32-Bits/9 Button.bmp b/devtools/SpriteTypeTest/BMPs 32-Bits/9 Button.bmp new file mode 100755 index 0000000..179a768 --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 32-Bits/9 Button.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 32-Bits/Attack Button.bmp b/devtools/SpriteTypeTest/BMPs 32-Bits/Attack Button.bmp new file mode 100755 index 0000000..9331158 --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 32-Bits/Attack Button.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 32-Bits/Battle Hand.bmp b/devtools/SpriteTypeTest/BMPs 32-Bits/Battle Hand.bmp new file mode 100755 index 0000000..ea7c033 --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 32-Bits/Battle Hand.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 32-Bits/Blank Button.bmp b/devtools/SpriteTypeTest/BMPs 32-Bits/Blank Button.bmp new file mode 100755 index 0000000..88e225a --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 32-Bits/Blank Button.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 32-Bits/Clear Button.bmp b/devtools/SpriteTypeTest/BMPs 32-Bits/Clear Button.bmp new file mode 100755 index 0000000..a348a0e --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 32-Bits/Clear Button.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 32-Bits/Enter Button.bmp b/devtools/SpriteTypeTest/BMPs 32-Bits/Enter Button.bmp new file mode 100755 index 0000000..3914ff2 --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 32-Bits/Enter Button.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 32-Bits/Hand.bmp b/devtools/SpriteTypeTest/BMPs 32-Bits/Hand.bmp new file mode 100755 index 0000000..0ba54af --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 32-Bits/Hand.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 32-Bits/Item Button.bmp b/devtools/SpriteTypeTest/BMPs 32-Bits/Item Button.bmp new file mode 100755 index 0000000..84523be --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 32-Bits/Item Button.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 32-Bits/Magic Button.bmp b/devtools/SpriteTypeTest/BMPs 32-Bits/Magic Button.bmp new file mode 100755 index 0000000..759086c --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 32-Bits/Magic Button.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 32-Bits/Pause Screen.bmp b/devtools/SpriteTypeTest/BMPs 32-Bits/Pause Screen.bmp new file mode 100755 index 0000000..bec11f0 --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 32-Bits/Pause Screen.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 32-Bits/Special Button.bmp b/devtools/SpriteTypeTest/BMPs 32-Bits/Special Button.bmp new file mode 100755 index 0000000..a17614d --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 32-Bits/Special Button.bmp Binary files differ diff --git a/devtools/SpriteTypeTest/BMPs 32-Bits/bounce.py b/devtools/SpriteTypeTest/BMPs 32-Bits/bounce.py new file mode 100755 index 0000000..396bd1f --- /dev/null +++ b/devtools/SpriteTypeTest/BMPs 32-Bits/bounce.py @@ -0,0 +1,70 @@ +import sys, pygame, time +pygame.init() + +size = width, height = 600,400 +print "\n\n ---- ---- ---- ---- ---- ---- \nFiltype test - Authors Dave Silverman and Scott Mengel" +print "Set size to 1200 x 900 px" +speed = [2, 2] +black = 255, 255, 255 + +screen = pygame.display.set_mode(size) + +ball = pygame.image.load("1 Button.bmp") +ballrect = ball.get_rect() +i=1 +print "Ball Loaded, collision detection ready, Initiating Loop:" + +# R is the Renewed time +# init is the time started +# tt is the test time, gathered by adding the previous test time with +#the new elapsed time which is test.time()'s difference from init + +r=0 + +start = time.time() + +while 1: + # Homemade switcher for the purpose of selecting which img to load + switcher = { + 1: pygame.image.load("2 Button.bmp"), + 2: pygame.image.load("3 Button.bmp"), + 3: pygame.image.load("4 Button.bmp"), + 4: pygame.image.load("5 Button.bmp"), + 5: pygame.image.load("6 Button.bmp"), + 6: pygame.image.load("7 Button.bmp"), + 7: pygame.image.load("8 Button.bmp"), + 8: pygame.image.load("9 Button.bmp"), + 9: pygame.image.load("1 Button.bmp") + } + ball = switcher.get(i,pygame.image.load("1 Button.bmp")) + + #ball = pygame.Surface(rect.size).convert() + #ball.blit(self.sheet, (0,0), rect) + colorkey = (255, 153, 0) + ball.set_colorkey(colorkey, pygame.RLEACCEL) + + i=i+1 + + if i>9: i=1 + + for event in pygame.event.get(): + if event.type == pygame.QUIT: sys.exit() + + ballrect = ballrect.move(speed) + + if ballrect.left < 0 or ballrect.right > width: + speed[0] = -speed[0] + if ballrect.top < 0 or ballrect.bottom > height: + speed[1] = -speed[1] + + screen.fill(black) + screen.blit(ball, ballrect) + pygame.display.flip() + + r=r+1 + + val=1/((time.time()-start)/r) + print val + print r + if r > 500: + sys.exit(0) diff --git a/devtools/SpriteTypeTest/GIFs Transparent/1 Button.gif b/devtools/SpriteTypeTest/GIFs Transparent/1 Button.gif new file mode 100755 index 0000000..2aad244 --- /dev/null +++ b/devtools/SpriteTypeTest/GIFs Transparent/1 Button.gif Binary files differ diff --git a/devtools/SpriteTypeTest/GIFs Transparent/2 Button.gif b/devtools/SpriteTypeTest/GIFs Transparent/2 Button.gif new file mode 100755 index 0000000..ed22525 --- /dev/null +++ b/devtools/SpriteTypeTest/GIFs Transparent/2 Button.gif Binary files differ diff --git a/devtools/SpriteTypeTest/GIFs Transparent/3 Button.gif b/devtools/SpriteTypeTest/GIFs Transparent/3 Button.gif new file mode 100755 index 0000000..246cd12 --- /dev/null +++ b/devtools/SpriteTypeTest/GIFs Transparent/3 Button.gif Binary files differ diff --git a/devtools/SpriteTypeTest/GIFs Transparent/4 Button.gif b/devtools/SpriteTypeTest/GIFs Transparent/4 Button.gif new file mode 100755 index 0000000..722f240 --- /dev/null +++ b/devtools/SpriteTypeTest/GIFs Transparent/4 Button.gif Binary files differ diff --git a/devtools/SpriteTypeTest/GIFs Transparent/5 Button.gif b/devtools/SpriteTypeTest/GIFs Transparent/5 Button.gif new file mode 100755 index 0000000..6a71348 --- /dev/null +++ b/devtools/SpriteTypeTest/GIFs Transparent/5 Button.gif Binary files differ diff --git a/devtools/SpriteTypeTest/GIFs Transparent/6 Button.gif b/devtools/SpriteTypeTest/GIFs Transparent/6 Button.gif new file mode 100755 index 0000000..0dd2145 --- /dev/null +++ b/devtools/SpriteTypeTest/GIFs Transparent/6 Button.gif Binary files differ diff --git a/devtools/SpriteTypeTest/GIFs Transparent/7 Button.gif b/devtools/SpriteTypeTest/GIFs Transparent/7 Button.gif new file mode 100755 index 0000000..1e9914b --- /dev/null +++ b/devtools/SpriteTypeTest/GIFs Transparent/7 Button.gif Binary files differ diff --git a/devtools/SpriteTypeTest/GIFs Transparent/8 Button.gif b/devtools/SpriteTypeTest/GIFs Transparent/8 Button.gif new file mode 100755 index 0000000..390124b --- /dev/null +++ b/devtools/SpriteTypeTest/GIFs Transparent/8 Button.gif Binary files differ diff --git a/devtools/SpriteTypeTest/GIFs Transparent/9 Button.gif b/devtools/SpriteTypeTest/GIFs Transparent/9 Button.gif new file mode 100755 index 0000000..61c8c3c --- /dev/null +++ b/devtools/SpriteTypeTest/GIFs Transparent/9 Button.gif Binary files differ diff --git a/devtools/SpriteTypeTest/GIFs Transparent/bounce.py b/devtools/SpriteTypeTest/GIFs Transparent/bounce.py new file mode 100755 index 0000000..50e57e2 --- /dev/null +++ b/devtools/SpriteTypeTest/GIFs Transparent/bounce.py @@ -0,0 +1,66 @@ +import sys, pygame, time +pygame.init() + +size = width, height = 600,400 +#size = width, height = 1200,900 +print "\n\n ---- ---- ---- ---- ---- ---- \nFiltype test - Authors Dave Silverman and Scott Mengel" +print "Set size to 1200 x 900 px" +speed = [2, 2] +black = 255, 255, 255 + +screen = pygame.display.set_mode(size) + +ball = pygame.image.load("1 Button.gif") +ballrect = ball.get_rect() +i=1 +print "Ball Loaded, collision detection ready, Initiating Loop:" + +# R is the Renewed time +# init is the time started +# tt is the test time, gathered by adding the previous test time with +#the new elapsed time which is test.time()'s difference from init + +r=0 + +start = time.time() + +while 1: + # Homemade switcher for the purpose of selecting which img to load + switcher = { + 1: pygame.image.load("2 Button.gif"), + 2: pygame.image.load("3 Button.gif"), + 3: pygame.image.load("4 Button.gif"), + 4: pygame.image.load("5 Button.gif"), + 5: pygame.image.load("6 Button.gif"), + 6: pygame.image.load("7 Button.gif"), + 7: pygame.image.load("8 Button.gif"), + 8: pygame.image.load("9 Button.gif"), + 9: pygame.image.load("1 Button.gif") + } + ball = switcher.get(i,pygame.image.load("1 Button.gif")) + + i=i+1 + + if i>9: i=1 + + for event in pygame.event.get(): + if event.type == pygame.QUIT: sys.exit() + + ballrect = ballrect.move(speed) + + if ballrect.left < 0 or ballrect.right > width: + speed[0] = -speed[0] + if ballrect.top < 0 or ballrect.bottom > height: + speed[1] = -speed[1] + + screen.fill(black) + screen.blit(ball, ballrect) + pygame.display.flip() + + r=r+1 + + val=1/((time.time()-start)/r) + print val + print r + if r > 500: + sys.exit(0) diff --git a/devtools/SpriteTypeTest/GIFs/0 Button.gif b/devtools/SpriteTypeTest/GIFs/0 Button.gif new file mode 100755 index 0000000..8795936 --- /dev/null +++ b/devtools/SpriteTypeTest/GIFs/0 Button.gif Binary files differ diff --git a/devtools/SpriteTypeTest/GIFs/1 Button.gif b/devtools/SpriteTypeTest/GIFs/1 Button.gif new file mode 100755 index 0000000..4a89216 --- /dev/null +++ b/devtools/SpriteTypeTest/GIFs/1 Button.gif Binary files differ diff --git a/devtools/SpriteTypeTest/GIFs/2 Button.gif b/devtools/SpriteTypeTest/GIFs/2 Button.gif new file mode 100755 index 0000000..b5019d8 --- /dev/null +++ b/devtools/SpriteTypeTest/GIFs/2 Button.gif Binary files differ diff --git a/devtools/SpriteTypeTest/GIFs/3 Button.gif b/devtools/SpriteTypeTest/GIFs/3 Button.gif new file mode 100755 index 0000000..a87ddc6 --- /dev/null +++ b/devtools/SpriteTypeTest/GIFs/3 Button.gif Binary files differ diff --git a/devtools/SpriteTypeTest/GIFs/4 Button.gif b/devtools/SpriteTypeTest/GIFs/4 Button.gif new file mode 100755 index 0000000..2a398e6 --- /dev/null +++ b/devtools/SpriteTypeTest/GIFs/4 Button.gif Binary files differ diff --git a/devtools/SpriteTypeTest/GIFs/5 Button.gif b/devtools/SpriteTypeTest/GIFs/5 Button.gif new file mode 100755 index 0000000..93e5b8d --- /dev/null +++ b/devtools/SpriteTypeTest/GIFs/5 Button.gif Binary files differ diff --git a/devtools/SpriteTypeTest/GIFs/6 Button.gif b/devtools/SpriteTypeTest/GIFs/6 Button.gif new file mode 100755 index 0000000..0e73825 --- /dev/null +++ b/devtools/SpriteTypeTest/GIFs/6 Button.gif Binary files differ diff --git a/devtools/SpriteTypeTest/GIFs/7 Button.gif b/devtools/SpriteTypeTest/GIFs/7 Button.gif new file mode 100755 index 0000000..67dff34 --- /dev/null +++ b/devtools/SpriteTypeTest/GIFs/7 Button.gif Binary files differ diff --git a/devtools/SpriteTypeTest/GIFs/8 Button.gif b/devtools/SpriteTypeTest/GIFs/8 Button.gif new file mode 100755 index 0000000..4ca6786 --- /dev/null +++ b/devtools/SpriteTypeTest/GIFs/8 Button.gif Binary files differ diff --git a/devtools/SpriteTypeTest/GIFs/9 Button.gif b/devtools/SpriteTypeTest/GIFs/9 Button.gif new file mode 100755 index 0000000..bca1e6e --- /dev/null +++ b/devtools/SpriteTypeTest/GIFs/9 Button.gif Binary files differ diff --git a/devtools/SpriteTypeTest/GIFs/Attack Button.gif b/devtools/SpriteTypeTest/GIFs/Attack Button.gif new file mode 100755 index 0000000..b128c5c --- /dev/null +++ b/devtools/SpriteTypeTest/GIFs/Attack Button.gif Binary files differ diff --git a/devtools/SpriteTypeTest/GIFs/Battle Hand.gif b/devtools/SpriteTypeTest/GIFs/Battle Hand.gif new file mode 100755 index 0000000..9822d4c --- /dev/null +++ b/devtools/SpriteTypeTest/GIFs/Battle Hand.gif Binary files differ diff --git a/devtools/SpriteTypeTest/GIFs/Blank Button.gif b/devtools/SpriteTypeTest/GIFs/Blank Button.gif new file mode 100755 index 0000000..32bb8de --- /dev/null +++ b/devtools/SpriteTypeTest/GIFs/Blank Button.gif Binary files differ diff --git a/devtools/SpriteTypeTest/GIFs/Buttons.gif b/devtools/SpriteTypeTest/GIFs/Buttons.gif new file mode 100755 index 0000000..8795936 --- /dev/null +++ b/devtools/SpriteTypeTest/GIFs/Buttons.gif Binary files differ diff --git a/devtools/SpriteTypeTest/GIFs/Clear Button.gif b/devtools/SpriteTypeTest/GIFs/Clear Button.gif new file mode 100755 index 0000000..1d20353 --- /dev/null +++ b/devtools/SpriteTypeTest/GIFs/Clear Button.gif Binary files differ diff --git a/devtools/SpriteTypeTest/GIFs/Enter Button.gif b/devtools/SpriteTypeTest/GIFs/Enter Button.gif new file mode 100755 index 0000000..753b18d --- /dev/null +++ b/devtools/SpriteTypeTest/GIFs/Enter Button.gif Binary files differ diff --git a/devtools/SpriteTypeTest/GIFs/Hand.gif b/devtools/SpriteTypeTest/GIFs/Hand.gif new file mode 100755 index 0000000..6a9eb53 --- /dev/null +++ b/devtools/SpriteTypeTest/GIFs/Hand.gif Binary files differ diff --git a/devtools/SpriteTypeTest/GIFs/Item Button.gif b/devtools/SpriteTypeTest/GIFs/Item Button.gif new file mode 100755 index 0000000..d54e0c8 --- /dev/null +++ b/devtools/SpriteTypeTest/GIFs/Item Button.gif Binary files differ diff --git a/devtools/SpriteTypeTest/GIFs/Magic Button.gif b/devtools/SpriteTypeTest/GIFs/Magic Button.gif new file mode 100755 index 0000000..39bb77a --- /dev/null +++ b/devtools/SpriteTypeTest/GIFs/Magic Button.gif Binary files differ diff --git a/devtools/SpriteTypeTest/GIFs/Pause Screen.gif b/devtools/SpriteTypeTest/GIFs/Pause Screen.gif new file mode 100755 index 0000000..7bdfaf3 --- /dev/null +++ b/devtools/SpriteTypeTest/GIFs/Pause Screen.gif Binary files differ diff --git a/devtools/SpriteTypeTest/GIFs/Special button.gif b/devtools/SpriteTypeTest/GIFs/Special button.gif new file mode 100755 index 0000000..c20eb1c --- /dev/null +++ b/devtools/SpriteTypeTest/GIFs/Special button.gif Binary files differ diff --git a/devtools/SpriteTypeTest/GIFs/bounce.py b/devtools/SpriteTypeTest/GIFs/bounce.py new file mode 100755 index 0000000..6e0d2df --- /dev/null +++ b/devtools/SpriteTypeTest/GIFs/bounce.py @@ -0,0 +1,70 @@ +import sys, pygame, time +pygame.init() + +size = width, height = 600,400 +print "\n\n ---- ---- ---- ---- ---- ---- \nFiltype test - Authors Dave Silverman and Scott Mengel" +print "Set size to 1200 x 900 px" +speed = [2, 2] +black = 255, 255, 255 + +screen = pygame.display.set_mode(size) + +ball = pygame.image.load("1 Button.gif") +ballrect = ball.get_rect() +i=1 +print "Ball Loaded, collision detection ready, Initiating Loop:" + +# R is the Renewed time +# init is the time started +# tt is the test time, gathered by adding the previous test time with +#the new elapsed time which is test.time()'s difference from init + +r=0 + +start = time.time() + +while 1: + # Homemade switcher for the purpose of selecting which img to load + switcher = { + 1: pygame.image.load("2 Button.gif"), + 2: pygame.image.load("3 Button.gif"), + 3: pygame.image.load("4 Button.gif"), + 4: pygame.image.load("5 Button.gif"), + 5: pygame.image.load("6 Button.gif"), + 6: pygame.image.load("7 Button.gif"), + 7: pygame.image.load("8 Button.gif"), + 8: pygame.image.load("9 Button.gif"), + 9: pygame.image.load("1 Button.gif") + } + ball = switcher.get(i,pygame.image.load("1 Button.gif")) + + #ball = pygame.Surface(rect.size).convert() + #ball.blit(self.sheet, (0,0), rect) + colorkey = (255, 156, 0) + ball.set_colorkey(colorkey, pygame.RLEACCEL) + + i=i+1 + + if i>9: i=1 + + for event in pygame.event.get(): + if event.type == pygame.QUIT: sys.exit() + + ballrect = ballrect.move(speed) + + if ballrect.left < 0 or ballrect.right > width: + speed[0] = -speed[0] + if ballrect.top < 0 or ballrect.bottom > height: + speed[1] = -speed[1] + + screen.fill(black) + screen.blit(ball, ballrect) + pygame.display.flip() + + r=r+1 + + val=1/((time.time()-start)/r) + print val + print r + if r > 500: + sys.exit(0) diff --git a/devtools/SpriteTypeTest/GIFs/ntest.py b/devtools/SpriteTypeTest/GIFs/ntest.py new file mode 100755 index 0000000..ce64777 --- /dev/null +++ b/devtools/SpriteTypeTest/GIFs/ntest.py @@ -0,0 +1,103 @@ +import sys, pygame, time +pygame.init() + +ft="gif" +r=0 +i=1 +size = width, height = 600,400 + +print "Nightmare test - Authors Dave Silverman and Scott Mengel" +print "Set size to 600 x 400 px" +print "Running..." +speed1=speed2=speed3=speed4=[2, 2] +black = 0, 0, 0 + +screen = pygame.display.set_mode(size) + +ball1=ball2=ball3=ball4=pygame.image.load("1 Button.%s"%ft) + +ballrect1 = ball1.get_rect() +ballrect1 = ballrect1.move( 200, 0) + +ballrect2 = ball2.get_rect() +ballrect2 = ballrect2.move( 0, 200) + +ballrect3 = ball3.get_rect() +ballrect3 = ballrect3.move( 200, 200) + +ballrect4 = ball4.get_rect() +ballrect4 = ballrect4.move( 0, 0) + +# ballrect = ballrect.move( 0, 0) + +print "Ball Loaded, collision detection ready, Initiating Loop:" + +start=time.time() + +#----------------------------------------------------------------- + +def chngImg(thisBall): + switcher = { + 1: pygame.image.load("2 Button.%s"%ft), + 2: pygame.image.load("3 Button.%s"%ft), + 3: pygame.image.load("4 Button.%s"%ft), + 4: pygame.image.load("5 Button.%s"%ft), + 3: pygame.image.load("4 Button.%s"%ft), + 3: pygame.image.load("4 Button.%s"%ft), + 5: pygame.image.load("6 Button.%s"%ft), + 6: pygame.image.load("7 Button.%s"%ft), + 7: pygame.image.load("8 Button.%s"%ft), + 8: pygame.image.load("9 Button.%s"%ft), + 9: pygame.image.load("1 Button.%s"%ft) + } + return switcher.get(i,pygame.image.load("1 Button.gif")) + +#----------------------------------------------------------------- + +def collision(thisBallRect,thisSpeed): + if thisBallRect.left < 0 or thisBallRect.right > width: + return -thisSpeed[0],thisSpeed[1] + if thisBallRect.top < 0 or thisBallRect.bottom > height: + return thisSpeed[0],-thisSpeed[1] + else: return thisSpeed +#----------------------------------------------------------------- + +while 1: + ball1 = chngImg(ball1) + ball2 = chngImg(ball2) + ball3 = chngImg(ball3) + ball4 = chngImg(ball4) + + i=i+1 + if i>9: i=1 + + for event in pygame.event.get(): + if event.type == pygame.QUIT: sys.exit() + + speed1=collision(ballrect1,speed1) + ballrect1 = ballrect1.move(speed1) + + speed2=collision(ballrect2,speed2) + ballrect2 = ballrect2.move(speed2) + + speed3=collision(ballrect3,speed3) + ballrect3 = ballrect3.move(speed3) + + speed4=collision(ballrect4,speed4) + ballrect4 = ballrect4.move(speed4) + + screen.fill(black) + screen.blit(ball1, ballrect1) + screen.blit(ball2, ballrect2) + screen.blit(ball3, ballrect3) + screen.blit(ball4, ballrect4) + + pygame.display.flip() + + r=r+1 + + if r>500: break + +#----------------------------------------------------------------- + +print 1/((time.time()-start)/r) diff --git a/devtools/SpriteTypeTest/JPGs 1Low/0 Button.jpg b/devtools/SpriteTypeTest/JPGs 1Low/0 Button.jpg new file mode 100755 index 0000000..580e162 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 1Low/0 Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 1Low/1 Button.jpg b/devtools/SpriteTypeTest/JPGs 1Low/1 Button.jpg new file mode 100755 index 0000000..30afadd --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 1Low/1 Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 1Low/2 Button.jpg b/devtools/SpriteTypeTest/JPGs 1Low/2 Button.jpg new file mode 100755 index 0000000..7f52df0 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 1Low/2 Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 1Low/3 Button.jpg b/devtools/SpriteTypeTest/JPGs 1Low/3 Button.jpg new file mode 100755 index 0000000..3aafa5e --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 1Low/3 Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 1Low/4 Button.jpg b/devtools/SpriteTypeTest/JPGs 1Low/4 Button.jpg new file mode 100755 index 0000000..f3c4233 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 1Low/4 Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 1Low/5 Button.jpg b/devtools/SpriteTypeTest/JPGs 1Low/5 Button.jpg new file mode 100755 index 0000000..cb2618d --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 1Low/5 Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 1Low/6 Button.jpg b/devtools/SpriteTypeTest/JPGs 1Low/6 Button.jpg new file mode 100755 index 0000000..e128bc7 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 1Low/6 Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 1Low/7 Button.jpg b/devtools/SpriteTypeTest/JPGs 1Low/7 Button.jpg new file mode 100755 index 0000000..5d09da2 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 1Low/7 Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 1Low/8 Button.jpg b/devtools/SpriteTypeTest/JPGs 1Low/8 Button.jpg new file mode 100755 index 0000000..5093b16 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 1Low/8 Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 1Low/9 Button.jpg b/devtools/SpriteTypeTest/JPGs 1Low/9 Button.jpg new file mode 100755 index 0000000..28fe7d6 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 1Low/9 Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 1Low/Attack Button.jpg b/devtools/SpriteTypeTest/JPGs 1Low/Attack Button.jpg new file mode 100755 index 0000000..96c0804 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 1Low/Attack Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 1Low/Battle Hand.jpg b/devtools/SpriteTypeTest/JPGs 1Low/Battle Hand.jpg new file mode 100755 index 0000000..3fdba58 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 1Low/Battle Hand.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 1Low/Blank Button.jpg b/devtools/SpriteTypeTest/JPGs 1Low/Blank Button.jpg new file mode 100755 index 0000000..293e02b --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 1Low/Blank Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 1Low/Clear Button.jpg b/devtools/SpriteTypeTest/JPGs 1Low/Clear Button.jpg new file mode 100755 index 0000000..daca420 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 1Low/Clear Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 1Low/Enter Button.jpg b/devtools/SpriteTypeTest/JPGs 1Low/Enter Button.jpg new file mode 100755 index 0000000..dd63a59 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 1Low/Enter Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 1Low/Hand.jpg b/devtools/SpriteTypeTest/JPGs 1Low/Hand.jpg new file mode 100755 index 0000000..8c136af --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 1Low/Hand.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 1Low/Item Button.jpg b/devtools/SpriteTypeTest/JPGs 1Low/Item Button.jpg new file mode 100755 index 0000000..ad6afe8 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 1Low/Item Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 1Low/Magic Button.jpg b/devtools/SpriteTypeTest/JPGs 1Low/Magic Button.jpg new file mode 100755 index 0000000..756b4ab --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 1Low/Magic Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 1Low/Pause Screen.jpg b/devtools/SpriteTypeTest/JPGs 1Low/Pause Screen.jpg new file mode 100755 index 0000000..21935ad --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 1Low/Pause Screen.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 1Low/Special Button.jpg b/devtools/SpriteTypeTest/JPGs 1Low/Special Button.jpg new file mode 100755 index 0000000..15d87d6 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 1Low/Special Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 1Low/bounce.py b/devtools/SpriteTypeTest/JPGs 1Low/bounce.py new file mode 100755 index 0000000..76c5fe7 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 1Low/bounce.py @@ -0,0 +1,70 @@ +import sys, pygame, time +pygame.init() + +size = width, height = 600,400 +print "\n\n ---- ---- ---- ---- ---- ---- \nFiltype test - Authors Dave Silverman and Scott Mengel" +print "Set size to 1200 x 900 px" +speed = [2, 2] +black = 255, 255, 255 + +screen = pygame.display.set_mode(size) + +ball = pygame.image.load("1 Button.jpg") +ballrect = ball.get_rect() +i=1 +print "Ball Loaded, collision detection ready, Initiating Loop:" + +# R is the Renewed time +# init is the time started +# tt is the test time, gathered by adding the previous test time with +#the new elapsed time which is test.time()'s difference from init + +r=0 + +start = time.time() + +while 1: + # Homemade switcher for the purpose of selecting which img to load + switcher = { + 1: pygame.image.load("2 Button.jpg"), + 2: pygame.image.load("3 Button.jpg"), + 3: pygame.image.load("4 Button.jpg"), + 4: pygame.image.load("5 Button.jpg"), + 5: pygame.image.load("6 Button.jpg"), + 6: pygame.image.load("7 Button.jpg"), + 7: pygame.image.load("8 Button.jpg"), + 8: pygame.image.load("9 Button.jpg"), + 9: pygame.image.load("1 Button.jpg") + } + ball = switcher.get(i,pygame.image.load("1 Button.jpg")) + + #ball = pygame.Surface(rect.size).convert() + #ball.blit(self.sheet, (0,0), rect) + colorkey = (255, 150, 0) + ball.set_colorkey(colorkey, pygame.RLEACCEL) + + i=i+1 + + if i>9: i=1 + + for event in pygame.event.get(): + if event.type == pygame.QUIT: sys.exit() + + ballrect = ballrect.move(speed) + + if ballrect.left < 0 or ballrect.right > width: + speed[0] = -speed[0] + if ballrect.top < 0 or ballrect.bottom > height: + speed[1] = -speed[1] + + screen.fill(black) + screen.blit(ball, ballrect) + pygame.display.flip() + + r=r+1 + + val=1/((time.time()-start)/r) + print val + print r + if r > 500: + sys.exit(0) diff --git a/devtools/SpriteTypeTest/JPGs 2Medium/0 Button.jpg b/devtools/SpriteTypeTest/JPGs 2Medium/0 Button.jpg new file mode 100755 index 0000000..c7088be --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 2Medium/0 Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 2Medium/1 Button.jpg b/devtools/SpriteTypeTest/JPGs 2Medium/1 Button.jpg new file mode 100755 index 0000000..d0af126 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 2Medium/1 Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 2Medium/2 Button.jpg b/devtools/SpriteTypeTest/JPGs 2Medium/2 Button.jpg new file mode 100755 index 0000000..e715054 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 2Medium/2 Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 2Medium/3 Button.jpg b/devtools/SpriteTypeTest/JPGs 2Medium/3 Button.jpg new file mode 100755 index 0000000..19890e1 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 2Medium/3 Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 2Medium/4 Button.jpg b/devtools/SpriteTypeTest/JPGs 2Medium/4 Button.jpg new file mode 100755 index 0000000..e84480f --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 2Medium/4 Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 2Medium/5 Button.jpg b/devtools/SpriteTypeTest/JPGs 2Medium/5 Button.jpg new file mode 100755 index 0000000..e84ff10 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 2Medium/5 Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 2Medium/6 Button.jpg b/devtools/SpriteTypeTest/JPGs 2Medium/6 Button.jpg new file mode 100755 index 0000000..89bc49f --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 2Medium/6 Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 2Medium/7 Button.jpg b/devtools/SpriteTypeTest/JPGs 2Medium/7 Button.jpg new file mode 100755 index 0000000..2bc2ee6 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 2Medium/7 Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 2Medium/8 Button.jpg b/devtools/SpriteTypeTest/JPGs 2Medium/8 Button.jpg new file mode 100755 index 0000000..c76df24 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 2Medium/8 Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 2Medium/9 Button.jpg b/devtools/SpriteTypeTest/JPGs 2Medium/9 Button.jpg new file mode 100755 index 0000000..ec8118b --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 2Medium/9 Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 2Medium/Attack Button.jpg b/devtools/SpriteTypeTest/JPGs 2Medium/Attack Button.jpg new file mode 100755 index 0000000..74c38a0 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 2Medium/Attack Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 2Medium/Battle Hand.jpg b/devtools/SpriteTypeTest/JPGs 2Medium/Battle Hand.jpg new file mode 100755 index 0000000..8de0e2e --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 2Medium/Battle Hand.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 2Medium/Blank Button.jpg b/devtools/SpriteTypeTest/JPGs 2Medium/Blank Button.jpg new file mode 100755 index 0000000..7dcbb64 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 2Medium/Blank Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 2Medium/Clear Button.jpg b/devtools/SpriteTypeTest/JPGs 2Medium/Clear Button.jpg new file mode 100755 index 0000000..07254a9 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 2Medium/Clear Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 2Medium/Enter Button.jpg b/devtools/SpriteTypeTest/JPGs 2Medium/Enter Button.jpg new file mode 100755 index 0000000..2852505 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 2Medium/Enter Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 2Medium/Hand.jpg b/devtools/SpriteTypeTest/JPGs 2Medium/Hand.jpg new file mode 100755 index 0000000..6640319 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 2Medium/Hand.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 2Medium/Item Button.jpg b/devtools/SpriteTypeTest/JPGs 2Medium/Item Button.jpg new file mode 100755 index 0000000..8fec85d --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 2Medium/Item Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 2Medium/Magic Button.jpg b/devtools/SpriteTypeTest/JPGs 2Medium/Magic Button.jpg new file mode 100755 index 0000000..e46d8a2 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 2Medium/Magic Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 2Medium/Pause Screen.jpg b/devtools/SpriteTypeTest/JPGs 2Medium/Pause Screen.jpg new file mode 100755 index 0000000..2fd3263 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 2Medium/Pause Screen.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 2Medium/Special Button.jpg b/devtools/SpriteTypeTest/JPGs 2Medium/Special Button.jpg new file mode 100755 index 0000000..b721cb5 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 2Medium/Special Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 2Medium/bounce.py b/devtools/SpriteTypeTest/JPGs 2Medium/bounce.py new file mode 100755 index 0000000..aaeab2e --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 2Medium/bounce.py @@ -0,0 +1,70 @@ +import sys, pygame, time +pygame.init() + +size = width, height = 600,400 +print "\n\n ---- ---- ---- ---- ---- ---- \nFiltype test - Authors Dave Silverman and Scott Mengel" +print "Set size to 1200 x 900 px" +speed = [2, 2] +black = 255, 255, 255 + +screen = pygame.display.set_mode(size) + +ball = pygame.image.load("1 Button.jpg") +ballrect = ball.get_rect() +i=1 +print "Ball Loaded, collision detection ready, Initiating Loop:" + +# R is the Renewed time +# init is the time started +# tt is the test time, gathered by adding the previous test time with +#the new elapsed time which is test.time()'s difference from init + +r=0 + +start = time.time() + +while 1: + # Homemade switcher for the purpose of selecting which img to load + switcher = { + 1: pygame.image.load("2 Button.jpg"), + 2: pygame.image.load("3 Button.jpg"), + 3: pygame.image.load("4 Button.jpg"), + 4: pygame.image.load("5 Button.jpg"), + 5: pygame.image.load("6 Button.jpg"), + 6: pygame.image.load("7 Button.jpg"), + 7: pygame.image.load("8 Button.jpg"), + 8: pygame.image.load("9 Button.jpg"), + 9: pygame.image.load("1 Button.jpg") + } + ball = switcher.get(i,pygame.image.load("1 Button.jpg")) + + #ball = pygame.Surface(rect.size).convert() + #ball.blit(self.sheet, (0,0), rect) + colorkey = (255, 156, 0) + ball.set_colorkey(colorkey, pygame.RLEACCEL) + + i=i+1 + + if i>9: i=1 + + for event in pygame.event.get(): + if event.type == pygame.QUIT: sys.exit() + + ballrect = ballrect.move(speed) + + if ballrect.left < 0 or ballrect.right > width: + speed[0] = -speed[0] + if ballrect.top < 0 or ballrect.bottom > height: + speed[1] = -speed[1] + + screen.fill(black) + screen.blit(ball, ballrect) + pygame.display.flip() + + r=r+1 + + val=1/((time.time()-start)/r) + print val + print r + if r > 500: + sys.exit(0) diff --git a/devtools/SpriteTypeTest/JPGs 3High/0 Button.jpg b/devtools/SpriteTypeTest/JPGs 3High/0 Button.jpg new file mode 100755 index 0000000..cb30b94 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 3High/0 Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 3High/1 Button.jpg b/devtools/SpriteTypeTest/JPGs 3High/1 Button.jpg new file mode 100755 index 0000000..3bb39de --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 3High/1 Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 3High/2 Button.jpg b/devtools/SpriteTypeTest/JPGs 3High/2 Button.jpg new file mode 100755 index 0000000..c572485 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 3High/2 Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 3High/3 Button.jpg b/devtools/SpriteTypeTest/JPGs 3High/3 Button.jpg new file mode 100755 index 0000000..fe66efd --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 3High/3 Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 3High/4 Button.jpg b/devtools/SpriteTypeTest/JPGs 3High/4 Button.jpg new file mode 100755 index 0000000..f6f6ecd --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 3High/4 Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 3High/5 Button.jpg b/devtools/SpriteTypeTest/JPGs 3High/5 Button.jpg new file mode 100755 index 0000000..6c65f59 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 3High/5 Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 3High/6 Button.jpg b/devtools/SpriteTypeTest/JPGs 3High/6 Button.jpg new file mode 100755 index 0000000..e7c0309 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 3High/6 Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 3High/7 Button.jpg b/devtools/SpriteTypeTest/JPGs 3High/7 Button.jpg new file mode 100755 index 0000000..fbdf990 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 3High/7 Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 3High/8 Button.jpg b/devtools/SpriteTypeTest/JPGs 3High/8 Button.jpg new file mode 100755 index 0000000..589b12e --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 3High/8 Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 3High/9 Button.jpg b/devtools/SpriteTypeTest/JPGs 3High/9 Button.jpg new file mode 100755 index 0000000..02d2fb0 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 3High/9 Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 3High/Attack Button.jpg b/devtools/SpriteTypeTest/JPGs 3High/Attack Button.jpg new file mode 100755 index 0000000..62051db --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 3High/Attack Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 3High/Battle Hand.jpg b/devtools/SpriteTypeTest/JPGs 3High/Battle Hand.jpg new file mode 100755 index 0000000..8286359 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 3High/Battle Hand.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 3High/Blank Button.jpg b/devtools/SpriteTypeTest/JPGs 3High/Blank Button.jpg new file mode 100755 index 0000000..8b730fd --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 3High/Blank Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 3High/Clear Button.jpg b/devtools/SpriteTypeTest/JPGs 3High/Clear Button.jpg new file mode 100755 index 0000000..a476b7c --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 3High/Clear Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 3High/Enter Button.jpg b/devtools/SpriteTypeTest/JPGs 3High/Enter Button.jpg new file mode 100755 index 0000000..e1cb964 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 3High/Enter Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 3High/Hand.jpg b/devtools/SpriteTypeTest/JPGs 3High/Hand.jpg new file mode 100755 index 0000000..a4aeb75 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 3High/Hand.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 3High/Item Button.jpg b/devtools/SpriteTypeTest/JPGs 3High/Item Button.jpg new file mode 100755 index 0000000..4f0d38a --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 3High/Item Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 3High/Magic Button.jpg b/devtools/SpriteTypeTest/JPGs 3High/Magic Button.jpg new file mode 100755 index 0000000..06ad4c7 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 3High/Magic Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 3High/Pause Screen.jpg b/devtools/SpriteTypeTest/JPGs 3High/Pause Screen.jpg new file mode 100755 index 0000000..e9e87d4 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 3High/Pause Screen.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 3High/Special Button.jpg b/devtools/SpriteTypeTest/JPGs 3High/Special Button.jpg new file mode 100755 index 0000000..fe5a855 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 3High/Special Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 3High/bounce.py b/devtools/SpriteTypeTest/JPGs 3High/bounce.py new file mode 100755 index 0000000..aaeab2e --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 3High/bounce.py @@ -0,0 +1,70 @@ +import sys, pygame, time +pygame.init() + +size = width, height = 600,400 +print "\n\n ---- ---- ---- ---- ---- ---- \nFiltype test - Authors Dave Silverman and Scott Mengel" +print "Set size to 1200 x 900 px" +speed = [2, 2] +black = 255, 255, 255 + +screen = pygame.display.set_mode(size) + +ball = pygame.image.load("1 Button.jpg") +ballrect = ball.get_rect() +i=1 +print "Ball Loaded, collision detection ready, Initiating Loop:" + +# R is the Renewed time +# init is the time started +# tt is the test time, gathered by adding the previous test time with +#the new elapsed time which is test.time()'s difference from init + +r=0 + +start = time.time() + +while 1: + # Homemade switcher for the purpose of selecting which img to load + switcher = { + 1: pygame.image.load("2 Button.jpg"), + 2: pygame.image.load("3 Button.jpg"), + 3: pygame.image.load("4 Button.jpg"), + 4: pygame.image.load("5 Button.jpg"), + 5: pygame.image.load("6 Button.jpg"), + 6: pygame.image.load("7 Button.jpg"), + 7: pygame.image.load("8 Button.jpg"), + 8: pygame.image.load("9 Button.jpg"), + 9: pygame.image.load("1 Button.jpg") + } + ball = switcher.get(i,pygame.image.load("1 Button.jpg")) + + #ball = pygame.Surface(rect.size).convert() + #ball.blit(self.sheet, (0,0), rect) + colorkey = (255, 156, 0) + ball.set_colorkey(colorkey, pygame.RLEACCEL) + + i=i+1 + + if i>9: i=1 + + for event in pygame.event.get(): + if event.type == pygame.QUIT: sys.exit() + + ballrect = ballrect.move(speed) + + if ballrect.left < 0 or ballrect.right > width: + speed[0] = -speed[0] + if ballrect.top < 0 or ballrect.bottom > height: + speed[1] = -speed[1] + + screen.fill(black) + screen.blit(ball, ballrect) + pygame.display.flip() + + r=r+1 + + val=1/((time.time()-start)/r) + print val + print r + if r > 500: + sys.exit(0) diff --git a/devtools/SpriteTypeTest/JPGs 4Max/0 Button.jpg b/devtools/SpriteTypeTest/JPGs 4Max/0 Button.jpg new file mode 100755 index 0000000..7f7680d --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 4Max/0 Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 4Max/1 Button.jpg b/devtools/SpriteTypeTest/JPGs 4Max/1 Button.jpg new file mode 100755 index 0000000..8551018 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 4Max/1 Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 4Max/2 Button.jpg b/devtools/SpriteTypeTest/JPGs 4Max/2 Button.jpg new file mode 100755 index 0000000..6421230 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 4Max/2 Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 4Max/3 Button.jpg b/devtools/SpriteTypeTest/JPGs 4Max/3 Button.jpg new file mode 100755 index 0000000..b32dbb8 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 4Max/3 Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 4Max/4 Button.jpg b/devtools/SpriteTypeTest/JPGs 4Max/4 Button.jpg new file mode 100755 index 0000000..12bbf98 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 4Max/4 Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 4Max/5 Button.jpg b/devtools/SpriteTypeTest/JPGs 4Max/5 Button.jpg new file mode 100755 index 0000000..25577d8 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 4Max/5 Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 4Max/6 Button.jpg b/devtools/SpriteTypeTest/JPGs 4Max/6 Button.jpg new file mode 100755 index 0000000..86600b4 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 4Max/6 Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 4Max/7 Button.jpg b/devtools/SpriteTypeTest/JPGs 4Max/7 Button.jpg new file mode 100755 index 0000000..ed66268 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 4Max/7 Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 4Max/8 Button.jpg b/devtools/SpriteTypeTest/JPGs 4Max/8 Button.jpg new file mode 100755 index 0000000..a7d8ea7 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 4Max/8 Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 4Max/9 Button.jpg b/devtools/SpriteTypeTest/JPGs 4Max/9 Button.jpg new file mode 100755 index 0000000..15c3d40 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 4Max/9 Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 4Max/Attack Button.jpg b/devtools/SpriteTypeTest/JPGs 4Max/Attack Button.jpg new file mode 100755 index 0000000..0e6c7d4 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 4Max/Attack Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 4Max/Battle Hand.jpg b/devtools/SpriteTypeTest/JPGs 4Max/Battle Hand.jpg new file mode 100755 index 0000000..c66747f --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 4Max/Battle Hand.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 4Max/Blank Button.jpg b/devtools/SpriteTypeTest/JPGs 4Max/Blank Button.jpg new file mode 100755 index 0000000..5b29ee1 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 4Max/Blank Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 4Max/Clear Button.jpg b/devtools/SpriteTypeTest/JPGs 4Max/Clear Button.jpg new file mode 100755 index 0000000..05a9f54 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 4Max/Clear Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 4Max/Enter Button.jpg b/devtools/SpriteTypeTest/JPGs 4Max/Enter Button.jpg new file mode 100755 index 0000000..c53c9bb --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 4Max/Enter Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 4Max/Hand.jpg b/devtools/SpriteTypeTest/JPGs 4Max/Hand.jpg new file mode 100755 index 0000000..5c34f67 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 4Max/Hand.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 4Max/Item Button.jpg b/devtools/SpriteTypeTest/JPGs 4Max/Item Button.jpg new file mode 100755 index 0000000..cef3992 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 4Max/Item Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 4Max/Magic Button.jpg b/devtools/SpriteTypeTest/JPGs 4Max/Magic Button.jpg new file mode 100755 index 0000000..8b1b039 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 4Max/Magic Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 4Max/Pause Screen.jpg b/devtools/SpriteTypeTest/JPGs 4Max/Pause Screen.jpg new file mode 100755 index 0000000..7fd0d65 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 4Max/Pause Screen.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 4Max/Special Button.jpg b/devtools/SpriteTypeTest/JPGs 4Max/Special Button.jpg new file mode 100755 index 0000000..694884a --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 4Max/Special Button.jpg Binary files differ diff --git a/devtools/SpriteTypeTest/JPGs 4Max/bounce.py b/devtools/SpriteTypeTest/JPGs 4Max/bounce.py new file mode 100755 index 0000000..db16274 --- /dev/null +++ b/devtools/SpriteTypeTest/JPGs 4Max/bounce.py @@ -0,0 +1,70 @@ +import sys, pygame, time +pygame.init() + +size = width, height = 600,400 +print "\n\n ---- ---- ---- ---- ---- ---- \nFiltype test - Authors Dave Silverman and Scott Mengel" +print "Set size to 1200 x 900 px" +speed = [2, 2] +black = 255, 255, 255 + +screen = pygame.display.set_mode(size) + +ball = pygame.image.load("1 Button.jpg") +ballrect = ball.get_rect() +i=1 +print "Ball Loaded, collision detection ready, Initiating Loop:" + +# R is the Renewed time +# init is the time started +# tt is the test time, gathered by adding the previous test time with +#the new elapsed time which is test.time()'s difference from init + +r=0 + +start = time.time() + +while 1: + # Homemade switcher for the purpose of selecting which img to load + switcher = { + 1: pygame.image.load("2 Button.jpg"), + 2: pygame.image.load("3 Button.jpg"), + 3: pygame.image.load("4 Button.jpg"), + 4: pygame.image.load("5 Button.jpg"), + 5: pygame.image.load("6 Button.jpg"), + 6: pygame.image.load("7 Button.jpg"), + 7: pygame.image.load("8 Button.jpg"), + 8: pygame.image.load("9 Button.jpg"), + 9: pygame.image.load("1 Button.jpg") + } + ball = switcher.get(i,pygame.image.load("1 Button.jpg")) + + #ball = pygame.Surface(rect.size).convert() + #ball.blit(self.sheet, (0,0), rect) + colorkey = (255, 153, 0) + ball.set_colorkey(colorkey, pygame.RLEACCEL) + + i=i+1 + + if i>9: i=1 + + for event in pygame.event.get(): + if event.type == pygame.QUIT: sys.exit() + + ballrect = ballrect.move(speed) + + if ballrect.left < 0 or ballrect.right > width: + speed[0] = -speed[0] + if ballrect.top < 0 or ballrect.bottom > height: + speed[1] = -speed[1] + + screen.fill(black) + screen.blit(ball, ballrect) + pygame.display.flip() + + r=r+1 + + val=1/((time.time()-start)/r) + print val + print r + if r > 500: + sys.exit(0) diff --git a/devtools/SpriteTypeTest/PNGs Indexed/1 Button.png b/devtools/SpriteTypeTest/PNGs Indexed/1 Button.png new file mode 100755 index 0000000..6faafa1 --- /dev/null +++ b/devtools/SpriteTypeTest/PNGs Indexed/1 Button.png Binary files differ diff --git a/devtools/SpriteTypeTest/PNGs Indexed/2 Button.png b/devtools/SpriteTypeTest/PNGs Indexed/2 Button.png new file mode 100755 index 0000000..6abdc88 --- /dev/null +++ b/devtools/SpriteTypeTest/PNGs Indexed/2 Button.png Binary files differ diff --git a/devtools/SpriteTypeTest/PNGs Indexed/3 Button.png b/devtools/SpriteTypeTest/PNGs Indexed/3 Button.png new file mode 100755 index 0000000..5481253 --- /dev/null +++ b/devtools/SpriteTypeTest/PNGs Indexed/3 Button.png Binary files differ diff --git a/devtools/SpriteTypeTest/PNGs Indexed/4 Button.png b/devtools/SpriteTypeTest/PNGs Indexed/4 Button.png new file mode 100755 index 0000000..9da909e --- /dev/null +++ b/devtools/SpriteTypeTest/PNGs Indexed/4 Button.png Binary files differ diff --git a/devtools/SpriteTypeTest/PNGs Indexed/5 Button.png b/devtools/SpriteTypeTest/PNGs Indexed/5 Button.png new file mode 100755 index 0000000..2ce9ba6 --- /dev/null +++ b/devtools/SpriteTypeTest/PNGs Indexed/5 Button.png Binary files differ diff --git a/devtools/SpriteTypeTest/PNGs Indexed/6 Button.png b/devtools/SpriteTypeTest/PNGs Indexed/6 Button.png new file mode 100755 index 0000000..a280c37 --- /dev/null +++ b/devtools/SpriteTypeTest/PNGs Indexed/6 Button.png Binary files differ diff --git a/devtools/SpriteTypeTest/PNGs Indexed/7 Button.png b/devtools/SpriteTypeTest/PNGs Indexed/7 Button.png new file mode 100755 index 0000000..3c91653 --- /dev/null +++ b/devtools/SpriteTypeTest/PNGs Indexed/7 Button.png Binary files differ diff --git a/devtools/SpriteTypeTest/PNGs Indexed/8 Button.png b/devtools/SpriteTypeTest/PNGs Indexed/8 Button.png new file mode 100755 index 0000000..c9acde9 --- /dev/null +++ b/devtools/SpriteTypeTest/PNGs Indexed/8 Button.png Binary files differ diff --git a/devtools/SpriteTypeTest/PNGs Indexed/9 Button.png b/devtools/SpriteTypeTest/PNGs Indexed/9 Button.png new file mode 100755 index 0000000..7ffd035 --- /dev/null +++ b/devtools/SpriteTypeTest/PNGs Indexed/9 Button.png Binary files differ diff --git a/devtools/SpriteTypeTest/PNGs Indexed/bounce.py b/devtools/SpriteTypeTest/PNGs Indexed/bounce.py new file mode 100755 index 0000000..df34a0e --- /dev/null +++ b/devtools/SpriteTypeTest/PNGs Indexed/bounce.py @@ -0,0 +1,70 @@ +import sys, pygame, time +pygame.init() + +size = width, height = 600,400 +print "\n\n ---- ---- ---- ---- ---- ---- \nFiltype test - Authors Dave Silverman and Scott Mengel" +print "Set size to 1200 x 900 px" +speed = [2, 2] +black = 255, 255, 255 + +screen = pygame.display.set_mode(size) + +ball = pygame.image.load("1 Button.png") +ballrect = ball.get_rect() +i=1 +print "Ball Loaded, collision detection ready, Initiating Loop:" + +# R is the Renewed time +# init is the time started +# tt is the test time, gathered by adding the previous test time with +#the new elapsed time which is test.time()'s difference from init + +r=0 + +start = time.time() + +while 1: + # Homemade switcher for the purpose of selecting which img to load + switcher = { + 1: pygame.image.load("2 Button.png"), + 2: pygame.image.load("3 Button.png"), + 3: pygame.image.load("4 Button.png"), + 4: pygame.image.load("5 Button.png"), + 5: pygame.image.load("6 Button.png"), + 6: pygame.image.load("7 Button.png"), + 7: pygame.image.load("8 Button.png"), + 8: pygame.image.load("9 Button.png"), + 9: pygame.image.load("1 Button.png") + } + ball = switcher.get(i,pygame.image.load("1 Button.png")) + + #ball = pygame.Surface(rect.size).convert() + #ball.blit(self.sheet, (0,0), rect) + colorkey = (255, 153, 0) + ball.set_colorkey(colorkey, pygame.RLEACCEL) + + i=i+1 + + if i>9: i=1 + + for event in pygame.event.get(): + if event.type == pygame.QUIT: sys.exit() + + ballrect = ballrect.move(speed) + + if ballrect.left < 0 or ballrect.right > width: + speed[0] = -speed[0] + if ballrect.top < 0 or ballrect.bottom > height: + speed[1] = -speed[1] + + screen.fill(black) + screen.blit(ball, ballrect) + pygame.display.flip() + + r=r+1 + + val=1/((time.time()-start)/r) + print val + print r + if r > 500: + sys.exit(0) diff --git a/devtools/SpriteTypeTest/PNGs Transparent/1 Button.png b/devtools/SpriteTypeTest/PNGs Transparent/1 Button.png new file mode 100755 index 0000000..dab1239 --- /dev/null +++ b/devtools/SpriteTypeTest/PNGs Transparent/1 Button.png Binary files differ diff --git a/devtools/SpriteTypeTest/PNGs Transparent/2 Button.png b/devtools/SpriteTypeTest/PNGs Transparent/2 Button.png new file mode 100755 index 0000000..56312a7 --- /dev/null +++ b/devtools/SpriteTypeTest/PNGs Transparent/2 Button.png Binary files differ diff --git a/devtools/SpriteTypeTest/PNGs Transparent/3 Button.png b/devtools/SpriteTypeTest/PNGs Transparent/3 Button.png new file mode 100755 index 0000000..4ceb540 --- /dev/null +++ b/devtools/SpriteTypeTest/PNGs Transparent/3 Button.png Binary files differ diff --git a/devtools/SpriteTypeTest/PNGs Transparent/4 Button.png b/devtools/SpriteTypeTest/PNGs Transparent/4 Button.png new file mode 100755 index 0000000..38d640a --- /dev/null +++ b/devtools/SpriteTypeTest/PNGs Transparent/4 Button.png Binary files differ diff --git a/devtools/SpriteTypeTest/PNGs Transparent/5 Button.png b/devtools/SpriteTypeTest/PNGs Transparent/5 Button.png new file mode 100755 index 0000000..dcc14d4 --- /dev/null +++ b/devtools/SpriteTypeTest/PNGs Transparent/5 Button.png Binary files differ diff --git a/devtools/SpriteTypeTest/PNGs Transparent/6 Button.png b/devtools/SpriteTypeTest/PNGs Transparent/6 Button.png new file mode 100755 index 0000000..cb2f933 --- /dev/null +++ b/devtools/SpriteTypeTest/PNGs Transparent/6 Button.png Binary files differ diff --git a/devtools/SpriteTypeTest/PNGs Transparent/7 Button.png b/devtools/SpriteTypeTest/PNGs Transparent/7 Button.png new file mode 100755 index 0000000..497ed6f --- /dev/null +++ b/devtools/SpriteTypeTest/PNGs Transparent/7 Button.png Binary files differ diff --git a/devtools/SpriteTypeTest/PNGs Transparent/8 Button.png b/devtools/SpriteTypeTest/PNGs Transparent/8 Button.png new file mode 100755 index 0000000..693ac1e --- /dev/null +++ b/devtools/SpriteTypeTest/PNGs Transparent/8 Button.png Binary files differ diff --git a/devtools/SpriteTypeTest/PNGs Transparent/9 Button.png b/devtools/SpriteTypeTest/PNGs Transparent/9 Button.png new file mode 100755 index 0000000..e83b570 --- /dev/null +++ b/devtools/SpriteTypeTest/PNGs Transparent/9 Button.png Binary files differ diff --git a/devtools/SpriteTypeTest/PNGs Transparent/bounce.py b/devtools/SpriteTypeTest/PNGs Transparent/bounce.py new file mode 100755 index 0000000..284947c --- /dev/null +++ b/devtools/SpriteTypeTest/PNGs Transparent/bounce.py @@ -0,0 +1,65 @@ +import sys, pygame, time +pygame.init() + +size = width, height = 600,400 +print "\n\n ---- ---- ---- ---- ---- ---- \nFiltype test - Authors Dave Silverman and Scott Mengel" +print "Set size to 1200 x 900 px" +speed = [2, 2] +black = 255, 255, 255 + +screen = pygame.display.set_mode(size) + +ball = pygame.image.load("1 Button.png") +ballrect = ball.get_rect() +i=1 +print "Ball Loaded, collision detection ready, Initiating Loop:" + +# R is the Renewed time +# init is the time started +# tt is the test time, gathered by adding the previous test time with +#the new elapsed time which is test.time()'s difference from init + +r=0 + +start = time.time() + +while 1: + # Homemade switcher for the purpose of selecting which img to load + switcher = { + 1: pygame.image.load("2 Button.png"), + 2: pygame.image.load("3 Button.png"), + 3: pygame.image.load("4 Button.png"), + 4: pygame.image.load("5 Button.png"), + 5: pygame.image.load("6 Button.png"), + 6: pygame.image.load("7 Button.png"), + 7: pygame.image.load("8 Button.png"), + 8: pygame.image.load("9 Button.png"), + 9: pygame.image.load("1 Button.png") + } + ball = switcher.get(i,pygame.image.load("1 Button.png")) + + i=i+1 + + if i>9: i=1 + + for event in pygame.event.get(): + if event.type == pygame.QUIT: sys.exit() + + ballrect = ballrect.move(speed) + + if ballrect.left < 0 or ballrect.right > width: + speed[0] = -speed[0] + if ballrect.top < 0 or ballrect.bottom > height: + speed[1] = -speed[1] + + screen.fill(black) + screen.blit(ball, ballrect) + pygame.display.flip() + + r=r+1 + + val=1/((time.time()-start)/r) + print val + print r + if r > 500: + sys.exit(0) diff --git a/devtools/SpriteTypeTest/spriteTest.py b/devtools/SpriteTypeTest/spriteTest.py new file mode 100644 index 0000000..71d39fd --- /dev/null +++ b/devtools/SpriteTypeTest/spriteTest.py @@ -0,0 +1,112 @@ +import sys, pygame, time +pygame.init() + +print "Full Test - Authors Dave Silverman and Scott Mengel" +print "Set size to 600 x 400 px" +print "Running..." + +#-------------------------------------------------------------- +#CONSTANTS AND VARIABLES + +make=input("How many images would you like to load? ") +img={} +ft="" #filetype +r=0 #frame refreshes +i=1 #cycles images +size = width, height = 600,400 #screen sizes +t=0 #trial number n +colorkey=(255, 152, 0) + +ftArr=[ ["bmp","BMPs 16-Bits/"] , ["bmp","BMPs 24-Bits/"] , ["bmp","BMPs 32-Bits/"] , ["gif","GIFs/"] , ["gif","GIFs Transparent/"] , ["jpg","JPGs 1Low/"] , ["jpg","JPGs 2Medium/"] , ["jpg","JPGs 3High/"] , ["jpg","JPGs 4Max/"] , ["png","PNGs Indexed/"] , ["png","PNGs Transparent/"] ] + +screen = pygame.display.set_mode(size) #Screen Set 600x400 +background = 152, 251, 152 # pale green + +#The switch function +#------------------------------------------------------------- +def chngImg(): + cnt=make + while cnt>0: + switcher = { + 1: pygame.image.load("%s2 Button.%s"%(ft[1],ft[0])), + 2: pygame.image.load("%s3 Button.%s"%(ft[1],ft[0])), + 3: pygame.image.load("%s4 Button.%s"%(ft[1],ft[0])), + 4: pygame.image.load("%s5 Button.%s"%(ft[1],ft[0])), + 5: pygame.image.load("%s6 Button.%s"%(ft[1],ft[0])), + 6: pygame.image.load("%s7 Button.%s"%(ft[1],ft[0])), + 7: pygame.image.load("%s8 Button.%s"%(ft[1],ft[0])), + 8: pygame.image.load("%s9 Button.%s"%(ft[1],ft[0])), + 9: pygame.image.load("%s1 Button.%s"%(ft[1],ft[0])) + } + img[cnt,0]=switcher.get(i,pygame.image.load("%s1 Button.%s"%(ft[1],ft[0]))) + #img[cnt,0].set_colorkey(colorkey, pygame.RLEACCEL) + #img[cnt,0].resize(200,200) this is for resizing an image + #pygame.transform.scale(img[cnt,0],(200, 200)) + img[cnt,0] = pygame.transform.scale(img[cnt,0],(20, 20)) + cnt=cnt-1 +#----------------------------------------------------------------- +#Collision detection + +def collision(): + cnt=make + while cnt>0: + if img[cnt,1].left < 0 or img[cnt,1].right > width: + img[cnt,2]=[ -img[cnt,2][0], img[cnt,2][1] ] + if img[cnt,1].top < 0 or img[cnt,1].bottom > height: + img[cnt,2]=[ img[cnt,2][0], -img[cnt,2][1] ] + img[cnt,1] = img[cnt,1].move(img[cnt,2]) + screen.blit(img[cnt,0],img[cnt,1]) + cnt=cnt-1 + pygame.display.flip() +#----------------------------------------------------------------- +#----------------------------------------------------------------- +#----------------------------------------------------------------- +#----------------------------------------------------------------- +while 1: + cnt=make + ft=ftArr[t] + print "Testing "+ft[1]+"N Button."+ft[0] + trial=5 + while trial>0: + while cnt>0: + img[cnt,0]= pygame.image.load("%s1 Button.%s"%(ft[1],ft[0])) #image.load + img[cnt,0] = pygame.transform.scale(img[cnt,0],(20, 20)) + img[cnt,1]= img[cnt,0].get_rect() + img[cnt,2]= [2,2] #speed + m=cnt*40 # named m cause i wanted some m&ms + img[cnt,1]=img[cnt,1].move(m,m) #see? it wasn't as tastey though + cnt=cnt-1 + r=0 + start=time.time() +# ----------------------------------------------------------------- + while 1: + chngImg() + i=i+1 + if i>9: i=1 + + for event in pygame.event.get(): + if event.type == pygame.QUIT: sys.exit() + +# speed1=collision(ballrect1,speed1) +# ballrect1 = ballrect1.move(speed1) + + collision() + screen.fill(background) + +# cnt=make +# while cnt>0: +# screen.blit(ball1, ballrect1) +# screen.blit(img[cnt,0],img[cnt,1]) +# cnt=cnt-1 +# +# pygame.display.flip() + + r=r+1 + if r>500: break + +# ----------------------------------------------------------------- +# ----------------------------------------------------------------- + + print 1/((time.time()-start)/r) + trial=trial-1 + t=t+1 -- cgit v0.9.1