Book Image

Beginning C++ Game Programming

Book Image

Beginning C++ Game Programming

Overview of this book

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.
Table of Contents (24 chapters)
Beginning C++ Game Programming
Credits
About the Author
About the Reviewer
www.PacktPub.com
Dedication
Preface
17
Before you go...

Pointers


Pointers can be the cause of frustration while learning to code C++. Actually, however, the concept is simple.

Note

A pointer is a variable that holds a memory address.

That's it! Nothing there to get concerned about. What probably causes the frustration to beginners is the syntax, the code we use to handle pointers. With this in mind we will step through each part of the code for using pointers. You can then begin the ongoing process of mastering them.

Tip

In this section, we will actually learn more about pointers than we need for this project. In the next project, we will make greater use of pointers. Despite this, we will only scratch the surface of the topic. Further study is definitely recommended and we will talk more about that in the final chapter.

Rarely do I suggest that memorizing facts, figures, or syntax is the best way to learn. However, memorizing the fairly brief but crucial syntax related to pointers might be worthwhile. This is so that it sinks so deep into our brains...