Click here to Skip to main content
15,891,033 members
Articles / Multimedia / OpenGL

A Very Simple Car Race Game in C# and OpenGL

Rate me:
Please Sign up or sign in to vote.
4.89/5 (25 votes)
30 Mar 2020CPOL3 min read 141.6K   18.4K   44  
A simple straightforward car race game with minimum LOC.
This article is a simple straightforward car race game with minimum lines of code. There are 3 cars that begin in a start line, they randomly change their speeds on the race and the race ends on an end line, quite simple.
using System;
using System.Collections.Generic;
using System.Windows.Forms;

namespace CarRace
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new MainForm());
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
United States United States
Born on 86, had my first computer at the age of 8, wrote my first code at the age of 15(pascal), began to study software engineering at 2005 and graduated in 2010. I have a dev blog www.vasilydev.blogspot.com. My real passion is 3D game programming and playing guitar. I've programmed stuff in C#, python, Delphi, PHP, C++, JS, QT and others...

Comments and Discussions