Skip to content

The racing game created in a multi-threaded setup using pthreads and ncurses library in C. This was a project created as part of the OS course lab.

Notifications You must be signed in to change notification settings

animeshk-me/game-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Car game - don't get wrecked!

Table of contents

Introduction

This Project is a realization of an old game I used to play in a handheld video-game device as a child.

  • This simple game is created using ncurses.h library of C on the LINUX OS.
  • This involves multithreading using pthreads(POSIX threads) library in C.
  • There are threads running in parallel to-
    • keep the fences running to create and illusion of car moving ahead
    • use a Randomized algorithm to generate obstacles
    • calculate the score
    • listen to keyboard inputs
    • refresh the page to re-render the car at new location

How to play the game

  • Press A and D for left and right movements respectively
  • Change lanes to make sure you don't get wrecked by the obstacles for as long as possible.
  • The longer you stay on the roads, the higher the score. Keep breaking highscores!!

Execution method:

To execute the main_experiment.c

  • cd into the project directory and run

    make

  • Then run

    ./exp


Few Screenshots:

  • Basic set up of the game

Alt text

  • Gameover and highscore page

Alt text

Contact developer

Animesh Kumar

email: [email protected]

phone: +91 7985851496

About

The racing game created in a multi-threaded setup using pthreads and ncurses library in C. This was a project created as part of the OS course lab.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published