[Up], [Backspace] = float jump.
I just started this game. I designed the levels with my cool, new “game_studio_upgraded” program.
Good luck.
from math import * from random import randint as RAND from kandinsky import * from kandinsky import fill_rect as F from ion import keydown as KP from kandinsky import draw_string as STR from ion import * from time import * MAPX=0 MAPY=0 BLACK=(0,0,0) GAME_OVER=False float_energy=20 score=0 life=3 x=100 y=221-22 w=12 h=22 c=(RAND(0,255),RAND(0,255),RAND(0,255)) direc=["left","right","up","down"] DIR=direc[1] bg = (51, 18, 23)#(69, 70, 51) #(83, 40, 83) level_1=[ [[0, 64, 148, 170, (0, 0, 0)], [105, 127, 114, 136, (0, 0, 0)], [162, 181, 28, 40, (0, 0, 0)], [30, 43, 28, 28, (0, 0, 0)], [51, 25, 54, 64, (0, 0, 0)], [37, 184, 42, 40, (189, 25, 51)], [13, 100, 24, 28, (45, 138, 186)]], [[51, 212, 232, 10, (0, 0, 0)], [129, 210, 70, 12, (255, 0, 0)]], [[40, 176, 50, 46, (0, 0, 0)], [168, 134, 154, 88, (0, 0, 0)], [202, 86, 120, 88, (0, 0, 0)], [246, 44, 76, 88, (0, 0, 0)], [90, 206, 76, 16, (255, 0, 0)]], [[58, 182, 52, 40, (0, 0, 0)], [172, 144, 24, 78, (0, 0, 0)], [253, 208, 32, 14, (0, 0, 0)], [196, 208, 60, 14, (255, 0, 0)], [109, 208, 64, 14, (255, 0, 0)]], [[61, 212, 50, 10, (0, 0, 0)], [91, 170, 66, 52, (0, 0, 0)], [121, 118, 66, 104, (0, 0, 0)], [268, 178, 54, 16, (0, 0, 0)], [186, 206, 136, 16, (255, 0, 0)]], [[97, 122, 132, 100, (0, 0, 0)], [106, 132, 112, 90, (255, 0, 0)], [265, 124, 32, 42, (255, 0, 0)], [64, 212, 32, 8, (255, 0, 0)], [79, 182, 24, 8, (0, 0, 0)], [142, 122, 42, 12, (255, 0, 0)]], [[82, 86, 18, 136, (0, 0, 0)],[190, 86, 18, 136, (0, 0, 0)],[262, 110, 60, 16, (0, 0, 0)],[98, 182, 96, 40, (255, 0, 0)],[0, 128, 40, 8, (0, 0, 0)],[51, 170, 40, 8, (0, 0, 0)]], [[0, 175, 50, 10, (0, 0, 0)], [78, 143, 78, 10, (0, 0, 0)], [201, 114, 34, 108, (0, 0, 0)], [201, 0, 30, 62, (255, 0, 0)], [0, 214, 202, 8, (255, 0, 0)], [105, 142, 20, 6, (255, 0, 0)]], [[52, 212, 50, 10, (0, 0, 0)], [97, 161, 50, 10, (0, 0, 0)], [196, 203, 18, 10, (0, 0, 0)], [158, 0, 164, 50, (0, 0, 0)], [260, 132, 62, 90, (0, 0, 0)], [104, 216, 156, 6, (255, 0, 0)]], [[0, 162, 50, 100, (0, 0, 0)], [105, 172, 50, 50, (0, 0, 0)], [118, 27, 204, 98, (0, 0, 0)], [54, 210, 194, 12, (255, 0, 0)], [114, 0, 6, 126, (255, 0, 0)]], [[40, 212, 322, 10, (255, 0, 0)], [0, 0, 322, 94, (0, 0, 0)], [90, 156, 36, 58, (0, 0, 0)], [192, 156, 10, 58, (0, 0, 0)], [264, 204, 58, 8, (0, 0, 0)], [0, 202, 34, 20, (0, 0, 0)]], [[0, 212, 50, 10, (0, 0, 0)], [48, 154, 232, 68, (0, 0, 0)], [66, 91, 188, 68, (0, 0, 0)], [81, 91, 162, 128, (255, 0, 0)], [124, 57, 18, 14, (0, 0, 0)], [256, 0, 18, 40, (0, 0, 0)]], [[86, 212, 236, 10, (255, 0, 0)], [68, 140, 18, 82, (0, 0, 0)], [143, 188, 14, 6, (0, 0, 0)], [230, 128, 14, 6, (0, 0, 0)], [246, 62, 76, 6, (0, 0, 0)]], [[0, 68, 48, 154, (0, 0, 0)], [99, 126, 6, 96, (0, 0, 0)], [180, 126, 6, 96, (0, 0, 0)], [244, 0, 78, 168, (0, 0, 0)], [241, 0, 8, 168, (255, 0, 0)], [48, 208, 136, 14, (255, 0, 0)]], [[80, 100, 162, 122, (0, 0, 0)], [87, 93, 26, 8, (255, 0, 0)], [153, 93, 26, 8, (255, 0, 0)], [216, 93, 26, 8, (255, 0, 0)], [51, 154, 184, 8, (0, 0, 0)], [82, 140, 6, 82, (255, 0, 0)]] ] F(0,0,322,222,bg) area=0 for i in level_1[area]: F(*i) while not GAME_OVER: F(x,y,w,h,c) F(x+3,y+3,4,3,BLACK) F(x+9,y+3,4,3,BLACK) if KP(KEY_LEFT): x-=1 F(x+w+1,y,1,h,bg) if KP(KEY_RIGHT): x+=1 F(x-1,y,1,h,bg) if KP(KEY_UP) and float_energy>0 or keydown(KEY_BACKSPACE) and float_energy>0: y-=2 F(x+w+1,y,1,h,bg) float_energy-=0.4 F(x,y+h+1,w,1,bg) for i in level_1[area]: if x+w>i[0] and x<i[0]+i[2] and y+h>i[1] and y<i[1]+i[3] and i[-1]==(255,0,0): sleep(0.2) F(x,y,w,h,bg) life-=1 x=100 y=30 float_energy=40 for i in level_1[area]: if x+w>i[0] and x<i[0]+i[2] and y+h>i[1] and y+h<i[1]+2: float_energy=0 y-=1 float_energy=40 for i in level_1[area]: if x+w>i[0] and x<i[0]+i[2] and y+h>i[1] and y+h<i[1]+i[3]: for i in level_1[area]: F(*i) if get_pixel(x,y+h) != (0,0,0) and get_pixel(x+w,y+h) != (0,0,0) or get_pixel(x,y+h) != (255,)*3 and get_pixel(x+w,y+h) != (255,)*3: sleep(0.001) y+=1 F(x-1,y-1,w+2,1,bg) if get_pixel(x,y+h) == (0,0,0) and get_pixel(x+w,y+h) == (0,0,0): float_energy=20 if y+h>222: float_energy=20 y=222-h if x>321: sleep(0.2) score+=RAND(50,100) fill_rect(0,0,322,222,BLACK) sleep(0.1) fill_rect(0,0,322,222,bg) area+=1 x=0 for i in level_1[area]: F(*i) if life<1: sleep(0.4) for i in range(0,322,3): for j in range(0,222,3): sleep(0.00051) F(i,j,10,10,(RAND(0,255),0,0)) sleep(1) F(0,0,322,222,(0,0,0)) sleep(1) draw_string("GAME OVER",100,80,(255,0,0),(0,0,0)) sleep(1) draw_string("SCORE: "+str(score),100,140,(255,)*3,(0,0,0)) GAME_OVER=True if x<0: x=0 if y<0: y=0