O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Beginning C++ Game Programming - Part 1

Video Description

Learn C++ from scratch and get started building your very own games

About This Video

  • This course offers a fun way to learn modern C++ programming while building exciting 2D games

  • A beginner-friendly guide offering a fast-paced but engaging approach to game development

  • Immerse yourself in building a wide variety of desktop games that gradually increase in complexity

  • In Detail

    This video course 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 such as particle effects, directional sound (spatialization), OpenGL programmable Shaders, spawning thousands of objects, and more.

    Table of Contents

    1. Chapter 1 : C++, SFML, Visual Studio, and Starting the First Game
      1. The Course Overview 00:04:25
      2. The Games, C++, and SFML 00:04:24
      3. Setting Up the Development Environment 00:06:20
      4. Planning Timber!!! and Creating a Project from the Template 00:03:43
      5. Adding Project Assets and Understanding Co-ordinates 00:04:52
      6. Starting to Code the Game 00:08:38
      7. Opening a Window using SFML 00:05:22
      8. The Main Game Loop 00:04:33
      9. Drawing the Game Background 00:03:35
      10. Handling Errors 00:03:30
    2. Chapter 2 : Variables, Operators, and Decisions – Animating Sprites
      1. C++ Variables 00:06:02
      2. Manipulating Variables 00:03:04
      3. Adding Clouds, a Tree, and a Buzzing Bee 00:05:00
      4. Random Numbers 00:03:23
      5. Making Decisions with if and else 00:05:15
      6. Timing 00:04:14
      7. Moving the Clouds and the Bee 00:06:34
    3. Chapter 3 : C++ Strings, SFML Time, Player Input, and HUD
      1. Pausing and Restarting the Game 00:03:41
      2. C++ Strings, SFML Text, and Font 00:03:18
      3. Adding a Score and a Message 00:06:35
      4. Adding a Time Bar 00:06:07
    4. Chapter 4 : Loops, Arrays, Switch, Enumerations, and Functions – Implementing Game Mechanics
      1. Loops 00:05:04
      2. Arrays 00:04:05
      3. Making Decisions with switch 00:01:48
      4. Class enumerations 00:02:12
      5. Getting Started with Functions 00:10:37
      6. Growing the Branches 00:08:09
    5. Chapter 5 : Collisions, Sound, and End Conditions – Making the Game Playable
      1. Preparing and Drawing the Player and Other Sprites 00:03:11
      2. Handling the Player's Input 00:08:46
      3. Handling Death 00:01:50
      4. Simple Sound FX 00:03:47
      5. Improving the Game and the Code 00:02:07
    6. Chapter 6 : Object-Oriented Programming, Classes, and SFML Views
      1. Planning and Starting the Zombie Arena Game 00:07:23
      2. Object-Oriented Programming 00:16:21
      3. Building Player - The First Class 00:21:28
      4. Controlling the Game Camera with SFML View 00:04:28
      5. Starting the Zombie Arena Game Engine 00:05:07
      6. Managing the Code Files 00:01:45
      7. Starting Coding the Main Game Loop 00:08:09
    7. Chapter 7 : C ++ References, Sprite Sheets, and Vertex Arrays
      1. C++ References 00:06:37
      2. SFML Vertex Arrays and Sprite Sheets 00:08:01
      3. Creating a Randomly Generated Scrolling Background 00:08:19
      4. Using the Background 00:02:43
    8. Chapter 8 : Pointers, the Standard Template Library, and Texture Management
      1. Getting Started with Pointers 00:09:30
      2. Working with Pointers 00:08:32
      3. The Standard Template Library 00:08:11
      4. The TextureHolder Class 00:05:57
      5. Building a Horde of Zombies 00:10:13
      6. Creating a Horde and Bringing It Back to Life 00:09:36
      7. Using the TextureHolder Class for All Textures 00:02:30
    9. Chapter 9 : Collision Detection, Pickups, and Bullets
      1. Coding the Bullet Class 00:11:03
      2. Making the Bullets Fly 00:07:50
      3. Giving the Player a Cross-Hair 00:02:41
      4. Coding a Class for Pickups 00:11:57
      5. Using the Pickup Class 00:03:02
      6. Detecting Collisions 00:08:13
    10. Chapter 10 : Layering Views and Implementing the HUD
      1. Adding All the Text and HUD Objects 00:04:27
      2. Updating the HUD Each Frame 00:03:24
      3. Drawing the HUD, and the Home, and Level-Up Screens 00:02:44
    11. Chapter 11 : Sound Effects, File I/O, and Finishing the Game
      1. Saving and Loading the High-Score 00:03:13
      2. Preparing Sound Effects 00:01:32
      3. Leveling Up 00:02:41
      4. Restarting the Game 00:01:04
      5. Playing the Rest of the Sounds 00:03:14