Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- import pygame
- import sys
- pygame.init()
- screen = pygame.display.set_mode((800,400))
- pygame.display.set_caption('Game Title')
- clock = pygame.time.Clock()
- angle=0
- moveAmt = 1
- x1=100
- y1=100
- while True:
- for event in pygame.event.get():
- if event.type == pygame.QUIT:
- pygame.quit()
- sys.exit()
- angle += 10
- y1 += math.sin(math.radians(angle))*moveAmt
- screen.fill((70,70,70))
- pygame.draw.circle(screen, 'red', (x1,y1), 5)
- pygame.display.update() ## vs. flip()
- clock.tick(60)
Advertisement
Add Comment
Please, Sign In to add comment