Codereview stack exchange10/12/2023 If event.key = pygame.K_z and bulletMotion = False: Lead_coords, wall_coords, enemy_coords = loadMap('map.txt') Wall_coords.append()Įnemy_coords.append() Leadleft = loadSprite('images/leadleft.png', block_s, block_s)Įnemyup = loadSprite('images/enemyup.png', block_s, block_s)Įnemydown = loadSprite('images/enemydown.png', block_s, block_s)Įnemyright = loadSprite('images/enemyright.png', block_s, block_s)Įnemyleft = loadSprite('images/enemyleft.png', block_s, block_s)īulletup = loadSprite('images/bulletup.png', block_s, block_s)īulletdown = loadSprite('images/bulletdown.png', block_s, block_s)īulletright = loadSprite('images/bulletright.png', block_s, block_s)īulletleft = loadSprite('images/bulletleft.png', block_s, block_s) Leadright = loadSprite('images/leadright.png', block_s, block_s) Leaddown = loadSprite('images/leaddown.png', block_s, block_s) Leadup = loadSprite('images/leadup.png', block_s, block_s) Wall = loadSprite('images/wall.png', block_s, block_s) Vodka = loadSprite('images/powerup.png', block_s, block_s) Item = loadSprite('images/item.png', block_s, block_s) Menu = loadSprite('images/menu.png', screen_w, screen_h) Gameover = loadSprite('images/gameover.png', screen_w, screen_h)īackground = loadSprite('images/background.png', screen_w, screen_h) import pygameĪssert screen_w % block_s = 0, 'Window width must be multiple of tile side.'Īssert screen_h % block_s = 0, 'Window height must be multiple of tile side.' I would like to know your suggestions on improvements I can make, as well as point out my bad habits and tell me how to fix them. This is the rewrite of the original code, and I'm aware that it is still probably very inefficient and has does many things frowned upon by many such as many repeated if statements, etc (that I don't know how to fix). Basically, you control a from top down perspective and shoot people in a maze. This one of my first Python games in PyGame I decided to make for fun.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |