How to create a box pusher game with Python and Pygame Source Code (2020)
This game needs two files, first is the box_pusher.py file, second is the box_pusher_game_level.py file. I have added just 31 levels, there are another 200 levels. I wll add those levels later. Those two files need to be placed inside the same folder as the pictures below. Three pictures are all 20x20 pixels and need to be placed in the same folder as the source code. # box_pusher.py import pygame , sys from pygame.locals import * from box_pusher_game_level import game_level SCREEN_WIDTH = 640 SCREEN_HEIGHT = 480 BOARD_WIDTH = 20 BOARD_HEIGHT = 16 CELL_SIZE = 20 FPS = 30 START_POS = ( 119 , 79 ) # color preset WHITE = ( 255 , 255 , 255 ) BLACK = ( 0 , 0 , 0 ) RED = ( 255 , 0 , 0 ) GREEN = ( 0 , 255 , 0 ) BLUE = ( 0 , 0 , 155 ) # game level dictionary # 'B' represent bricks # 'M' represent marks # 'O' represent boxes # 'P' represent player ##game_level = { ## 1: ( ## '......................