C++ for Beginners: Build a 2D Arcade Game From Scratch
C++ is a powerful, general-purpose programming language used to build everything from operating systems to web browsers and video games.
C++ has been around for over 30 years and is one of the most widely used programming languages in the world. Its popularity is still on the rise because it offers so many benefits, including the following:
- Compatibility with all kinds of platforms, including Windows, MacOS, and Linux-based systems (like Android).
- Flexibility in terms of how you write your code – procedural, object-oriented, or functional style methods depending on what works best for your project.
- Direct compilation into machine code makes C++ faster than languages like Python or Ruby that run through an interpreter first.
If you’re a beginner who is interested in learning the basics of C++, you have come to the right place! Get started with our new free course on JetBrains Marketplace.
Prerequisites and topics covered
In this course, you will learn about the distinctive features of the C++ language compared to other programming languages and its areas of use, such as high-performance applications, graphics, and system programming. By the end of the course, you will build a working game that you can modify and further improve upon.
While C++ Basics is designed for beginners who are new to the C++ language, it is recommended that learners already have some basic programming knowledge about variables and fundamental structures like if-then-else. This will make it easier to understand the programming concepts that are covered here and enable students to keep up with the lessons.
However, even if you’re a complete beginner, don’t let that discourage you! The course is designed to be accessible to those who are new to programming, and you’ll be building your skills as you work through the lessons.
The course is split into 5 modules, with each module covering specific topics and aspects of the C++ language:
🟣 Basic programming primitives
🟣 Manual memory management
🟣 Object-oriented programming
🟣 Template metaprogramming and functional programming features
🟣 Standard library (including STL)
In the first released module, you will learn the basics of C++ programming, including variable declaration, primitive types,
std::string for text data, input/output, basic control-flow, functions, custom data types, arrays, random number generation, and program debugging in an IDE.
The course project: controlling a planet in space
Throughout the course, you will be developing a simple 2D arcade game, in which you control a planet. The goal is to get as many points as possible by consuming smaller asteroids and dodging black holes.
As you progress through the course, you will improve the game by implementing new functionality based on the concepts you have learned. For example, you might add sound effects, or animations.
You’ll start by learning about basic programming primitives in C++, then move to arrays, pointers and manual memory management, then on to classes, inheritance, operator overloading, and then to lambda functions, templates and other features. By the end of the course, you will have a fully functional game that you can play and modify as you like.
Building a game is an excellent way to learn programming concepts as it involves designing and implementing a complex system using various programming skills. You will learn how to use the C++ language to create a basic graphical user interface, handle user input, and manage game objects. These skills are transferable to other programming projects and can be used to develop more advanced games or applications in the future.
Continuing your journey with C++ programming
C++ is widely used in various industries, from gaming and finance to robotics and software development. It offers high performance, memory management, and low-level control, making it a popular choice for developing complex systems and applications.
As a result, there are plenty of career opportunities for C++ developers, including roles such as software engineers, game developers, embedded systems developers, and more. Additionally, with the growing demand for IoT and AI technologies, the demand for C++ developers is expected to continue to grow in the near future, making it a valuable skill set to have in today’s job market.
You’ve now learned the basics of C++ and are ready to continue your journey. Stay tuned for the next modules of the course with more advanced topics. If you have any questions or comments, please reach out to us in the comments or at email@example.com.
Good luck and have fun learning!
Your JetBrains Academy team
Subscribe to Blog updates
Thanks, we've got you!