ravi-kumar7 / CppND-Capstone-Racing-Game

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CPPND: Capstone Car Racing Game

A simple 2D endless Car racing game developed using C++ and SDL.

This repository is for the Capstone project required for completing Udacity C++ Nanodegree Program. The code is based on the Capstone Snake Game Example provided by Udacity.

Udacity Capstone Project Requirements (Rubric Points)

This project fulfills the below Rubric points:

1. README (All Rubric Points REQUIRED)

  • A README with instructions is included with the project
    • Yes
  • The README indicates which project is chosen
    • Yes
  • The README includes information about each rubric point addressed
    • Yes.

2. Compiling and Testing (All Rubric Points REQUIRED)

  • The submission must compile and run
    • Yes, Program compiles and runs sucessfully.

3. Loops, Functions, I/O

  • The project demonstrates an understanding of C++ functions and control structures

    • Project uses if-else, switch , while loop, for loop, system defined, and user defined functions.
  • The project accepts user input and processes the input

    • Project accepts user input to move vehicle left and right.

4. Object Oriented Programming

  • The project uses Object Oriented Programming techniques
    • Yes.
  • Classes use appropriate access specifiers for class members
    • Yes.
  • Class constructors utilize member initialization lists
    • Yes: please refer code e.g. game.cpp or traffic_generator.cpp.
  • Classes encapsulate behavior
    • Yes: e.g. TrafficGenerator::GenerateVehicle() in trafficgenerator.h, Vehicle::CheckCollision() in vehicle.h, etc.
  • Classes follow an appropriate inheritance hierarchy
    • Yes, Player, Vehicle, and Track inherits from GameObject class.

5. Memory Management

  • The project makes use of references in function declarations
    • Yes.
  • The project uses destructors appropriately
    • Yes, Project uses smart pointers.
  • The project follows the Rule of 5
    • No: smart pointers are used instead.
  • The project uses smart pointers instead of raw pointers
    • Yes, shared smart pointers are used.

6. Concurrency

  • The project does not uses multithreading.

Dependencies for Running Locally

Basic Build Instructions

  1. Clone this repository.
  2. Make a build directory in the top level directory: mkdir build && cd build
  3. Compile: cmake .. && make
  4. Run it: ./RoadRacing.

About


Languages

Language:C++ 81.3%Language:CMake 18.7%