Navigation Menu

Search code, repositories, users, issues, pull requests..., provide feedback.

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly.

To see all available qualifiers, see our documentation .

  • Notifications You must be signed in to change notification settings

A 2D Snake game using C++ and SDL

udacity/CppND-Capstone-Snake-Game

Folders and files.

NameName
22 Commits
workflows workflows

Repository files navigation

Cppnd: capstone snake game example.

This is a starter repo for the Capstone project in the Udacity C++ Nanodegree Program . The code for this repo was inspired by this excellent StackOverflow post and set of responses.

The Capstone Project gives you a chance to integrate what you've learned throughout this program. This project will become an important part of your portfolio to share with current and future colleagues and employers.

In this project, you can build your own C++ application or extend this Snake game, following the principles you have learned throughout this Nanodegree Program. This project will demonstrate that you can independently create applications using a wide range of C++ features.

Dependencies for Running Locally

  • All OSes: click here for installation instructions
  • Linux: make is installed by default on most Linux distros
  • Mac: install Xcode command line tools to get make
  • Windows: Click here for installation instructions
  • All installation instructions can be found here
Note that for Linux, an apt or apt-get installation is preferred to building from source.
  • Linux: gcc / g++ is installed by default on most Linux distros
  • Mac: same deal as make - install Xcode command line tools
  • Windows: recommend using MinGW

Basic Build Instructions

  • Clone this repo.
  • Make a build directory in the top level directory: mkdir build && cd build
  • Compile: cmake .. && make
  • Run it: ./SnakeGame .

CC Attribution-ShareAlike 4.0 International

CC BY-SA 4.0

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License .

CC BY-SA 4.0

Contributors 3

  • CMake 28.8%

100 Most Popular Courses For October

udacity capstone project c

3000+ Online Courses from California Community Colleges (Fall 2024)

Class Central experiments with cataloging online courses from California Community Colleges, offering diverse, affordable, and credit-worthy learning opportunities.

  • [2024] 200+ edX Courses That Are Completely Free
  • 6 Best Linguistics Courses for 2024
  • 7 Best Microsoft PowerPoint Courses for 2024
  • 7 Best Microsoft Power BI Courses for 2024
  • 5 Best Free Human Physiology Courses for 2024

600 Free Google Certifications

Most common

  • web development

Popular subjects

Artificial Intelligence

Web Development

Popular courses

Learn Like a Pro: Science-Based Tools to Become Better at Anything

Paleontology: Theropod Dinosaurs and the Origin of Birds

Introduction to Complexity

Organize and share your learning with Class Central Lists.

View our Lists Showcase

Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

via Udacity Nanodegree Help

  • C++ Foundations
  • Learn how to develop, compile, and execute C++ programs as well as syntax, functions, containers, and how to link together multiple files.
  • Object-Oriented Programming
  • Memory Management
  • Concurrency
  • Career Services

David Silver, Stephen Welch, Andreas Haja, Victor N., Hsin-Wen C., Francisco V., Alexandre S., Luis L. and Anwar J.

Related Courses

Related articles, 10 best c++ courses for 2024: a lang for the modern age, massive list of mooc-based microcredentials.

4.8 rating, based on 10 Class Central reviews

4.8 rating at Udacity based on 731 ratings

Select rating

Start your review of C++

  • AA Anonymous 2 years ago I'm very impressed with this program - the combination of 1) short videos; 2) custom reading material (in manageable length snippets); 3) links to applicable web sites with additional detail and; 4) interactive exercises with live explanations - make the program interesting enough to dive in deeply but easy to put aside when other priorities arise. I find the videos with Bjarne Stroustrup to be particularly interesting, providing a fantastic perspective. The highly responsive mentor help with searchable history and comprehensive project reviews have been the icing on the cake. Thanks. Helpful
  • Ram Prasanth 2 years ago In my opinion, this program is going to transform someone into a high profile C++ developer. Because this program does not only teach how things work, but also puts a participant into how to solve a real world (like) projects with the concepts that were taught. And not just one such project, but five of them. I am currently pursuing the course and I am sure that I am in a right place. To anyone reading this comment, it’s a right decision to take the course and it’s worth it. Helpful
  • AA Anonymous 2 years ago This program is amazing! The content of the course covers the main points of OOP and I specially love the part about concurrency and dynamic memory, which will allow me to make all my programs more professional. I am desiring to start development my videogames and electronic applications using the content of the program. Also the projects help you to learn how to work on a real C++ application." Helpful
  • AA Anonymous 1 year ago Really appreciate the review the tutor wrote for me, which is personalized and gives me correct guidance on my coding style. Helpful
  • KJ Kwaku Josh 2 years ago What stands out for me is the balance between theory and practice. This is something I have been missing since I started to learn c++ on my own and this nanodegree program does a perfect job of giving the right dose of each. Helpful
  • AA Anonymous 2 years ago The experience is very good until now except that it will be better if we have more examples during our journey. The technical monitor is very helpful and very responsive Helpful
  • JN Josi Kie Nababan 2 years ago It's good. New experience for me, and exercise me to be a good C++ programmer. Thank you teacher, my mentor, mentor reviewer, and Udacity! Udacity is best. Helpful
  • AA Anonymous 2 years ago I request Udacity team to extend the deadlines, as I am learning this course while working in the office. Helpful
  • AA Anonymous 3 years ago This project was very interesting, challenging and funny. You also made a very detailed and deep review over the project I sent, with great and interesting positive comments. I'll take into account all suggestions you made to improve my coding quality. Thank you Helpful
  • AA Anonymous 3 years ago "Honestly it was pretty hard for me to go from lessons to project, I had too many doubts initially, due probably to my low level of English. But I try." Helpful

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Udacity

Learn C++ to code self-driving cars, robots, embedded systems, and much more

Start Learning

Today, Udacity is excited to launch a new version of the C++ Nanodegree Program . This program equips students with the C++ skills to launch and advance careers programming the most exciting technology in the world.

C++ is an efficient, high-performance programming language used to code everything from self-driving cars and robots to servers, media platforms, video games, and applications that require blazing-fast performance. It is one of the top five most important computer programming languages.

“Self-driving cars would not be possible without C++,” says Udacity founder Sebastian Thrun. “I programmed the self-driving car that won the DARPA Grand Challenge using C++. The Google Self-Driving Car Project, now called Waymo , was launched with C++.”

Demand for C++ engineers is growing as employers search for talent to develop complex autonomous and artificial intelligence software systems, and employers are willing to pay top dollar for that talent – according to Glassdoor’s salary database, as of October 2019, C++ Developers in the US average a yearly salary of over $95,000. As the top skill needed for autonomous vehicle jobs , C++ is the language powering the future of technology and transportation. 

Learn C++ programming online

An Overview of the C++ Nanodegree Program

The C++ Nanodegree program takes four months to complete and teaches C++ fundamentals as well as advanced skills in object-oriented programming, memory management, and concurrency. 

The program teaches real-world tools and best practices, including Bjarne Stroustrup’s C++ Core Guidelines , the Microsoft Visual Studio Code development environment, and several testing frameworks.

Designed for software engineers with previous programming experience in any language, this program teaches students practical C++ skills through five real-world projects, numerous programming exercises, videos, and quizzes. Throughout the program, students can develop programs on their personal computers, or use Udacity Workspaces, a cloud programming environment.

Build Five Real-World Projects

Throughout the course, students will build a portfolio of high-quality C++ projects that they will be able to showcase to hiring managers and recruiters. These projects include:

  • Build an OpenStreetMap Route Planner —  Throughout the first course, you’ll learn basic C++ syntax, functions, containers, and compiling and linking with multiple files. Then, you’ll use OpenStreetMap and the 2D visualization library, IO2D, to build a route planner that displays a path between two points on a map. By the end of this project, you’ll be able to select starting and ending areas on a city map and your program will find a path along the city streets to connect the start and end.
  • Build a System Monitor Using Object-Oriented Programming — In the program’s second course, you’ll explore Object-Oriented Programming (OOP) in C++ with examples and exercises covering the essentials of OOP, like abstraction and inheritance, as well as advanced topics, like polymorphism and templates. You’ll synthesize your skills to build a Linux system monitor application to demonstrate C++ OOP in action! Not only will you gain more familiarity with the Linux operating system, you’ll also gain insights into how a collection of objects can function together in C++ to form a complete application.
  • Build a Chatbot — In the third course, you’ll discover the complexity of memory management by learning static and dynamic memory in C++, using the Resource Acquisition Is Initialization pattern, pointers, references, and move semantics. For this project, you’ll use the modern C++ memory management techniques you’ve worked with to build a chatbot.
  • Build a Concurrent Traffic Simulation — In this project, you’ll build a multithreaded traffic simulator using a real urban map, where you’ll run each vehicle on a separate thread, and manage intersections to facilitate traffic flow. Concurrency is an advanced programming technique that, when properly implemented, can dramatically accelerate your C++ programs. 
  • Capstone Project: Build Your Own C++ Application —   The C++ Nanodegree’s capstone project is the creation of a unique application designed by each student leveraging their newly-acquired C++ skills.

Supporting You in this Nanodegree Program

Learning C++ is an exciting challenge, and we’re excited to support you every step of the way. When you enroll in this program, you’ll have access to Udacity’s student support services, which include: 

Project reviews: Each time a student submits a project, a member of Udacity’s reviewer network provides personalized feedback on how to improve the project. If the project does not meet specifications, they have the chance to improve and resubmit it. Our services model monitors student progress to make sure no student gets stuck.

Access to a mentor: Udacity mentors are key to student success. They answer questions, review work, and give webinars to help students throughout the program.

Student community: Students can connect with one another during the program to discuss the courses and projects, chat about job search strategies, or just network and support progress through the program.

Career services: Through our Career Services , students receive feedback on their LinkedIn profile, Github portfolio, and resume, as well as learn useful tips for interviewing and landing a job.

Demand for C++ engineers and developers has never been higher. The C++ Nanodegree program ’s combination of a world-class curriculum and student services is the perfect path to launch and advance careers in the cutting-edge domains that depend on C++.

Enroll today and become a C++ developer!

David Silver

Popular Nanodegrees

Programming for data science with python, data scientist nanodegree, self-driving car engineer, data analyst nanodegree, android basics nanodegree, intro to programming nanodegree, ai for trading, predictive analytics for business nanodegree, ai for business leaders, data structures & algorithms, school of artificial intelligence, school of cyber security, school of data science, school of business, school of autonomous systems, school of executive leadership, school of programming and development, related articles.

udacity capstone project c

The 10 Key Principles of Responsive Web Design: A Beginner’s Guide

udacity capstone project c

Udacity Unveils a Completely Revamped iOS Developer Nanodegree Program

udacity capstone project c

How Do I Become A Programmer? The 7-Step Guide

udacity capstone project c

Help Shape The World of Web3 with Udacity’s New Blockchain Nanodegree Program

[et_bloom_locked optin_id=”optin_4″]

Click below to download your preferred Career Guide

Web Developer Career Guide Cloud Career Guide Data Career Guide Robotics Career Guide

[/et_bloom_locked]

IMAGES

  1. Udacity capstone project :: Behance

    udacity capstone project c

  2. GitHub

    udacity capstone project c

  3. GitHub

    udacity capstone project c

  4. Udacity capstone project :: Behance

    udacity capstone project c

  5. GitHub

    udacity capstone project c

  6. [Data_Engineer]

    udacity capstone project c

VIDEO

  1. Capstone project

  2. Udacity capstone Project for ML with AzureML

COMMENTS

  1. JLee21/udacity-cpp-snake-game-capstone - GitHub

    Project: Capstone Snake Game Clone. Overview. This C++ project is the fifth and final project of the Udacity C++ Nanodegree. The source code has been heavily adapted from the provided starter code located at (Udacity's repo) [https://github.com/udacity/CppND-Capstone-Snake-Game].

  2. GitHub - jeff231li/CppND-Capstone-Ising: My Udacity C++ ...

    Capstone project for Udacity's C++ Nanodegree program consisting on an implementation of the 2D Ising model using the Metropolis Monte Carlo algorithm. Most codes available requires the user to set the parameters of the simulation by changing the code and recompiling.

  3. GitHub - udacity/CppND-Capstone-Snake-Game: A 2D Snake game ...

    In this project, you can build your own C++ application or extend this Snake game, following the principles you have learned throughout this Nanodegree Program. This project will demonstrate that you can independently create applications using a wide range of C++ features.

  4. 02. Steps to Complete the Capstone - learn-udacity.top

    Step 1: Propose a Project. Identify the application you want to build. We recommend keeping the functionality as simple as possible to start with. Note that it is fine to reuse code from any of the courses in the Nanodegree as a starting point.

  5. C++ Capstone Project - learn-udacity.top

    The project demonstrates an understanding of C++ functions and control structures. A variety of control structures are used in the project. The project code is clearly organized into functions. The project reads data from a file and process the data, or the program writes data to a file.

  6. Online Course: C++ from Udacity - Class Central

    Learn high-performance programming for exciting engineering applications like robotics, browsers, and video games. Master syntax, functions, OOP, memory management, and concurrency in this comprehensive course.

  7. How I completed Udacity’s Cloud Devops Capstone Project and ...

    Aim of the Capstone project. In this project, we were required to apply the skills and knowledge which were developed throughout the Cloud DevOps Nanodegree program in order to deploy a...

  8. Learn C++ Programming Language Online - Udacity

    Capstone Project: Build Your Own C++ Application — The C++ Nanodegree’s capstone project is the creation of a unique application designed by each student leveraging their newly-acquired C++ skills.

  9. C++ Capstone Project - learn-udacity.top

    01. Capstone Intro 02. Steps to Complete the Capstone 03. Game Programming 04. The SDL Library 05. Snake Game Code Walkthrough 06. Capstone Workspace Project Description - C++ Capstone Project Project Rubric - C++ Capstone Project Back to Home

  10. Udacity Capstone Project - Medium

    Project Overview After centuries of intense whaling, recovering whale populations still have a hard time adapting to warming oceans and struggle to compete every day with the industrial fishing...