Giter VIP home page Giter VIP logo

chandan0069 / turtle-crossing Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 3 KB

This Python program is a fun and challenging turtle crossing game! Guide your turtle across a busy road, dodging oncoming cars to reach the finish line. Levels get progressively harder as the cars get faster. Enjoy the race!

Python 100.00%
basic-games-in-python event-handling game-loop gui level-progression oops python3 turtle-graphics

turtle-crossing's Introduction

Turtle Crossy Road

This is a simple Python game where the player navigates a character across a busy road filled with moving cars. The goal is to safely reach the other side without getting hit by a car.

Requirements

  • Python 3.x
  • Turtle module

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.

Files

  • main.py: Contains the main game loop and setup.
  • player.py: Defines the Player class responsible for player movement.
  • car_manager.py: Manages the cars moving on the road.
  • scoreboard.py: Keeps track of the player's score and level.

How It Works

  • The game window is set up using the Turtle module.
  • The player can move their character up using the "Up" 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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.