Posts

Showing posts with the label MAKING BASIC CAR GAME USING PYTHON'S MODULE PYGAME---

CAR GAME | PYTHON'S MODULE PYGAME---

Image
Making CAR GAME Using PYTHON Pygame: drag_coder Source Code here: ------------------------------Source Code ------------------ import pygame pygame.init() import random import math import time -------setup the screen---- wn=pygame.display.set_mode((798,600)) pygame.display.set_caption('Crazy Car Game') logo=pygame.image.load('car.png') pygame.display.set_icon(logo) bg=pygame.image.load('bg.png') -------variable----- counttime=3 fps=100 clock=pygame.time.Clock() over=pygame.font.Font('freesansbold.ttf',42) countdown=pygame.font.Font('freesansbold.ttf',42) ----font of text---- font_crash=pygame.font.Font('freesansbold.ttf',72) crash_x=270 crash_y=300 score --- score_value=0 font=pygame.font.Font('freesansbold.ttf',32) Background music---- Adding main car---- car=pygame.image.load('car.png') Adding car1----  car1=pygame.image.load('car1.jpeg') Adding car1----    car2=pygame.image.l