I'll create a simple text-based parkour game featuring a potato! Here's a Python implementation:
import random
import time
class PotatoParkour:
def __init__(self):
self.position = 0
self.momentum = 0
self.stamina = 100
self.score = 0
self.game_over = False
def display_scene(self):
print("\n" * 2)
print("POTATO PARKOUR")
print(f"Score: {self.score} | Stamina: {self.stamina}")
print("-" * 50)
# Display the parkour course
course = [' '] * 50
course[self.position] = '🥔'
# Add obstacles
obstacles = self.generate_obstacles()
for pos, obstacle in obstacles:
if pos < 50 and pos != self.position:
course[pos] = obstacle
print(''.join(course))
print("-" * 50)
def generate_obstacles(self):
obstacles = []
for i in range(self.position + 5, min(self.position + 20, 50), 3):
obstacle_type = random.choice(['|', '▓', '^', '═'])
obstacles.append((i, obstacle_type))
return obstacles
def get_move(self):
print("\nActions:")
print("1. Roll forward (→)")
print("2. Jump (↑)")
print("3. Slide (↓)")
print("4. Wall bounce (↗)")
print("5. Rest (recover stamina)")
choice = input("Choose action (1-5): ")
return choice
def execute_move(self, move):
if move == '1': # Roll
self.position += 2
self.momentum += 1
self.stamina -= 5
self.score += 10
print("The potato rolls forward gracefully!")
elif move == '2': # Jump
jump_distance = 3 + self.momentum
self.position += jump_distance
self.momentum = max(0, self.momentum - 1)
self.stamina -= 10
self.score += 20
print(f"The potato launches into the air, traveling {jump_distance} spaces!")
elif move == '3': # Slide
slide_distance = 4 if self.momentum > 0 else 2
self.position += slide_distance
self.momentum += 2
self.stamina -= 8
self.score += 15
print(f"The potato slides smoothly for {slide_distance} spaces!")
elif move == '4': # Wall bounce
if random.random() > 0.3: # 70% success rate
self.position += 5
self.momentum = 3
self.stamina -= 15
self.score += 30
print("Epic wall bounce! The potato ricochets forward!")
else:
self.position += 1
self.momentum = 0
self.stamina -= 20
print("Oops! The potato fumbles the wall bounce!")
elif move == '5': # Rest
self.stamina = min(100, self.stamina + 20)
self.momentum = 0
print("The potato takes a breather...")
# Check for obstacles hit
if random.random() < 0.2 and move != '5':
print("💥 Hit an obstacle! -10 stamina")
self.stamina -= 10
def check_game_status(self):
if self.position >= 45:
print("\n🎉 VICTORY! The potato completed the parkour course!")
print(f"Final Score: {self.score}")
self.game_over = True
elif self.stamina <= 0:
print("\n😵 The potato is too exhausted to continue!")
print(f"Final Score: {self.score}")
self.game_over = True
def play(self):
print("Welcome to Potato Parkour!")
print("Guide your potato through the obstacle course!")
print("Build momentum for bigger moves, but watch your stamina!")
while not self.game_over:
self.display_scene()
if self.stamina < 30:
print("⚠️ Low stamina warning!")
move = self.get_move()
if move in ['1', '2', '3', '4', '5']:
self.execute_move(move)
time.sleep(1)
self.check_game_status()
else:
print("Invalid move! Try again.")
play_again = input("\nPlay again? (y/n): ")
if play_again.lower() == 'y':
self.__init__()
self.play()
# Run the game
if __name__ == "__main__":
game = PotatoParkour()
game.play()
This game features:
Gameplay Elements:
- A potato that moves through a 50-space parkour course
- Different moves with varying stamina costs and distances
- Momentum system that affects jump distance
- Random obstacles and hazards
- Score tracking based on moves performed
Controls:
- Roll - Basic forward movement
- Jump - Distance based on momentum
- Slide - Builds momentum quickly
- Wall bounce - High risk, high reward move
- Rest - Recover stamina
Strategy Tips:
- Build momentum with slides before big jumps
- Manage stamina carefully - running out means game over
- Wall bounces give the most points but can fail
- Sometimes it's better to rest than push forward
The game uses emoji for the potato (🥔) and various ASCII characters for obstacles. It's designed to be simple but engaging, with the potato's parkour moves described in fun action text. Would you like me to add any additional features like power-ups, different difficulty levels, or special moves?