Gustavo Pezzi – C++ Game Engine Programming
Description Of C++ Game Engine Programming
Learn the fundamentals of 2D game engine development and create a simple game engine using C++ SDL and Lua scripting
This C++ Game Engine Programming course is a gentle and comprehensive introduction to the fundamentals of 2D game engine architecture. We’ll discuss several of the most popular programming patterns used in game development and try to put all the theory we learn into context by coding a small 2D game engine using modern C++, SDL, and Lua.
We will write, together, a small ECS framework from scratch to manage our entities, components, and systems. We will discuss how engine programmers design their code and how we should think of organizing game objects in memory with performance in mind.
The tools you’ll need
- C++ is a powerful compiled language
- SDL2 is a library for cross-platform rendering and input
- GLM is a math helper library
- Dear ImGui is a library to create UI for engine tooling
- Sol is a binding library for modern C++ & Lua
Lua is fast and easy to use scripting language
We’ll try to write most of our engine code from scratch. All these libraries and tools are cross-platform, so you’ll be able to code along with either Windows, macOS, or Linux!
Is this C++ Game Engine Programming course for you?
The target audience for this C++ Game Engine Programming course are beginner programmers that wish to learn more about how C++ works in the context of game development. Therefore, students must already know how to code and be familiar with basic concepts of programming and logic. You should be able to write if-else statements, loops, functions, and classes using simple OOP.
You do not need to know C++ before enrolling; many successful students have a background in web, mobile, and game development, working with languages like Java, Python, Ruby, Go, Swift, JavaScript, Ada, Zig, Kotlin, and many others.
How is this C++ Game Engine Programming course different?
This C++ Game Engine Programming course is not just a simple tutorial on how to create a game with C++. This is the opportunity for you to think about the abstraction of what a “game” really is and all the pieces that need to interact to make them happen. More than that, this C++ Game Engine Programming course allows you to write from scratch the code of a small C++ engine that can be used to create many types of games.
We will also touch other important topics like ECS, data-oriented design, STL containers, C++ templates, game loop, SDL rendering, event systems, asset management, memory management, and performance. And finally, we’ll also learn how to embed the Lua language into our native C++ code to add scripting power to our engine.
While there are other resources about game engine development out there, they are either too theoretical or overwhelmingly long. If you are looking for a gentle introduction to the world of game engine programming and want to learn how games really work under the hood, then you should definitely take this C++ Game Engine Programming course!
What you’ll learn in C++ Game Engine Programming
Course content
1. Introduction
- Motivations & Learning Outcomes
- How to Take This Course
2. Libraries and Dependencies
- Project Technologies and Libraries
- Configuring Linux Dependencies
- Configuring macOS Dependencies
- Compilation
- Linking
- Makefiles
- Configuring Visual Studio on Windows
- Quiz: Compilation and Linking
- Static vs. Dynamic Libraries
3. Displaying the Game Window
- Game Loop
- Game Class
- Creating an SDL Window
- Polling SDL Events
- Rendering the SDL Window
- Fullscreen SDL Window
- Fake Fullscreen vs. Real Fullscreen
- SDL GPU Acceleration and VSync
- Quiz: SDL Window
4. Rendering SDL Objects
- Drawing an SDL Rectangle
- Double-Buffered Rendering
- Loading PNG Textures
- Quiz: Game Loop and SDL Window
5. Game Loop Timestep
- Object Movement and Velocity Vectors
- Fixed Game Framerate
- SDL Delay
- Variable Delta Time
- Uncapped Framerate
- Game Loop and Determinism
- Quiz: Game Loop Timestep
6. Logging
- Logger Class
- Exercise: Logging Game Information
- Coding the Logger Class
- Popular C++ Logger Libraries
- Quiz: Logger
7. Project Folder Structure
- Project Subfolders
- Makefile Variables
8. Organizing Game Objects
- Creating C++ Objects
- Examples of C++ Object Creation
- Organizing Game Objects
- Object Inheritance Design
- Quiz: C++ Objects
9. ECS Design
- Component-Based Design
- Entity-Component-System Design
- ECS Folder Structure
- System Component Signature
- Working with C++ Templates
- Component Type Template
- Understanding Component<T>
- Exercise: System Functions
- Adding and Removing Entities from Systems
- The Erase-Remove Idiom
- Operator Overloading for Entities
- Quiz: ECS Design
10. ECS Implementation
- Pool of Components
- The Pool Class
- Coding the Pool Class
- Registry Systems & Entity Signatures
- Entity Creation
- Adding Components
- Removing Components
- Implementing System Functions
- Quiz: ECS Implementation
11. Creating Entities and Components
- Creating our First Entity
- Smart Pointers
- Converting ECS Code to Use Smart Pointers
- Raw Pointers for SDL
- Quiz: Smart Pointers
- Adding our First Component
- Careful with Types size_t and int
- Exercise: Entity Class Managing Components
- Entity Class Managing Components
- Warning About Cyclic Dependency
12. Creating Systems
- Movement System
- Movement System and Delta Time
- Render System
13. Managing Assets
- Managing Game Assets
- The Asset Store
- Displaying Textures in our Render System
- Exercise: Displaying the Tilemap
- Displaying the Tilemap
- Rendering Order
- Sorting Sprites by Z-Index
14. Animation System
- Animated Sprites
- Animation System
- Identifying Animations By Name
15. Collision System
- Entity Collision Check
- Implementing the Collision System
- Exercise: Rendering a Collider Rectangle
- Quiz: 2D Collision
16. Killing Entities
- Killing Entities and Re-Using IDs
- Implementing Entity Removal
17. Event System
- Introduction to Event System
- Event System Design Options
- Event Handlers
- Emitting Events & Subscribing to Events
- Exercise: Key Pressed Event
- Event System Design Patterns
- Quiz: Event System
18. Other Components and Systems
- Keyboard Control System
- Camera Follow System
- Sprites with Fixed Position
- Projectile Emitter Component
- Projectile Duration
- Health Component
- Exercise: Shooting Projectiles
- DRY Code
19. Entity Tags and Groups
- Tags & Groups
- Optimizing Access of Tags & Groups
- Projectiles Colliding with Player/li>
- Projectiles Colliding with Enemies
- Compilation Times
20. Data-Oriented Design
- Data-Oriented Design
- Cache Hits and Cache Misses
- Avoiding Data Gaps
- Packed Pool of Components
- Array of Structs vs. Struct of Arrays
- Cache Profiling with Valgrind
- Popular C++ ECS Libraries
21. Displaying True-Type Fonts
- Adding Fonts to the Asset Store
- Render Text System
- Exercise: Rendering Health Value
22. Dear ImGui
- Introduction to Dear ImGui
- Dear ImGui and SDL
- Dear ImGui Demo Window
- Immediate-Mode GUI Paradigm
- Render GUI System/li>
- Button to Spawn Enemies
- Exercise: Customization of New Enemies
- Quiz: Dear ImGui
23. Culling and Map Control
- Killing Entities Outside Map Limits
- Flipping Sprites on Collision
- Invisible Entities & Obstacles
- Exercise: Keeping the Player Inside the Map
- Culling Sprites Outside Camera View
24. Lua Scripting
- Game Scripting
- The Lua Scripting Language
- Using Sol as a C++ Lua Wrapper
- Lua State
- Reading Lua Tables
- Fetching Missing Table Values with Sol
- Lua Functions
- Level Loader Class
- Reading Assets from a Lua Table
- Handling Multiple Objects in a Lua Level
- Scripting for Night/Day Tilemap
- Scripting Entity Behavior with Lua
- Script System
- Lua Bindings
- Binding Multiple Lua Functions
- Loading Different Lua Levels
- Division of C++ and Lua Code
- Quiz: Lua Scripting
25. Conclusion
- Finishing our Code
- Next Steps
26. Bonus: Tilemap Editor
- Proposed Project: Tilemap Editor
27. Moving Forward
About Gustavo Pezzi
Gustavo Pezzi is a university lecturer in London, UK. He has won multiple education awards as a teacher and is also the founder of pikuma.com.
Gustavo Pezzi teaches fundamentals of computer science and mathematics; his academic path includes institutions such as Pittsburg State University, City University of London, and University of Oxford.
More courses from the same author: Gustavo Pezzi
Share Tool - Group Buy Tools and Premium WordPress From $1DELIVERY POLICY:
When will I receive my course?
You will receive a link to download your course immediately or within 1 to 21 days. It depends on the product you buy, so please read the short description of the product carefully before making a purchase.
How is my course delivered?
We share courses through Google Drive, so once your order is complete, you’ll receive an invitation to view the course in your email.
To avoid any delay in delivery, please provide an Gmail and enter your email address correctly in the Checkout Page.
In case you submit a wrong email address, please contact us to resend the course to the correct email.
How do I check status of my order?
Please log in to CourseAMZ account then go to Order Page. You will find all your orders includes number, date, status and total price.
If the status is Processing: Your course is being uploaded. Please be patient and wait for us to complete your order. If your order has multiple courses and one of them has not been updated with the download link, the status of the order is also Processing.
If the status is Completed: Your course is ready for immediate download. Click “VIEW” to view details and download the course.
Where can I find my course?
Once your order is complete, a link to download the course will automatically be sent to your email.
You can also get the download link by logging into your CourseAMZ account then going to Downloads Page.
You may also like:
- See more Meditation courses
- See more Fitness courses
- See more Trauma Healing courses
- See more Self Hypnosis courses
- See more Behavioral Health courses
- See more Mindvalley courses
- See more TheShiftNetwork courses
- See more PESI courses
- See more Yoga courses
- See more Massage courses
- See more Weight Loss courses
- See more Qigong courses
- See more Gym courses
- See more Detox courses
- See more Athlean X courses
- See more Beachbody courses
- See more Cognitive Behavioral courses
- See more Positive Psychology courses
- See more Neuro-linguistic programming courses
- See more Ericksonian Hypnotherapy courses
- See more Self Hypnosis courses
- See more Talmadge Harper courses
- See more NICABM courses
- See more Seduction courses
- See more Sex Tips courses
- See more Dirty Talk courses
- See more Body Language courses
- See more Gabrielle Moore courses
- See more 2 Girls Teach Sex courses
Reviews
There are no reviews yet.