ShapeInvaders Mac OS

broken image


Apple graphics arcade game design (stanton)catalog disk volume 254.i 005 applesoft a 005 hello.a 004 relocate applesoft.a 004 page flip.a 015 shape maker.a 003 shape msr.b 029 breakout.s.b 006 breakout.b 004 plot triangle.s.b 002 plot triangle.a 005 bird test.b 005 plot bird shape.s.b 002 plot bird shape.b 007 move hploted bird.s.b 002 move hploted bird.b 004 plot 2 apple. For System 6.x - Mac OS 9 Emulation This game works with: SheepShaver, Basilisk II, Mini vMac. Very nice version of the classic, well polished. And one of my favorites! (v2.0) Compatibility Architecture: 68k Comments. By MikeTomTom - 2012, April 11 - 9:24pm YW. I used to enjoy this one on my Quadra 630 back in the day when both were new. Space Invaders is a classic arcade video game released in 1978 and manufactured by Taito in Japan. The game was later on licensed for the United States by Midway.

  1. Shape Invaders Mac Os 11
Shape invaders mac os x
Jul 3rd, 2018
Never
Not a member of Pastebin yet?Sign Up, it unlocks many cool features!
Mac
Jul 3rd, 2018
Never
Not a member of Pastebin yet?Sign Up, it unlocks many cool features!
  1. #Set up the screen
  2. importturtle
  3. importmath
  4. wn =turtle.Screen()
  5. wn.title('Space Invaders')
  6. #Draw border
  7. border_pen.speed(0)
  8. border_pen.penup()
  9. border_pen.pendown()
  10. for side inrange(4):
  11. border_pen.lt(90)
  12. player =turtle.Turtle()
  13. player.shape('triangle')
  14. player.speed(0)
  15. player.setheading(90)
  16. playerspeed =15
  17. enemy =turtle.Turtle()
  18. enemy.shape('circle')
  19. enemy.speed(0)
  20. bullet =turtle.Turtle()
  21. bullet.shape('triangle')
  22. bullet.speed(0)
  23. bullet.shapesize(0.5,0.5)
  24. #ready - ready to fire
  25. bulletstate ='ready'
  26. #move the player left and right
  27. x = player.xcor()
  28. if x < -280:
  29. player.setx(x)
  30. x = player.xcor()
  31. if x >280:
  32. player.setx(x)
  33. def fire_bullet():
  34. #Declare Bullet state as global if it needs changed
  35. if bulletstate 'ready':
  36. #move the bullet just above the player
  37. y = player.ycor() + 10
  38. bullet.showturtle()
  39. def isCollision(t1, t2):
  40. d =math.sqrt(math.pow(t1.xcor()-t2.xcor(),2) + math.pow(t1.ycor()-t2.ycor(),2))
  41. returnTrue
  42. returnFalse
  43. #Set keyboard bindings
  44. turtle.onkey(move_right,'Right')
  45. turtle.onkey(fire_bullet,'space')
  46. whileTrue:
  47. #move the enemy
  48. x += enemyspeed
  49. if enemy.xcor()>280:
  50. y -=40
  51. enemy.sety(y)
  52. if enemy.xcor()< -280:
  53. y -=40
  54. enemy.sety(y)
  55. y = bullet.ycor()
  56. bullet.sety(y)
  57. #Check if the bullet has gone to the top
  58. bullet.hideturtle()
  59. #Check for collision between the bullet and the enemy
  60. #Reset the bullet
  61. bulletstate ='ready'
  62. #Reset the enemy
RAW Paste Data

Shape Invaders Mac Os 11

#Space Invaders - Part 1 #Set up the screen #Python 2.7 on Mac import turtle import os import math #Set up the screen wn = turtle.Screen() wn.bgcolor('black') wn.title('Space Invaders') #Draw border border_pen = turtle.Turtle() border_pen.speed(0) border_pen.color('white') border_pen.penup() border_pen.setposition(-300,-300) border_pen.pendown() border_pen.pensize(3) for side in range(4): border_pen.fd(600) border_pen.lt(90) border_pen.hideturtle() #Ceate the playerurtle player = turtle.Turtle() player.color('blue') player.shape('triangle') player.penup() player.speed(0) player.setposition(0, -250) player.setheading(90) playerspeed = 15 #Create the enemy enemy = turtle.Turtle() enemy.color('red') enemy.shape('circle') enemy.penup() enemy.speed(0) enemy.setposition(-200, 250) enemyspeed = 2 #create the player bullet bullet = turtle.Turtle() bullet.color('yellow') bullet.shape('triangle') bullet.penup() bullet.speed(0) bullet.setheading(90) bullet.shapesize(0.5, 0.5) bullet.hideturtle() bulletspeed = 20 #Define bullet state #ready - ready to fire #fire - bullet is firing bulletstate = 'ready' #move the player left and right def move_left(): x = player.xcor() x -= playerspeedss if x < -280: x = - 280 player.setx(x) def move_right(): x = player.xcor() x += playerspeed if x > 280: x = 280 player.setx(x) def fire_bullet(): #Declare Bullet state as global if it needs changed global bulletstate if bulletstate 'ready': bulletstate = 'fire' #move the bullet just above the player x = player.xcor() y = player.ycor() + 10 bullet.setposition(x, y) bullet.showturtle() def isCollision(t1, t2): d = math.sqrt(math.pow(t1.xcor()-t2.xcor(),2) + math.pow(t1.ycor()-t2.ycor(),2)) if d < 20: return True else: return False #Set keyboard bindings turtle.listen() turtle.onkey(move_right, 'Right') turtle.onkey(move_left, 'Left') turtle.onkey(fire_bullet, 'space') #main game loop while True: #move the enemy x = enemy.xcor() x += enemyspeed enemy.setx(x) #Move the enemy back and down if enemy.xcor() > 280: y = enemy.ycor() y -= 40 enemyspeed *= -1 enemy.sety(y) if enemy.xcor() < -280: y = enemy.ycor() y -= 40 enemyspeed *= -1 enemy.sety(y) #move the bullet y = bullet.ycor() y += bulletspeed bullet.sety(y) #Check if the bullet has gone to the top if bullet.ycor() > 275: bullet.hideturtle() bulletstate = 'ready' #Check for collision between the bullet and the enemy if isCollision(bullet, enemy): #Reset the bullet bullet.hideturtle() bulletstate = 'ready' bullet.setposition(0, -400) #Reset the enemy enemy.setposition(-200, 250) delay =turtle.mainloop() ('Press enter to finsh.')



broken image