A downloadable game for Windows

A - left

D - right

Created with Pygame for TweetTweetJam 2, 558 characters of code (include space, exclude '\n')

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)


StatusReleased
PlatformsWindows
Rating
Rated 4.0 out of 5 stars
(1 total ratings)
Authorrunter66
Tagspygame, tweettweetjam-2

Download

Download
BlockDrop.exe 34 MB

Leave a comment

Log in with itch.io to leave a comment.