Skip to content

This repository is about a basic game that I developed in class 11th

Notifications You must be signed in to change notification settings

va26/Basic-C-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Basic-C-Game

Description

I developed this game as a part of my winter project in class 11th. In this game the user controls his car (green) with the left and right arrow keys and has to dodge the obstacles (opponent cars in blue) which are descending randomly (in two columns) on the screen. This game has several levels and with the increase in each level the speed of the game increases until there is a winner!

Below are some of the screen captures during an actual gameplay:

Screenshot 1 Screenshot 2
first image first image

Challenges I faced

  • The biggest challenge was to give a grapical display without using Graphics.h library. So I overcame this problem by using the ASCII values then used them creatively to give the shape of a car and the background as the road.
  • The second was to switch between the continuous operation :-
    1. The movement of the obstacles
    2. The switch between the left and right position on te user end
  • so I overcame this by using if-else contruct and kbhit() function which allowed the user to switch quickly without counting the key press (even for long time) as several inputs.

Getting Started

Just download the .CPP file and you can compile and run the code on TurboC++ or TurboC

Author

Vatsal Aggarwal

About

This repository is about a basic game that I developed in class 11th

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages