Jump to content

Starwhip

Members
  • Posts

    3,650
  • Joined

  • Last visited

Everything posted by Starwhip

  1. This and this alone is the reason I'd like to have in-flight action group configuration. Could we also get a debug menu cheat where we can edit fuel levels, light colors, stuff like that?
  2. Ouch. I doubt that KSP modders will ever resort to charging money, because once they do, nobody will get their mod. Someone else will probably copy them too. (Not literally copying them, but publishing a similar mod)
  3. :facedesk: This thing is not* going to survive the switch to 1.0... *Maybe it will, but logic says no.
  4. My wall was the navball. In the demo, when I started playing, I had to do the moon landing by eye. Once I figured out the navball, rendezvous and docking was the next wall. But it passed quickly enough. I still can't do SSTO VTOLs, but hey, who needs those? *creepy addict voice* I do. I need them so bad! Welcome to the forum, AlexClark!
  5. 10/10 Ludicrous Speed light.
  6. When you fill the Twitch stream chat box with commas or periods when you try and timewarp.
  7. [Rerailing in progress...] Do not land on the Magic Boulder after midnight.
  8. I still haven't gotten around to reading this whole thing through. Soon, soon.
  9. 5 - Spore. Despite the disappointment of the finished product, it was a fun game. 4 - Morrowind. Third game in the Elder Scrolls series. Had more than my share of fun moddimg that game. 3 - Mariokart DS. My friends and I had so much fun with that game. 2 - Skyrim. I have played this one for a little while. Lots of fun, modding is hard. But I'm learning. 1 - Emperor: Battle for Dune. Still my favorite game of all time. Ten years and I still haven't won.
  10. This is short because I'm on mobile. More coming this weekend, for sure! CHAPTER FIVE: The Other Side of the Glass Jeb drifted slowly through the dark emptiness of space toward the communications antenna. He had a set of tools attached to his EVA suit on a strap, each one secured by a cable of decent length. Carefully, he manipulated the joysticks that controlled his thruster pack. Jeb floated closer still, and he readied himself to grab hold of the small rung near the base of the craft placed there for exactly this purpose. Giving the joysticks a last push, he reached out with both arms... Gene was aroused from his half-sleep by a slowly blinking amber light. Frowning, he leaned forward over the control panel, attracting the attention of Wernher and Bill, who stopped their hushed conversation. "What's that light, Gene?" Bill walked over to the comtrol station and cast his gaze on the light. "Not sure, Bill. It's new. Let's see here..." He traced a faint white identification number with his finger, then turned to the manual on his left. Running through it, he quickly found what he was looking for. Gene let out a short gasp. "Autopilot status light," Gene read in a hurried voice. "It's executing a program!"
  11. I have to agree with this. Rockets are nice and convenient and all, but successfully making an SSTO is one of the best feelings. I made one that had a payload fraction of 60%. It was great. Never underestimate rockets, though. They can do everything an SSTO spaceplane can do. And SSTO spaceplanes can do everything rockets can do. It just might require more time...
  12. Well, think about it. "Missing for far too long" doesn't mean it was never there. I say they're bringing the Boulder back.
  13. Sounds so much better when read in a turret voice. Welcome aboard!
  14. After a few minutes of screwing around with the gizmos, I created this. Reconnaissance Air Ship No.909 "Kyrian Wing" A quirky little aircraft, it was built to be disguised as a bird of prey when at surveillance altitude. However, Kerbin's utter lack of birds, or any wildlife, for that matter, quickly shoved this project on the back burner for the Kerbal Media's spy program. It remains a quality aircraft, however, fully functional in all regards. Tailstrikes are virtually impossible, thanks to Tail-Gear Embeddingtm technology. It can get to a decent altitude as well. Just be careful when leveling out... it's a beast to turn at high altitudes. The down-angled cockpit ends up with quite a nice design feature: not only can you see the runway better when landing, but pointing your level indicator at the horizon actually keeps you going upwards, instead of leaving you sinking into the deep blue of Kerbin's seas, or the jagged peaks of the nearest mountain. DOWNLOAD LINK
  15. Test: Fifth Grade. Multiple Choice Section. I am NOT making this up. There was a question that asked I answered "rock" or something. Apparently, the "correct" answer was, fire. What the what...
  16. I'll raise a glass so that Squad can raise the bar. Keep it up! :HailProbe:
  17. While we're on the subject of readability, I do love Python's interface and language. Nice and simple for beginners, yet has the higher-level operations that experienced programmers use. However, if you are not careful, you can easily turn any program into a mess. import pygame,random,time,sys from pygame.locals import* pygame.init() mainClock=pygame.time.Clock() FPS=100 def drawText(text,font,surface,x,y): textobj=font.render(text,1,TEXTCOLOR) textrect=textobj.get_rect() textrect.topleft=(x,y) surface.blit(textobj,textrect) font=pygame.font.SysFont(None,30) WHITE=(255,255,255) GREEN=(0,255,0) BLUE=(0,0,225) RED=(255,0,0) BLACK=(0,0,0) YELLOW=(255,255,0) TEXTCOLOR=(WHITE) WINDOWHIGHT=768 WINDOWWIDTH=1366 SCORE=0 BADDIEMINSPEED=3 BADDIEMAXSPEED=10 ADDNEWBADDIERATE=20 ADDSUPERBADDIERATE=150 BADDIEMINSIZE=10 BADDIEMAXSIZE=50 ROCKETSPEED=7 ADDNEWROCKETRATE=8 ROCKETSIZE=7 PULSESPEED=10 ADDNEWPULSERATE=25 PULSESIZE=30 MINESIZE=25 ADDNEWMINERATE=20 SUPERSIZE=50 NEWPOINTSQUARE=50 POINTSQUARESIZE=20 SPECIALPOINTSQUARE=500 DIFFCOUNTER = 0 def terminate(): pygame.quit() sys.exit() def playerhitbaddie(playerRect,baddies): global player1Health for b in baddies: if doRectsOverlap(b['rect'],playerRect): baddies.remove( player1Health-=1 return player1Health def playerhitsuperbaddie(playerRect,superbaddies): global player1Health for s in superbaddies: if doRectsOverlap(s['rect'],playerRect): superbaddies.remove(s) player1Health-=1 return player1Health def player2hitbaddie(player2Rect,baddies): global player2Health for b in baddies: if doRectsOverlap(b['rect'],player2Rect): baddies.remove( player2Health-=1 return player2Health def player2hitsuperbaddie(player2Rect,superbaddies): global player2Health for s in superbaddies: if doRectsOverlap(s['rect'],player2Rect): superbaddies.remove(s) player2Health-=1 return player2Health def rocket2hitbaddie(rockets2,baddies): global SCORE for r in rockets2: for t in baddies: if doRectsOverlap(r['rect'],t['rect']): rockets2.remove(r) baddies.remove(t) SCORE+=1 return SCORE def pulse2hitbaddie(pulses2,baddies): global SCORE for p in pulses2: for t in baddies: if doRectsOverlap(p['rect'],t['rect']): baddies.remove(t) SCORE+=1 return SCORE def pulse2hitsuperbaddie(pulses2,superbaddies): global SCORE for p in pulses2: for t in superbaddies: if doRectsOverlap(p['rect'],t['rect']): superbaddies.remove(t) SCORE+=10 return SCORE def rockethitbaddie(rockets,baddies): global SCORE for r in rockets: for t in baddies: if doRectsOverlap(r['rect'],t['rect']): rockets.remove(r) baddies.remove(t) SCORE+=1 return SCORE def pulsehitbaddie(pulses,baddies): global SCORE for p in pulses: for t in baddies: if doRectsOverlap(p['rect'],t['rect']): baddies.remove(t) SCORE+=1 return SCORE def minehitsuperbaddie(mines,superbaddies): for m in mines: for t in superbaddies: if doRectsOverlap(m['rect'],t['rect']): mineImage=pygame.image.load("C:/Python31/python images/mineExp1.png") def pulsehitsuperbaddie(pulses,superbaddies): global SCORE for p in pulses: for t in superbaddies: if doRectsOverlap(p['rect'],t['rect']): superbaddies.remove(t) SCORE+=10 return SCORE def waitForPlayerToPressKey(): while True: for event in pygame.event.get(): if event.type==MOUSEBUTTONDOWN: return if event.type==QUIT: terminate() if event.type==KEYDOWN: if event.key==K_ESCAPE: terminate() return def doRectsOverlap(rect1,rect2): for a,b in [(rect1,rect2),(rect2,rect1)]: #check if a's corners are inside b if ((isPointInsideRect(a.left,a.top,)or (isPointInsideRect(a.left,a.bottom,)or (isPointInsideRect(a.right,a.top,)or (isPointInsideRect(a.right,a.bottom,)): return True return False def isPointInsideRect(x,y,rect): if(x > rect.left) and (x < rect.right) and (y > rect.top) and (y < rect.bottom): return True else: return False window1=pygame.display.set_mode((WINDOWWIDTH,WINDOWHIGHT),pygame.FULLSCREEN) window1.fill(BLACK) pygame.mouse.set_visible(False) pygame.display.update() playerImage=pygame.image.load("C:/Python31/python images/ShipImage.png") playerRect=playerImage.get_rect() player1Sign=pygame.image.load("C:/Python31/python images/ShipImage.png") player1Rect=playerImage.get_rect() player2Image=pygame.image.load("C:/Python31/python images/ShipImage2.png") player2Rect=playerImage.get_rect() player2Sign=pygame.image.load("C:/Python31/python images/ShipImage2.png") player2SignRect=player2Sign.get_rect() baddieImage=pygame.image.load("C:/Python31/python images/asteroid.png") superBaddieImage=pygame.image.load("C:/Python31/python images/super asteroid.png") pulseImage=pygame.image.load("C:/Python31/python images/pulse image.png") pulseSign=pygame.image.load("C:/Python31/python images/pulse image.png") pulseRect=pulseSign.get_rect() rocketSign=pygame.image.load("C:/Python31/python images/rocket.png") rocketRect=rocketSign.get_rect() rocketImage=pygame.image.load("C:/Python31/python images/rocket.png") pulse2Image=pygame.image.load("C:/Python31/python images/pulse image.png") pulse2Sign=pygame.image.load("C:/Python31/python images/pulse image.png") pulse2Rect=pulseSign.get_rect() rocket2Sign=pygame.image.load("C:/Python31/python images/rocket.png") rocket2Rect=rocketSign.get_rect() rocket2Image=pygame.image.load("C:/Python31/python images/rocket.png") mineExpImage=pygame.image.load("C:/Python31/python images/mineExp1.png") mineImage=pygame.image.load("C:/Python31/python images/mineImage.png") pointSquareImage=pygame.image.load("C:/Python31/python images/pointSquareImage.png") pointSquareImage2=pygame.image.load("C:/Python31/python images/pointSquareImage2.png") StartUpScreen=pygame.image.load("C:/Python31/python images/dodgerStartupScreen.png") StartUpRect=StartUpScreen.get_rect() pygame.display.update() MOVESPEED=4 startUpMusic=pygame.mixer.Sound("C:/Python31/python/FSX06.wav") backgroundMusic=pygame.mixer.Sound("C:/Python31/python/FSX02.wav") backgroundMusic2=pygame.mixer.Sound("C:/Python31/python/FSX08.wav") explosionSound=pygame.mixer.Sound("C:/Python31/python/Exp_OilRig02.wav") pickUpSound=pygame.mixer.Sound("C:/Python31/python/sbitmsel.wav") startUpMusic.play() StartUpRect.topleft=(300,WINDOWHIGHT/2) window1.blit(StartUpScreen,StartUpRect) drawText('Asteroid Frontier',font,window1,(WINDOWWIDTH/3),(WINDOWHIGHT/3)) pygame.display.update() time.sleep(.5) drawText('Press any key to start',font,window1,(WINDOWWIDTH/3)-30,(WINDOWHIGHT/3)+50) pygame.display.update() waitForPlayerToPressKey() startUpMusic.stop() window1.fill(BLACK) def Intro(): startUpMusic.play() drawText('The Red Squares are ammunition. Collect to replenish rockets and pulses',font,window1,(WINDOWWIDTH/3),(WINDOWHIGHT/3)-50) pygame.display.update() time.sleep(.2) drawText('The blue Squares are worth points',font,window1,(WINDOWWIDTH/3),(WINDOWHIGHT/3)) pygame.display.update() time.sleep(.2) drawText('The asteroids will destroy your Ship, avoid them at all costs',font,window1,(WINDOWWIDTH/3),(WINDOWHIGHT/3)+50) pygame.display.update() time.sleep(.2) drawText('The flaming asteroids are unaffected by rockets',font,window1,(WINDOWWIDTH/3),(WINDOWHIGHT/3)+100) pygame.display.update() time.sleep(.2) drawText('P1: use arrow keys to move, n to fire rockets and SPACEBAR to fire pulses',font,window1,(WINDOWWIDTH/3)-50,(WINDOWHIGHT/3)+150) drawText('P2: use WASD keys to move, q to fire rockets and Tab to fire pulses',font,window1,(WINDOWWIDTH/3),(WINDOWHIGHT/3)+170) pygame.display.update() time.sleep(.2) drawText('Good Luck!',font,window1,(WINDOWWIDTH/3),(WINDOWHIGHT/3)+220) pygame.display.update() waitForPlayerToPressKey() startUpMusic.stop() topScore=0 pointSquarecounter=0 specialFoodCounter=0 while True: file_path='C:\\Python31\\python\\dodger high scores.txt' file=open(file_path,"r") for line in file: topScore=line topScore=float(topScore) file.close() rocketlimit=20 pulselimit=10 rocketlimit2=20 pulselimit2=10 minelimit=1000 mines=[] mineaddcounter=5 pointSquares=[] specialFoods=[] baddies=[] superbaddies=[] DriftA = 0 rockets=[] pulses=[] pulseaddcounter=0 rocketaddcounter=0 Drift = 0 rockets2=[] pulses2=[] pulseaddcounter2=0 rocketaddcounter2=0 baddieaddcounter=0 superbaddiecounter=0 playerRect.topleft=((WINDOWWIDTH/2)-50,WINDOWHIGHT-50) player2Rect.topleft=((WINDOWWIDTH/2)+50,WINDOWHIGHT-50) player1Rect.topleft=(WINDOWWIDTH-70,WINDOWHIGHT-190) player2SignRect.topleft=(0,WINDOWHIGHT-190) rocketRect.topleft=(10,WINDOWHIGHT-90) pulseRect.topleft=(0,WINDOWHIGHT-40) rocket2Rect.topleft=(WINDOWWIDTH-120,WINDOWHIGHT-90) pulse2Rect.topleft=(WINDOWWIDTH-130,WINDOWHIGHT-40) moveLeft=moveLeft2=moveRight=moveRight2=moveUp=moveUp2=moveDown=moveDown2=False reverseCheat=slowCheat=invincibleCheat=pauseCheat=rocketFiring=pulseFiring=mineFiring=rocketFiring2=pulseFiring2=player1IsDead=player2IsDead=False intro=True player1Health=5 player2Health=5 SCORE=0 ADDSUPERBADDIERATE=200 ADDNEWBADDIERATE = 30 DIFFCOUNTER = 0 while True: SCORE+=.01 if intro==True: Intro() intro=False backgroundMusic.play() for event in pygame.event.get(): if event.type==QUIT: terminate() if event.type==KEYDOWN: if event.key==K_RALT: mineFiring=True if event.key==ord('['): rocketFiring=True if event.key==ord(']'): pulseFiring=True if event.key==ord('q'): rocketFiring2=True if event.key==K_TAB: pulseFiring2=True if event.key==ord('z'): reverseCheat=True if event.key==ord('x'): slowCheat=True if event.key==ord('c'): invincibleCheat=True if event.key==ord('v'): pauseCheat=True if event.key==K_LEFT: moveRight=False moveLeft=True if event.key==K_RIGHT: moveRight=True moveLeft=False if event.key==K_UP: moveDown=False moveUp=True if event.key==K_DOWN: moveDown=True moveUp=False if event.key==ord('d'): moveRight2=True moveLeft2=False if event.key==ord('a'): moveRight2=False moveLeft2=True if event.key==ord('w'): moveDown2=False moveUp2=True if event.key==ord('s'): moveDown2=True moveUp2=False if event.type==KEYUP: if event.key==K_RALT: mineFiring=False if event.key==ord('q'): rocketFiring2=False if event.key==K_TAB: pulseFiring2=False if event.key==ord('['): rocketFiring=False if event.key==ord(']'): pulseFiring=False if event.key==ord('z'): reverseCheat=False if event.key==ord('c'): invincibleCheat=False if event.key==ord('x'): slowCheat=False if event.key==ord('v'): pauseCheat=False if event.key==K_ESCAPE: pygame.quit() sys.exit() if event.key==K_LEFT: moveLeft=False if event.key==K_RIGHT: moveRight=False if event.key==K_UP: moveUp=False if event.key==K_DOWN: moveDown=False if event.key==ord('d'): moveRight2=False if event.key==ord('a'): moveLeft2=False if event.key==ord('w'): moveUp2=False if event.key==ord('s'): moveDown2=False #adds new rockets if player1IsDead==False: if rocketlimit>=1: if rocketFiring==True: rocketaddcounter+=1 if rocketaddcounter==ADDNEWROCKETRATE: rocketlimit-=1 rocketaddcounter=0 rocketSize=ROCKETSIZE newRocket={'rect': pygame.Rect(playerRect.centerx-4,playerRect.centery,rocketSize,rocketSize), 'speed': ROCKETSPEED, 'surface': pygame.transform.scale(rocketImage,(rocketSize,rocketSize)), 'drift':random.randint(-1,1),} rockets.append(newRocket) if pulselimit>=1: if pulseFiring==True: pulseaddcounter+=1 if pulseaddcounter==ADDNEWPULSERATE: pulselimit-=1 pulseaddcounter=0 pulseSize=PULSESIZE newPulse={'rect': pygame.Rect(playerRect.centerx-15,playerRect.centery,pulseSize,pulseSize), 'speed': PULSESPEED, 'surface': pygame.transform.scale(pulseImage,(pulseSize,pulseSize)),} pulses.append(newPulse) if player2IsDead==False: if rocketlimit2>=1: if rocketFiring2==True: rocketaddcounter2+=1 if rocketaddcounter2==ADDNEWROCKETRATE: rocketlimit2-=1 rocketaddcounter2=0 rocketSize=ROCKETSIZE newRocket2={'rect': pygame.Rect(player2Rect.centerx-4,player2Rect.centery,rocketSize,rocketSize), 'speed': ROCKETSPEED, 'surface': pygame.transform.scale(rocketImage,(rocketSize,rocketSize)), 'drift':random.uniform(-2,2),} rockets2.append(newRocket2) if pulselimit2>=0: if pulseFiring2==True: pulseaddcounter2+=1 if pulseaddcounter2==ADDNEWPULSERATE: pulselimit2-=1 pulseaddcounter2=0 pulseSize=PULSESIZE newPulse2={'rect': pygame.Rect(player2Rect.centerx-15,player2Rect.centery,pulseSize,pulseSize), 'speed': PULSESPEED, 'surface': pygame.transform.scale(pulseImage,(pulseSize,pulseSize)),} pulses2.append(newPulse2) if mineFiring==True: mineaddcounter+=1 if minelimit>0: if mineaddcounter==ADDNEWMINERATE: minelimit-=1 mineaddcounter=0 mineSize=MINESIZE newMine={'rect': pygame.Rect(playerRect.centerx-150,playerRect.centery-150,mineSize,mineSize), 'surface': pygame.transform.scale(mineImage,(mineSize,mineSize)),} mines.append(newMine) if not pauseCheat: #adds new asteroids at the top of screen baddieaddcounter+=1 if baddieaddcounter==ADDNEWBADDIERATE: baddieaddcounter=0 baddieSize=random.randint(BADDIEMINSIZE,BADDIEMAXSIZE) newBaddie={'rect': pygame.Rect(random.randint(0,WINDOWWIDTH-baddieSize),0-baddieSize,baddieSize,baddieSize), 'speed': random.randint(BADDIEMINSPEED,BADDIEMAXSPEED), 'surface':pygame.transform.scale(baddieImage,(baddieSize,baddieSize)),} baddies.append(newBaddie) superbaddiecounter+=1 if superbaddiecounter==ADDSUPERBADDIERATE: superbaddiecounter=0 superBaddieSize=SUPERSIZE newSuperBaddie={'rect': pygame.Rect(random.randint(0,WINDOWWIDTH-superBaddieSize),0-superBaddieSize,superBaddieSize,superBaddieSize*2), 'speed': random.randint(BADDIEMINSPEED,BADDIEMAXSPEED), 'surface': pygame.transform.scale(superBaddieImage,(superBaddieSize,superBaddieSize*2)),} superbaddies.append(newSuperBaddie) for r in rockets: #moves the rockets up r['rect'].move_ip(r['drift'],r['speed']*-1) r['speed'] += .05 #removes rockets a the top of the screen if r['rect'].top<0: rockets.remove(r) for p in pulses: #moves the pulses up p['rect'].move_ip(0,p['speed']*-1) #removes pulses at the top of the screen if p['rect'].top<0: pulses.remove(p) for r in rockets2: DriftIncrement = random.randint(-2,2) Drift += DriftIncrement if Drift < 2: Drift = 2 if Drift < -2: Drift = -2 #moves the rockets up r['rect'].move_ip(r['drift'],r['speed']*-1) r['speed'] += .05 #removes rockets a the top of the screen if r['rect'].top<0: rockets2.remove(r) for p in pulses2: #moves the pulses up p['rect'].move_ip(0,p['speed']*-1) #removes pulses at the top of the screen if p['rect'].top<0: pulses2.remove(p) for b in baddies: if not reverseCheat and not slowCheat and not pauseCheat: b['rect'].move_ip(DriftA,b['speed']) elif reverseCheat: b['rect'].move_ip(0,-5) elif slowCheat: b['rect'].move_ip(0,1) elif pauseCheat: b['rect'].move_ip(0,b['speed']-b['speed']) for b in baddies[:]: #removes asteroids at the botom of the screen if b['rect'].top>WINDOWHIGHT: baddies.remove( for b in superbaddies: if not slowCheat and not pauseCheat: b['rect'].move_ip(0,b['speed']) elif pauseCheat: b['rect'].move_ip(0,b['speed']-b['speed']) elif slowCheat: b['rect'].move_ip(0,2) for b in superbaddies[:]: if b['rect'].top>WINDOWHIGHT: superbaddies.remove( #creates point squares pointSquarecounter+=1 if pointSquarecounter>=NEWPOINTSQUARE: pointSquarecounter=0 newFood={'rect': pygame.Rect(random.randint(0,WINDOWWIDTH-POINTSQUARESIZE),0-POINTSQUARESIZE,POINTSQUARESIZE,POINTSQUARESIZE), 'surface':pygame.transform.scale(pointSquareImage,(POINTSQUARESIZE,POINTSQUARESIZE))} pointSquares.append(newFood) specialFoodCounter+=1 if specialFoodCounter>=SPECIALPOINTSQUARE: specialFoodCounter=0 newFood={'rect': pygame.Rect(random.randint(0,WINDOWWIDTH-POINTSQUARESIZE),0-POINTSQUARESIZE,POINTSQUARESIZE,POINTSQUARESIZE), 'surface':pygame.transform.scale(pointSquareImage2,(POINTSQUARESIZE,POINTSQUARESIZE))} specialFoods.append(newFood) #moves the point squares window1.fill(BLACK) for pointSquare in pointSquares[:]: if pointSquare['rect'].top>WINDOWHIGHT: pointSquares.remove(pointSquare) for pointSquare in specialFoods[:]: if pointSquare['rect'].top>WINDOWHIGHT: specialFoods.remove(pointSquare) for pointSquare in pointSquares[:]: pointSquare['rect'].move_ip(0,random.randint(1,5)) for pointSquare in specialFoods[:]: pointSquare['rect'].move_ip(0,random.randint(2,6)) if player1IsDead==False: if moveDown and playerRect.bottom<WINDOWHIGHT: playerRect.top+=MOVESPEED if moveUp and playerRect.top>0: playerRect.top-=MOVESPEED if moveLeft and playerRect.left>0: playerRect.left-=MOVESPEED if moveRight and playerRect.right<WINDOWWIDTH: playerRect.right+=MOVESPEED if player2IsDead==False: if moveDown2 and player2Rect.bottom<WINDOWHIGHT: player2Rect.top+=MOVESPEED if moveUp2 and player2Rect.top>0: player2Rect.top-=MOVESPEED if moveLeft2 and player2Rect.left>0: player2Rect.left-=MOVESPEED if moveRight2 and player2Rect.right<WINDOWWIDTH: player2Rect.right+=MOVESPEED #checks if player has collided with point square if player1IsDead==False: for pointSquare in pointSquares[:]: if doRectsOverlap(pointSquare['rect'],playerRect): pickUpSound.play() pointSquares.remove(pointSquare) SCORE+=1 for special in specialFoods[:]: if doRectsOverlap(special['rect'],playerRect): pickUpSound.play() specialFoods.remove(special) rocketlimit+=25 pulselimit+=10 if player1Health < 5: player1Health += 1 if player2IsDead==False: for pointSquare in pointSquares[:]: if doRectsOverlap(pointSquare['rect'],player2Rect): pickUpSound.play() pointSquares.remove(pointSquare) SCORE+=1 for special in specialFoods[:]: if doRectsOverlap(special['rect'],player2Rect): pickUpSound.play() specialFoods.remove(special) rocketlimit2+=25 pulselimit2+=10 if player2Health < 5: player2Health += 1 rockethitbaddie(rockets,baddies) pulsehitbaddie(pulses,baddies) pulsehitsuperbaddie(pulses,superbaddies) rocket2hitbaddie(rockets2,baddies) pulse2hitbaddie(pulses2,baddies) pulse2hitsuperbaddie(pulses2,superbaddies) #draws objects onto the screen for pointSquare in pointSquares: window1.blit(pointSquare['surface'],pointSquare['rect']) for special in specialFoods: window1.blit(special['surface'],special['rect']) for p in pulses: window1.blit(p['surface'],p['rect'],) for p in pulses2: window1.blit(p['surface'],p['rect'],) for b in baddies: window1.blit(b['surface'],b['rect'],) for b in superbaddies: window1.blit(b['surface'],b['rect'],) for r in rockets: window1.blit(r['surface'],r['rect'],) for r in rockets2: window1.blit(r['surface'],r['rect'],) for m in mines: window1.blit(m['surface'],m['rect'],) window1.blit(playerImage,playerRect) window1.blit(player2Image,player2Rect) window1.blit(rocketSign,rocketRect) window1.blit(pulseSign,pulseRect) window1.blit(player1Sign,player1Rect) window1.blit(player2Sign,player2SignRect) window1.blit(rocket2Sign,rocket2Rect) window1.blit(pulse2Sign,pulse2Rect) if player1IsDead==False: playerHealthCheck1=playerhitbaddie(playerRect,baddies) if playerHealthCheck1==0: if invincibleCheat==False: player1IsDead=True backgroundMusic.stop() explosionSound.play() playerImage=pygame.image.load("C:/Python31/python images/ShipExp1.png") window1.blit(playerImage,playerRect) pygame.display.update() time.sleep(0.5) playerImage=pygame.image.load("C:/Python31/python images/ShipExp2.png") window1.blit(playerImage,playerRect) pygame.display.update() time.sleep(0.5) playerImage=pygame.image.load("C:/Python31/python images/ShipExp3.png") window1.blit(playerImage,playerRect) pygame.display.update() time.sleep(0.5) pygame.display.update() explosionSound.stop() if player2IsDead==True: if SCORE>topScore: topScore=SCORE topScore=str(topScore) drawText('Score: %s' %(SCORE),font,window1,500,500) drawText('New high score!', font, window1, (WINDOWWIDTH/2),(WINDOWHIGHT/2)) pygame.display.update() file_path='C:\\Python31\\python\\dodger high scores.txt' file=open(file_path,"w") file.write(topScore) file.close() time.sleep(2) SCORE=0 break backgroundMusic.play() if player1IsDead==False: playerHealthCheck1=playerhitsuperbaddie(playerRect,superbaddies) if playerHealthCheck1==0: player1IsDead=True backgroundMusic.stop() explosionSound.play() playerImage=pygame.image.load("C:/Python31/python images/ShipExp1.png") window1.blit(playerImage,playerRect) pygame.display.update() time.sleep(0.5) playerImage=pygame.image.load("C:/Python31/python images/ShipExp2.png") window1.blit(playerImage,playerRect) pygame.display.update() time.sleep(0.5) playerImage=pygame.image.load("C:/Python31/python images/ShipExp3.png") window1.blit(playerImage,playerRect) time.sleep(0.5) explosionSound.stop() if player2IsDead==True: if SCORE>topScore: topScore=SCORE topScore=str(topScore) drawText('Score: %s' %(SCORE),font,window1,500,500) drawText('New high score!', font, window1, (WINDOWWIDTH/2),(WINDOWHIGHT/2)) pygame.display.update() file_path='C:\\Python31\\python\\dodger high scores.txt' file=open(file_path,"w") file.write(topScore) file.close() drawText('Score: %s' %(SCORE),font,window1,500,500) drawText('New high score!', font, window1, (WINDOWWIDTH/2),(WINDOWHIGHT/2)) pygame.display.update() time.sleep(2) SCORE=0 break backgroundMusic.play() if player2IsDead==False: playerHealthCheck2=player2hitbaddie(player2Rect,baddies) if playerHealthCheck2==0: if invincibleCheat==False: player2IsDead=True backgroundMusic.stop() explosionSound.play() player2Image=pygame.image.load("C:/Python31/python images/ShipExp1.png") window1.blit(player2Image,player2Rect) pygame.display.update() time.sleep(0.5) player2Image=pygame.image.load("C:/Python31/python images/ShipExp2.png") window1.blit(player2Image,player2Rect) pygame.display.update() time.sleep(0.5) player2Image=pygame.image.load("C:/Python31/python images/ShipExp3.png") window1.blit(player2Image,player2Rect) pygame.display.update() time.sleep(0.5) pygame.display.update() explosionSound.stop() if player1IsDead==True: if SCORE>topScore: topScore=SCORE topScore=str(topScore) drawText('Score: %s' %(SCORE),font,window1,500,500) drawText('New high score!', font, window1, (WINDOWWIDTH/2),(WINDOWHIGHT/2)) pygame.display.update() file_path='C:\\Python31\\python\\dodger high scores.txt' file=open(file_path,"w") file.write(topScore) file.close() drawText('Score: %s' %(SCORE),font,window1,500,500) drawText('New high score!', font, window1, (WINDOWWIDTH/2),(WINDOWHIGHT/2)) pygame.display.update() time.sleep(2) SCORE=0 break backgroundMusic.play() if player2IsDead==False: playerHealthCheck2=player2hitsuperbaddie(player2Rect,superbaddies) if playerHealthCheck2==0: player2IsDead=True backgroundMusic.stop() explosionSound.play() player2Image=pygame.image.load("C:/Python31/python images/ShipExp1.png") window1.blit(player2Image,player2Rect) pygame.display.update() time.sleep(0.5) player2Image=pygame.image.load("C:/Python31/python images/ShipExp2.png") window1.blit(player2Image,player2Rect) pygame.display.update() time.sleep(0.5) player2Image=pygame.image.load("C:/Python31/python images/ShipExp3.png") window1.blit(player2Image,player2Rect) time.sleep(0.5) explosionSound.stop() if player1IsDead==True: if SCORE>topScore: topScore=SCORE topScore=str(topScore) drawText('Score: %s' %(SCORE),font,window1,500,500) drawText('New high score!', font, window1, (WINDOWWIDTH/2),(WINDOWHIGHT/2)) pygame.display.update() file_path='C:\\Python31\\python\\dodger high scores.txt' file=open(file_path,"w") file.write(topScore) file.close() drawText('Score: %s' %(SCORE),font,window1,500,500) drawText('New high score!', font, window1, (WINDOWWIDTH/2),(WINDOWHIGHT/2)) pygame.display.update() time.sleep(2) SCORE=0 break backgroundMusic.play() drawText('Score: %s' %(SCORE),font,window1,10,0) drawText('Top Score: %s' %(topScore),font,window1,10,40) drawText('X%s' %(rocketlimit2),font,window1,40,WINDOWHIGHT-80) drawText('X%s' %(pulselimit2),font,window1,40,WINDOWHIGHT-40) drawText('Health: %s/5' %(player2Health),font,window1,0,WINDOWHIGHT-120) drawText('Health: %s/5' %(player1Health),font,window1,WINDOWWIDTH-120,WINDOWHIGHT-120) drawText('X%s' %(rocketlimit),font,window1,WINDOWWIDTH-80,WINDOWHIGHT-80) drawText('X%s' %(pulselimit),font,window1,WINDOWWIDTH-80,WINDOWHIGHT-40) if pauseCheat==True: drawText('Freeze!',font,window1,(WINDOWWIDTH/3)-80,(WINDOWHIGHT/3)+50) if slowCheat==True: drawText('MATRIX!!!',font,window1,(WINDOWWIDTH/2)-80,(WINDOWHIGHT/2)+50) pygame.display.update() mainClock.tick(FPS) TEXTCOLOR=(RED) drawText('GAME OVER', font, window1, (WINDOWWIDTH/3),(WINDOWHIGHT/3)) pygame.display.update() time.sleep(1) TEXTCOLOR=(GREEN) drawText('Press any key to play again.',font,window1,(WINDOWWIDTH/3)-80,(WINDOWHIGHT/3)+50) pygame.display.update() time.sleep(1) waitForPlayerToPressKey() backgroundMusic2.stop() TEXTCOLOR=(WHITE) playerImage=pygame.image.load("C:/Python31/python images/ShipImage.png") player2Image=pygame.image.load("C:/Python31/python images/ShipImage2.png") window1.fill(BLACK) This was my first Python / PyGame "game". It was a heavily modified version of the example "Dodger" program that was included in a learning manual I got. And it's about twice as long as it needs to be. Many things were hardcoded that could become modular. So: Learning to do basics? Maybe a few months. Competency? A year or two. Mastering? Never. Though you'll get pretty darn good in a few more years.
  18. Um, because you didn't buy the Steam key, you bought the standalone game? Unless you mean to say that you actually went and bought a Steam key independently of the game and never got it. In which case, unless you've got evidence, you're SOL. Two years is a bit long... (If you don't have any evidence at all, I don't think anyone can do anything in the first place, be it two years ago or two minutes ago.)
  19. Full HypeSteam Ahead! We'll be arriving at Release Station right on schedule! (For once! )
  20. inrefk (in - reh - fick) Noun: Minute particulate matter often found in tap water. Ketorsh
×
×
  • Create New...