├── .gitignore ├── JavaScript_LifeSimGame ├── style.css └── index.html ├── JavaScript_EndlessRunnerGame ├── logic.js └── Index.html ├── README.md ├── Game Jam Submission Form.md ├── JavaScript_RPSGame ├── style.css ├── logic.js └── index.html ├── GameJamProjectBoards.md ├── gamePlanning.md ├── GameJamPresentation.md ├── JavaScript_ClassActivity_March21.md ├── Python_ClassActivity_March21.md ├── endlessRunner.py ├── Python_ShootingGame └── shootingGame.py ├── Python_FallingGame └── fallGame.py └── Python_FarioGame └── fario.py /.gitignore: -------------------------------------------------------------------------------- 1 | unPushed -------------------------------------------------------------------------------- /JavaScript_LifeSimGame/style.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /JavaScript_EndlessRunnerGame/logic.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackTechPhilly/BTP-Games/HEAD/README.md -------------------------------------------------------------------------------- /Game Jam Submission Form.md: -------------------------------------------------------------------------------- 1 | # Game Jam Submission Form 2 | 3 | Please use the link below to submit your game folde 4 | 5 | [Game Submission Form ](https://forms.gle/dAWe6LyBvWi2VEEE9) 6 | -------------------------------------------------------------------------------- /JavaScript_RPSGame/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: Arial, sans-serif; 3 | text-align: center; 4 | padding: 20px; 5 | } 6 | .choice-btn { 7 | padding: 10px; 8 | margin: 5px; 9 | font-size: 16px; 10 | cursor: pointer; 11 | } -------------------------------------------------------------------------------- /GameJamProjectBoards.md: -------------------------------------------------------------------------------- 1 | # Project Board 2 | 3 | Provided below is the project boards that cover the objectives you'll need to complete by next week. 4 | Search for you or your teams name on the document below. 5 | 6 | [Project Board ](https://docs.google.com/presentation/d/1SDZqiQNimmyYdgr6bAmC6ThwK596NfTgzNSM-ZE1Xmo/edit?usp=sharing) 7 | -------------------------------------------------------------------------------- /gamePlanning.md: -------------------------------------------------------------------------------- 1 | # Game Jam Project Planning Form 2 | Take some time to brainstorm your game idea. Decide whether you want to work solo or as part of a team. Once you’re ready, click the link below to answer key questions about your game. 3 | 4 | You'll be expected to participate in an interview and create a project proposal to bring your game idea to life. 5 | 6 | Good luck 7 | 8 | [Game Planning Form ](https://forms.gle/V7yBFtCqkMa61Mpj8) 9 | -------------------------------------------------------------------------------- /JavaScript_EndlessRunnerGame/Index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Dinosaur Game 5 | 6 | 7 | 8 | 9 |
10 | background 11 |
12 |
13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /GameJamPresentation.md: -------------------------------------------------------------------------------- 1 | Congratulations on completing the Black Tech Philly Game Jam 2 | 3 | ## Game Overview 4 | 5 | - What's the name of your game? 6 | 7 | - What type of game is it? (e.g., platformer, shooter, puzzle, etc.) 8 | 9 | - Briefly describe the goal or objective of your game. 10 | 11 | ## Gameplay Demo 12 | - Show how your game works! Walk us through the gameplay. 13 | 14 | - Highlight key features like movement, collisions, scoring, enemies, etc. 15 | 16 | ## Design & Development Process 17 | 18 | - How did you come up with the idea? 19 | 20 | - What was your development process like? 21 | 22 | ## Reflection 23 | 24 | - What did you learn about programming or game design? 25 | 26 | - What would you add or improve if you had more time? -------------------------------------------------------------------------------- /JavaScript_RPSGame/logic.js: -------------------------------------------------------------------------------- 1 | function playGame(playerChoice) { 2 | const choices = ['rock', 'paper', 'scissors']; 3 | const computerChoice = choices[Math.floor(Math.random() * choices.length)]; 4 | let result = ''; 5 | 6 | if (playerChoice === computerChoice) { 7 | result = "It's a tie!"; 8 | } else if ( 9 | (playerChoice === 'rock' && computerChoice === 'scissors') || 10 | (playerChoice === 'paper' && computerChoice === 'rock') || 11 | (playerChoice === 'scissors' && computerChoice === 'paper') 12 | ) { 13 | result = "You win!"; 14 | } else { 15 | result = "You lose!"; 16 | } 17 | 18 | document.getElementById("result").textContent = `Computer chose ${computerChoice}. ${result}`; 19 | } -------------------------------------------------------------------------------- /JavaScript_RPSGame/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Rock Paper Scissors 7 | 8 | 9 | 10 |

Rock Paper Scissors

11 |

Choose your move:

12 | 13 | 14 | 15 | 16 |

Result: Make a move!

17 | 18 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /JavaScript_ClassActivity_March21.md: -------------------------------------------------------------------------------- 1 | # Async Acitivties 3/21/2025 2 | 3 | In your unit 4 folder on github codespaces, create new file called gameBasics.md, 4 | then complete the following. 5 | 6 | ## Preliminary Research 7 | Take time to conduct some research on your game. You will use this information to help inform 8 | your development and design decesions. 9 | 10 | 1. Find at least 3 videos that you believe are similar to what you are trying to build. Then, 11 | write down at 2 things from each video that you believe will you help you build your game. Please write your answers in complete sentences. 12 | 13 | 2. Find at least 3 written articles you believe are similar to what you are trying to build. Reade through the articles and write down at least 2 things from each article that you believe will help you build you game. Please write you answers in complete sentences. 14 | 15 | -------------------------------------------------------------------------------- /Python_ClassActivity_March21.md: -------------------------------------------------------------------------------- 1 | # Async Acitivties 3/21/2025 2 | 3 | In your pygame folder, create new file called gameBasics.py, 4 | the complete the following. 5 | 6 | 1. Create a moving pygame object 7 | Take what you've learned from module 1 and module 2, 8 | the falling game and the shooting game and create a 9 | python object. that can move up, down, left, and right on the game screen. 10 | 11 | 2. Assign an image to your pygame object 12 | Read the following article and use the information from it to add a an image 13 | to your pygame object. 14 | 15 | [Adding Image to game object article 1 ](https://www.geeksforgeeks.org/python-display-images-with-pygame/) 16 | 17 | [Adding Image to game object article 2](https://pythonprogramming.net/displaying-images-pygame/) 18 | 19 | This assignment will carry over into your async activity and will be do 20 | by the end of class 3/21/2025, NO EXCEPTIONS. 21 | 22 | You will need to run your code on monday and show that it works to get credit. 23 | 24 | 25 | -------------------------------------------------------------------------------- /endlessRunner.py: -------------------------------------------------------------------------------- 1 | import pygame 2 | import random 3 | 4 | # Initialize 5 | pygame.init() 6 | WIDTH, HEIGHT = 800, 400 7 | screen = pygame.display.set_mode((WIDTH, HEIGHT)) 8 | clock = pygame.time.Clock() 9 | font = pygame.font.SysFont(None, 40) 10 | 11 | # Colors 12 | WHITE = (255, 255, 255) 13 | BLACK = (0, 0, 0) 14 | 15 | # Player 16 | player = pygame.Rect(100, HEIGHT - 100, 50, 50) 17 | enemy = pygame.Rect(-30, HEIGHT - 100, 50, 50) 18 | 19 | gravity = 0 20 | jumping = False 21 | 22 | # Ground 23 | ground_y = HEIGHT - 50 24 | 25 | # Obstacles 26 | obstacles = [] 27 | spawn_timer = 0 28 | 29 | # Score 30 | score = 0 31 | start_ticks = pygame.time.get_ticks() 32 | 33 | # Game Loop 34 | running = True 35 | while running: 36 | screen.fill(WHITE) 37 | 38 | # Quit Event 39 | for event in pygame.event.get(): 40 | if event.type == pygame.QUIT: 41 | running = False 42 | 43 | # Input 44 | keys = pygame.key.get_pressed() 45 | if keys[pygame.K_SPACE] and not jumping: 46 | gravity = -15 47 | jumping = True 48 | 49 | # Player physics 50 | gravity += 1 51 | player.y += gravity 52 | if player.bottom >= ground_y: 53 | player.bottom = ground_y 54 | gravity = 0 55 | jumping = False 56 | 57 | pygame.draw.rect(screen, BLACK, player) 58 | pygame.draw.rect(screen,(0,0,255), enemy) 59 | 60 | # Obstacles logic 61 | spawn_timer += 1 62 | if spawn_timer > 60: 63 | spawn_timer = 0 64 | obstacle = pygame.Rect(WIDTH, ground_y - 30, 30, 30) 65 | obstacles.append(obstacle) 66 | 67 | for obstacle in obstacles[:]: 68 | obstacle.x -= 6 69 | pygame.draw.rect(screen, (255, 0, 0), obstacle) 70 | if obstacle.right < 0: 71 | obstacles.remove(obstacle) 72 | if player.colliderect(obstacle): 73 | running = False # Game over 74 | 75 | # Ground 76 | pygame.draw.line(screen, BLACK, (0, ground_y), (WIDTH, ground_y), 4) 77 | 78 | # Score 79 | score = (pygame.time.get_ticks() - start_ticks) // 100 80 | text = font.render(f"Score: {score}", True, BLACK) 81 | screen.blit(text, (10, 10)) 82 | 83 | # Refresh 84 | pygame.display.flip() 85 | clock.tick(60) 86 | 87 | pygame.quit() 88 | -------------------------------------------------------------------------------- /Python_ShootingGame/shootingGame.py: -------------------------------------------------------------------------------- 1 | import pygame 2 | import random 3 | 4 | pygame.init() 5 | 6 | FPS = 60 7 | clock = pygame.time.Clock() 8 | 9 | screen = pygame.display.set_mode((800, 600)) 10 | pygame.display.set_caption("Shooting Game") 11 | 12 | class Player(pygame.sprite.Sprite): 13 | def __init__(self): 14 | super(). __init__() 15 | self.image = pygame.Surface((50, 50)) 16 | self.image.fill((255, 255, 255)) 17 | self.rect = self.image.get_rect() 18 | self.rect.center = (400, 550) 19 | 20 | def update(self): 21 | keys = pygame.key.get_pressed() 22 | if keys[pygame.K_LEFT]: 23 | self.rect.x -= 5 24 | if keys[pygame.K_RIGHT]: 25 | self.rect.x += 5 26 | 27 | 28 | 29 | class Bullet(pygame.sprite.Sprite): 30 | def __init__(self, x, y): 31 | super().__init__() 32 | self.image = pygame.Surface((5, 10)) 33 | self.image.fill((255, 0, 0)) 34 | self.rect = self.image.get_rect() 35 | self.rect.center = (x, y) 36 | 37 | def update(self): 38 | self.rect.y -= 5 39 | if self.rect.bottom < 0 : 40 | self.kill() 41 | 42 | class Enemy(pygame.sprite.Sprite): 43 | def __init__(self): 44 | super().__init__() 45 | self.image = pygame.Surface((50, 50)) 46 | self.image.fill((0, 255, 0)) 47 | self.rect = self.image.get_rect() 48 | self.rect.x = random.randint(0, 750) 49 | self.rect.y = random.randint(-200, -50) 50 | 51 | def update(self): 52 | self.rect.y +=3 53 | if self.rect.top > 600: 54 | self.rect.y = random.randint(-100, -40) 55 | self.rect.x = random.randint(0, 750) 56 | 57 | 58 | all_sprites = pygame.sprite.Group() 59 | 60 | player = Player() 61 | 62 | all_sprites.add(player) 63 | 64 | bullets = pygame.sprite.Group() 65 | 66 | enemies = pygame.sprite.Group() 67 | for _ in range(5): 68 | enemy = Enemy() 69 | all_sprites.add(enemy) 70 | enemies.add(enemy) 71 | 72 | running = True 73 | 74 | while running: 75 | 76 | clock.tick(FPS) 77 | 78 | for event in pygame.event.get(): 79 | if event.type == pygame.QUIT: 80 | running = False 81 | if event.type == pygame.KEYDOWN: 82 | if event.key == pygame.K_SPACE: 83 | player.shoot() 84 | 85 | all_sprites.update() 86 | 87 | 88 | pygame.quit() 89 | -------------------------------------------------------------------------------- /JavaScript_LifeSimGame/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Life Sim Game 7 | 21 | 22 | 23 |

Life Sim Game

24 |

Monthly Salary: $3000

25 |

Remaining Balance: $3000

26 |

Saved Money: $0

27 |

Month: 1

28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /Python_FallingGame/fallGame.py: -------------------------------------------------------------------------------- 1 | import pygame 2 | import random 3 | 4 | # Initialize pygame 5 | pygame.init() 6 | 7 | # Game settings 8 | WIDTH, HEIGHT = 500, 600 9 | PLAYER_WIDTH, PLAYER_HEIGHT = 50, 50 10 | OBJECT_WIDTH, OBJECT_HEIGHT = 50, 50 11 | WHITE = (255, 255, 255) 12 | RED = (255, 0, 0) 13 | BLUE = (0, 0, 255) 14 | 15 | # Create screen 16 | screen = pygame.display.set_mode((WIDTH, HEIGHT)) 17 | pygame.display.set_caption("Avoid the Falling Objects") 18 | 19 | # Clock to control frame rate 20 | clock = pygame.time.Clock() 21 | FPS = 60 22 | 23 | class Player: 24 | def __init__(self): 25 | self.x = WIDTH // 2 26 | self.y = HEIGHT - PLAYER_HEIGHT - 10 27 | self.width = PLAYER_WIDTH 28 | self.height = PLAYER_HEIGHT 29 | self.speed = 5 30 | 31 | def move(self, keys): 32 | if keys[pygame.K_LEFT] and self.x > 0: 33 | self.x -= self.speed 34 | if keys[pygame.K_RIGHT] and self.x < WIDTH - self.width: 35 | self.x += self.speed 36 | 37 | def draw(self): 38 | pygame.draw.rect(screen, BLUE, (self.x, self.y, self.width, self.height)) 39 | 40 | class FallingObject: 41 | def __init__(self): 42 | self.x = random.randint(0, WIDTH - OBJECT_WIDTH) 43 | self.y = -OBJECT_HEIGHT 44 | self.width = OBJECT_WIDTH 45 | self.height = OBJECT_HEIGHT 46 | self.speed = random.randint(3, 7) 47 | 48 | def move(self): 49 | self.y += self.speed 50 | 51 | def draw(self): 52 | pygame.draw.rect(screen, RED, (self.x, self.y, self.width, self.height)) 53 | 54 | def off_screen(self): 55 | return self.y > HEIGHT 56 | 57 | # Game loop 58 | player = Player() 59 | falling_objects = [] 60 | score = 0 61 | lives = 3 62 | running = True 63 | 64 | while running: 65 | clock.tick(FPS) 66 | screen.fill(WHITE) # Clear screen 67 | 68 | # Handle events 69 | for event in pygame.event.get(): 70 | if event.type == pygame.QUIT: 71 | running = False 72 | 73 | # Player movement 74 | keys = pygame.key.get_pressed() 75 | player.move(keys) 76 | player.draw() 77 | 78 | # Add falling objects periodically 79 | if random.randint(1, 30) == 1: # Lower the number to increase difficulty 80 | falling_objects.append(FallingObject()) 81 | 82 | # Update falling objects 83 | for obj in falling_objects[:]: 84 | obj.move() 85 | obj.draw() 86 | 87 | # Check for collision 88 | if (obj.x < player.x + player.width and 89 | obj.x + obj.width > player.x and 90 | obj.y < player.y + player.height and 91 | obj.y + obj.height > player.y): 92 | lives -= 1 93 | falling_objects.remove(obj) # Remove object on collision 94 | 95 | # Remove objects off screen 96 | elif obj.off_screen(): 97 | falling_objects.remove(obj) 98 | score += 1 # Increase score for avoiding 99 | 100 | # Display score and lives 101 | font = pygame.font.Font(None, 36) 102 | score_text = font.render(f"Score: {score}", True, (0, 0, 0)) 103 | lives_text = font.render(f"Lives: {lives}", True, (255, 0, 0)) 104 | screen.blit(score_text, (10, 10)) 105 | screen.blit(lives_text, (10, 40)) 106 | 107 | # Check game over 108 | if lives <= 0: 109 | game_over_text = font.render("Game Over!", True, (0, 0, 0)) 110 | screen.blit(game_over_text, (WIDTH // 2 - 50, HEIGHT // 2)) 111 | pygame.display.update() 112 | pygame.time.delay(2000) # Pause before quitting 113 | running = False 114 | 115 | pygame.display.update() # Refresh screen 116 | 117 | pygame.quit() 118 | -------------------------------------------------------------------------------- /Python_FarioGame/fario.py: -------------------------------------------------------------------------------- 1 | import pygame 2 | import sys 3 | 4 | # ============================ 5 | # Step 1: Initialize Pygame 6 | # ============================ 7 | pygame.init() 8 | WIDTH, HEIGHT = 800, 600 9 | screen = pygame.display.set_mode((WIDTH, HEIGHT)) 10 | clock = pygame.time.Clock() 11 | pygame.display.set_caption("Mini Mario Style Game") 12 | 13 | # ============================ 14 | # Step 2: Define Colors 15 | # ============================ 16 | WHITE = (255, 255, 255) 17 | BLUE = (66, 135, 245) 18 | GREEN = (0, 200, 0) 19 | RED = (255, 0, 0) 20 | 21 | # ============================ 22 | # Step 3: Classes 23 | # ============================ 24 | 25 | class Player: 26 | def __init__(self, x, y): 27 | self.width = 100 28 | self.height = 60 29 | self.rect = pygame.Rect(x, y, self.width, self.height) 30 | self.vel = [0, 0] 31 | self.speed = 5 32 | self.jump_power = -15 33 | self.gravity = 1 34 | self.on_ground = False 35 | self.health = 100 36 | 37 | def handle_input(self, keys): 38 | if keys[pygame.K_LEFT]: 39 | self.vel[0] = -self.speed 40 | elif keys[pygame.K_RIGHT]: 41 | self.vel[0] = self.speed 42 | else: 43 | self.vel[0] = 0 44 | 45 | if keys[pygame.K_SPACE] and self.on_ground: 46 | self.vel[1] = self.jump_power 47 | self.on_ground = False 48 | 49 | def apply_physics(self, platforms): 50 | self.vel[1] += self.gravity 51 | self.rect.x += self.vel[0] 52 | self.rect.y += self.vel[1] 53 | 54 | self.on_ground = False 55 | for plat in platforms: 56 | if self.rect.colliderect(plat): 57 | if self.vel[1] > 0 and self.rect.bottom <= plat.top + self.vel[1]: 58 | self.rect.bottom = plat.top 59 | self.vel[1] = 0 60 | self.on_ground = True 61 | 62 | 63 | def attack(self): 64 | # Create attack hitbox extending to the right 65 | if self.vel[0] >= 0: # Facing right 66 | attack_rect = pygame.Rect(self.rect.right, self.rect.y + 10, 40, self.height - 20) 67 | else: # Facing left 68 | attack_rect = pygame.Rect(self.rect.left - 40, self.rect.y + 10, 40, self.height - 20) 69 | return attack_rect 70 | 71 | def draw(self, surface, scroll_x): 72 | pygame.draw.rect(surface, BLUE, (self.rect.x - scroll_x, self.rect.y, self.width, self.height)) 73 | 74 | 75 | class Enemy: 76 | 77 | def __init__(self, x, y, width=40, height=40): 78 | self.rect = pygame.Rect(x, y, width, height) 79 | self.speed = 10 80 | self.health = 30 81 | 82 | def draw(self, surface, scroll_x): 83 | pygame.draw.rect(surface, RED, (self.rect.x - scroll_x, self.rect.y, self.rect.width, self.rect.height)) 84 | 85 | 86 | # ============================ 87 | # Step 4: Platforms 88 | # ============================ 89 | platforms = [ 90 | pygame.Rect(0, HEIGHT - 40, 2000, 40), 91 | pygame.Rect(300, HEIGHT - 150, 100, 20), 92 | pygame.Rect(500, HEIGHT - 250, 100, 20), 93 | pygame.Rect(750, HEIGHT - 180, 150, 20), 94 | pygame.Rect(1000, HEIGHT - 300, 100, 20) 95 | ] 96 | 97 | # ============================ 98 | # Step 5: Create Player and Enemies 99 | # ============================ 100 | player = Player(100, HEIGHT - 150) 101 | enemies = [Enemy(600, HEIGHT - 100), Enemy(1100, HEIGHT - 340)] 102 | 103 | # ============================ 104 | # Step 6: Game Loop 105 | # ============================ 106 | running = True 107 | while running: 108 | clock.tick(60) 109 | screen.fill(WHITE) 110 | 111 | # ============================ 112 | # Step 7: Event Handling 113 | # ============================ 114 | for event in pygame.event.get(): 115 | if event.type == pygame.QUIT: 116 | pygame.quit() 117 | sys.exit() 118 | 119 | # ============================ 120 | # Step 8: Input 121 | # ============================ 122 | keys = pygame.key.get_pressed() 123 | player.handle_input(keys) 124 | 125 | # Handle attack key 126 | attack_rect = None 127 | if keys[pygame.K_a]: # Press A to attack 128 | attack_rect = player.attack() 129 | 130 | # ============================ 131 | # Step 9: Physics 132 | # ============================ 133 | player.apply_physics(platforms) 134 | 135 | # ============================ 136 | # Step 10: Enemy Collision 137 | # ============================ 138 | for enemy in enemies[:]: 139 | if player.rect.colliderect(enemy.rect): 140 | if player.vel[1] > 0 and player.rect.bottom <= enemy.rect.top + player.vel[1]: 141 | enemies.remove(enemy) 142 | player.vel[1] = player.jump_power // 2 # Bounce 143 | 144 | if attack_rect: 145 | for enemy in enemies[:]: 146 | if attack_rect.colliderect(enemy.rect): 147 | enemies.remove(enemy) 148 | # ============================ 149 | # Step 11: Camera Scroll 150 | # ============================ 151 | scroll_x = player.rect.x - WIDTH // 2 152 | 153 | # ============================ 154 | # Step 12: Drawing 155 | # ============================ 156 | for plat in platforms: 157 | pygame.draw.rect(screen, GREEN, (plat.x - scroll_x, plat.y, plat.width, plat.height)) 158 | 159 | for enemy in enemies: 160 | enemy.draw(screen, scroll_x) 161 | 162 | if attack_rect: 163 | pygame.draw.rect(screen, (0, 0, 0), (attack_rect.x - scroll_x, attack_rect.y, attack_rect.width, attack_rect.height), 2) 164 | 165 | player.draw(screen, scroll_x) 166 | 167 | pygame.display.flip() 168 | --------------------------------------------------------------------------------