Giter Club home page Giter Club logo

kartracer's Introduction

kartracer

A simple car-driving "game", written in C using OpenGL.

Summary

This was the final project for my sophomore year graphics class. I didn't really know how to code, but I had a ton of fun writing it. It is rudimentary because the course focused on theory, not practical application. As a result, we only used C instead of C++, and all graphics objects are created from scratch via OpenGL primitives.

For a longer summary, please take a look at infosheet.txt.

Demo

There are three different cars and many different colors to choose from: demo of cars

A full track with speedometer: demo of track

Key features

  • 3 fully custom vehicles (sports car, F1 car, truck)
  • 20 color options
  • 4 customizable camera positions (front bumper, 1st person, 3rd person, and fixed central location)
  • Real time model updates, with toggleable headlights, wheels that turn, and working brake + reverse lights
  • speedometer
  • three gears (D, N, R)
  • full track with checkpoints
  • toggleable minimap of current track position
  • lap timer

Install

If you're on Windows, just use the compiled KartRacer.exe. If you'd like to recompile the source code, you'll have to install OpenGL (I've tried to include some of the dependencies here, but you'll have to get the rest from https://www.opengl.org/). Good luck ๐Ÿ˜‰. Next you'll need a compiler. gcc works well if you have it, but it's not installed by default on Windows. While developing kartracer, I used lcc. Refer to use.bat for how to compile and link with the OpenGL dll files.

Full Controls

For a longer summary, please take a look at infosheet.txt.

Movement

W = accelerate
S = brake
A = turn left
D = turn right
E = emergency brake (only works when car is in drive)

Car Options

LEFT-CLICK = change car model
RIGHT-CLICK = open color selection menu
H = turn on headlights
Y = turn off headlights
B = turn on minimap
N = turn off minimap
C = show lap timer
V = hide lap timer
R = restart lap timer

Camera

I = move camera position forward
O = move camera position backward
U = move camera position up
J = move camera position down
1 = nose camera position
2 = body camera position
3 = behind camera position
4 = zoomed-out camera position
9 = car camera view
0 = fixed camera view

Game options

P = pause
Q = quit

kartracer's People

Contributors

wcarhart avatar

Watchers

James Cloos avatar  avatar

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.