Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Beginning C++ Game Programming

You're reading from   Beginning C++ Game Programming Learn C++ from scratch by building fun games

Arrow left icon
Product type Paperback
Published in May 2024
Publisher Packt
ISBN-13 9781835081747
Length 648 pages
Edition 3rd Edition
Languages
Tools
Concepts
Arrow right icon
Author (1):
Arrow left icon
John Horton John Horton
Author Profile Icon John Horton
John Horton
Arrow right icon
View More author details
Toc

Table of Contents (24) Chapters Close

Preface 1. Welcome to Beginning C++ Game Programming Third Edition! FREE CHAPTER 2. Variables, Operators, and Decisions: Animating Sprites 3. C++ Strings, SFML Time: Player Input and HUD 4. Loops, Arrays, Switch, Enumerations, and Functions: Implementing Game Mechanics 5. Collisions, Sound, and End Conditions: Making the Game Playable 6. Object-Oriented Programming – Starting the Pong Game 7. AABB Collision Detection and Physics – Finishing the Pong Game 8. SFML Views – Starting the Zombie Shooter Game 9. C++ References, Sprite Sheets, and Vertex Arrays 10. Pointers, the Standard Template Library, and Texture Management 11. Coding the TextureHolder Class and Building a Horde of Zombies 12. Collision Detection, Pickups, and Bullets 13. Layering Views and Implementing the HUD 14. Sound Effects, File I/O, and Finishing the Game 15. Run! 16. Sound, Game Logic, Inter-Object Communication, and the Player 17. Graphics, Cameras, Action 18. Coding the Platforms, Player Animations, and Controls 19. Building the Menu and Making It Rain 20. Fireballs and Spatialization 21. Parallax Backgrounds and Shaders 22. Other Books You May Enjoy
23. Index

Welcome to Beginning C++ Game Programming Third Edition!

Let’s get started on your journey to writing exciting games for the PC using C++ and the OpenGL-powered SFML. This third edition has an overwhelming focus on improving and expanding upon what you will learn. All the C++ basics from variables in the beginning, through loops, object-oriented programming, the Standard Template Library, SFML features, and newer C++ possibilities have all been added to and expanded upon. By the end of this book, not only will you have four playable games but you will also have a deep and solid grounding in C++.

Here is what is coming up in this chapter

  • First, we will look at the four games we will build across this book. The first game is the exact same as the previous edition and will help us learn the C++ basics, like variables, loops, and decision-making. The second and third are enhanced, modified, and refined from the previous edition, and the fourth is all new and, in my view, way better for playing and learning than the final two games of the previous edition put together.
  • This next bit is mportant in which you will discover why you should learn game programming and perhaps any other programming genre using C++. Using C++ to learn game development can be the best choice for so many reasons.
  • Then, we can explore SFML and its relationship with C++.
  • Nobody likes corporate evangelism, and you won’t get any here, but there are good reasons to find out about Microsoft Visual Studio and why we will use it in this book.
  • Next, it’s time to set up the development environment. This is admittedly a slightly dull affair, but we will get through it in short order, step by step, and when you have done it once, you will never need to learn it again.
  • We will then plan and prepare for the first game project, Timber!!!
  • Moving on, we will write the first C++ code of this book and make a runnable first stage of the game that draws a pretty background – ooh! In the next chapter, things will advance and begin to move graphics around and what we learned in this chapter will stand us in good stead to make faster progress with our first game.
  • Finally, we will cover how to handle any problems you might get as you learn C++ and game programming, such as configuration errors, compile errors, link errors, and bugs.

Of course, what you want to know first is what you are going to have to show for yourself by the end of this weighty tome. So, let’s find out more about the games we will build.

You will find this chapter’s source code in the GitHub repository: https://github.com/PacktPublishing/Beginning-C-Game-Programming-Third-Edition/tree/main/Timber

You have been reading a chapter from
Beginning C++ Game Programming - Third Edition
Published in: May 2024
Publisher: Packt
ISBN-13: 9781835081747
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime