Back to Browse

Simple C++ Game -- Part 03 -- Refactor into C++ Classes

743 views
Apr 30, 2022
24:36

Part 03 of this series. Next Video: https://youtu.be/xPA4A7EqjC4 Series Overview: The game we will make in this series is kind of like a simplified Pac-Man style game. You will be able to move a character around the window and "eat" food while avoiding the "enemies" and the boundary of the window or it's "Game Over!" Discord Server: https://discord.com/channels/986595025213349918/986596055175016459 Web: https://punchedtapemedia.com/x11game-part03 Source Code: https://github.com/punchedtapemedia/x11game In this video I will show you: - How to refactor the working code into better, more well-organized code - How to refactor C code into C++ code using C++ Classes - Continue to demonstrate how to use vim editor C/C++ Programming Concepts Utilized: - Classes - Constructors, Destructors, member variables - Namespaces - RAII - Resource Acquisition Is Initialization 00:00 Display class constructor 04:52 Use RAII approach in Display Class Constructor 06:14 Display class Destructor, create namespace 07:54 Create accessor member functions 09:37 Test refactoring efforts & fix bugs 11:12 Create Game class 14:48 Create main loop in Game class 19:39 Test and fix bugs Why use X11?? Because it's actually pretty easy to use, it's ubiquitous on essentially all Linux platforms, and it's kind of different from the norm.

Download

0 formats

No download links available.

Simple C++ Game -- Part 03 -- Refactor into C++ Classes | NatokHD