Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs

runter66

1
Posts
2
Following
A member registered Jan 23, 2019 · View creator page →

Creator of

Recent community posts

(2 edits)

import pygame as p
import random
p.init()
o=p.font
r=G=255
W=20
P=360
f=o.SysFont('arial',W)
j=p.display
s=j.set_mode((G,P))
u=p.Rect
i=u(100,P-W,W,W)
v=[]
l=0
E=p.USEREVENT+1
h=p.time
h.set_timer(E,P)
w=[G]*3
while r:
 for e in p.event.get():
  r=e.type!=12
  if e.type==E:v+=[u(random.randint(0,G-W),0,W,W)]
 k=p.key.get_pressed()
 i[0]-=k[97] and i[0]>0
 i[0]+=k[100] and i[0]<G-W
 s.fill((0)*3)
 p.draw.rect(s,w,i)
 for q in v:
  p.draw.rect(s,w,q)
  q[1]+=1
  if q[1]>P:l+=1;v=v[1:]
  if q.colliderect(i):l=0;v=[]
 t=f.render(f'{l}',1,[G]*3)
 s.blit(t,(W,0))
 j.flip()
 h.Clock().tick(60)