Quick's Move's

Its a game which depends on your fast actions that's why the car is very near to top :)

code:(500 chars only)

NOTE:It will be hard to play...
(I have reduced the speed and fixed some bugs.)

CONTROLS:

  • <- and -> to move
  • Don't touch the end of screen,Don't touch the boxes
  • Score is visible at the Title bar or tab name.(on browser)
  • Score is visible on window name.(in python)

SOURCE CODE:

from pygame import*
from random import*
init();w=500;d=display;s=d.set_mode((w-200,w));c=Rect(135,200,40,45);t=0;j=0;l=1;m=(0,90,0);e=draw.rect
while 1:
 event.get();r=key.get_pressed();c=c.move((r[K_RIGHT]-r[K_LEFT])*2,0);s.fill(0);draw.rect(s,(j*90),(20,0,260,w));e(s,(205,0,90),c);t+=1-t//1e6;k=e(s,m,(20+j,t*4,52,52));p=e(s,m,(228-j,t*4-100,52,52));d.flip();time.wait(9)
 if t*4>w:t=0;l+=1;j=randint(0,4)*52;display.set_caption(f"PTS:{l}");
 a=c.colliderect
 if a(p)or a(k)or c.x<10 or c.x>260:z;


Download

Download
main.py 487 bytes

Leave a comment

Log in with itch.io to leave a comment.