Book description
Learn C++ from scratch and get started building your very own games
About This Book
- This book offers a fun way to learn modern C++ programming while building exciting 2D games
- This beginner-friendly guide offers a fast-paced but engaging approach to game development
- Dive headfirst into building a wide variety of desktop games that gradually increase in complexity
- It is packed with many suggestions to expand your finished games that will make you think critically, technically, and creatively
Who This Book Is For
This book is perfect for you if any of the following describes you: You have no C++ programming knowledge whatsoever or need a beginner level refresher course, if you want to learn to build games or just use games as an engaging way to learn C++, if you have aspirations to publish a game one day, perhaps on Steam, or if you just want to have loads of fun and impress friends with your creations.
What You Will Learn
- Get to know C++ from scratch while simultaneously learning game building
- Learn the basics of C++, such as variables, loops, and functions to animate game objects, respond to collisions, keep score, play sound effects, and build your first playable game.
- Use more advanced C++ topics such as classes, inheritance, and references to spawn and control thousands of enemies, shoot with a rapid fire machine gun, and realize random scrolling game-worlds
- Stretch your C++ knowledge beyond the beginner level and use concepts such as pointers, references, and the Standard Template Library to add features like split-screen coop, immersive directional sound, and custom levels loaded from level-design files
- Get ready to go and build your own unique games!
In Detail
This book is all about offering you a fun introduction to the world of game programming, C++, and the OpenGL-powered SFML using three fun, fully-playable games. These games are an addictive frantic two-button tapper, a multi-level zombie survival shooter, and a split-screen multiplayer puzzle-platformer.
We will start with the very basics of programming, such as variables, loops, and conditions and you will become more skillful with each game as you move through the key C++ topics, such as OOP (Object-Orientated Programming), C++ pointers, and an introduction to the Standard Template Library. While building these games, you will also learn exciting game programming concepts like particle effects, directional sound (spatialization), OpenGL programmable Shaders, spawning thousands of objects, and more.
Style and approach
This book offers a fun, example-driven approach to learning game development and C++. In addition to explaining game development techniques in an engaging style, the games are built in a way that introduces the key C++ topics in a practical and not theory-based way, with multiple runnable/playable stages in each chapter.
Table of contents
-
Beginning C++ Game Programming
- Beginning C++ Game Programming
- Credits
- About the Author
- About the Reviewer
- www.PacktPub.com
- Dedication
- Preface
-
1. C++, SFML, Visual Studio, and Starting the First Game
- The games
- Meet C++
- Microsoft Visual Studio
- SFML
- Setting up the development environment
- Planning Timber!!!
- Creating a project from the template
- Project assets
- Understanding screen and internal coordinates
- Starting to code the game
- Opening a window using SFML
- The main game loop
- Drawing the game background
- Handling errors
- FAQ
- Summary
- 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, Classes, and SFML Views
- 7. C++ References, Sprite Sheets, and Vertex Arrays
- 8. Pointers, the Standard Template Library, and Texture Management
- 9. Collision Detection, Pickups, and Bullets
- 10. Layering Views and Implementing the HUD
- 11. Sound Effects, File I/O, and Finishing the Game
- 12. Abstraction and Code Management – Making Better Use of OOP
- 13. Advanced OOP – Inheritance and Polymorphism
- 14. Building Playable Levels and Collision Detection
- 15. Sound Spatialization and HUD
- 16. Extending SFML Classes, Particle Systems, and Shaders
- 17. Before you go...
Product information
- Title: Beginning C++ Game Programming
- Author(s):
- Release date: October 2016
- Publisher(s): Packt Publishing
- ISBN: 9781786466198
You might also like
book
Beginning C++ Game Programming - Second Edition
Get to grips with programming techniques and game development using C++ libraries and Visual Studio 2019 …
book
Hands-On C++ Game Animation Programming
Learn animation programming from first principles and implement modern animation techniques that can be integrated into …
book
Learn C++ for Game Development
" If you're new to C++ but understand some basic programming, then Learn C++ for Game …
book
C++ Game Development Primer
C++ is the language behind most of today's computer games. This 96-page C++ Game Development Primer …