Advertisement
shh_algo_PY

Platformer Template

Apr 17th, 2022 (edited)
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.99 KB | None | 0 0
  1. import play
  2. import pygame
  3. from random import randint
  4.  
  5. play.set_backdrop('sky blue')
  6.  
  7. coin_sound = pygame.mixer.Sound('coin.wav')
  8. sea_sound = pygame.mixer.Sound('sea.ogg')
  9.  
  10. pygame.display.set_caption('Platformer Game') # TITLE OF YOUR GAME
  11.  
  12. score_txt = play.new_text(words='Score:', x=play.screen.right-100, y=play.screen.top-30, size=70)
  13.  
  14. score = play.new_text(words='0', x=play.screen.right-30, y=play.screen.top-30, size=70)
  15. text = play.new_text(words='Tap SPACE to jump, LEFT/RIGHT to move', x=0, y=play.screen.bottom+60, size=70)
  16.  
  17. sprite = play.new_circle(color='white', x=play.screen.left+20, y=play.screen.top-20, border_color='grey', border_width=3, radius=15)
  18.  
  19. platforms = []
  20.  
  21. coins = []
  22.  
  23. sea = play.new_box(color='blue', width=play.screen.width, height=50, x=0, y=play.screen.bottom+20)
  24.  
  25. def draw_platforms():
  26.     pass
  27.  
  28. def draw_coins():
  29.     pass
  30.  
  31. @play.when_program_starts
  32. def start():
  33.     pass
  34.    
  35. @play.repeat_forever
  36. async def game():
  37.     pass
  38.  
  39. play.start_program()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement