Skip to content

Silent18Killer/Python-Turtle-Crossing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python-Turtle-Crossing

This is Project Demo

Projects Details

This is a Python Turtle Crossing Game.

  • player.py -> This file is responsible for creating the turtle player for playing the game.
  • scoreboard.py -> It handles the creation of the scoreboard, keeping track of player score after completing the current level and leveling up.
  • car_manager.py -> This file creates so many cars while playing the game.
  • main.py -> The main file orchestrates everything. When you run this file, it opens a window where you can play the game.

Breaking down the Game Code

So we need to figure out how to exactly get the game set up and below is how we broke down the project:

  • Move the turtle up with a specified keypress
  • Create and move cars
  • Detect collisions with cars and display a "GAME OVER"
  • Detect completion of the game and start a new level
  • Create a scoreboard.

How to Play

  1. Run the main.py file.
  2. Use the "Up" arrow key to move the player character upwards.
  3. Avoid getting hit by the cars moving across the road.
  4. Safely reach the other side of the road to score points.
  5. The game gets progressively harder as you advance levels.

How It Works

  • The game window is set up using the Turtle module.
  • The player can move their character up using the "W" arrow key.
  • Cars are generated and move from the right side of the screen to the left.
  • Collision detection is used to determine if the player character collides with any cars.
  • If the player reaches the other side safely, the level increases, making the game more challenging.

Programming languages used:-

python

Developer

@Silent18Killer