Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Learn C++ Game Development for Beginners Step by Step
Rating: 4.4 out of 5(11 ratings)
643 students

Learn C++ Game Development for Beginners Step by Step

Learn the basics of C++ to prepare you for game development programming!
Created byAmeen Bineabade
Last updated 6/2024
English

What you'll learn

  • Students will be able to start programming in Unreal Engine with C++ without being intimidated by its advanced techniques.
  • Students will learn both theory and practice with classroom style whiteboard talks, and lab style hands-on programming sessions.
  • Students will learn both theory and practice with classroom style whiteboard talks, and lab style hands-on programming sessions.
  • Students will have a solid understanding of C++ basics.

Course content

1 section34 lectures5h 57m total length
  • Introduction2:34

    Learn C++ game development for beginners by building a game from scratch using C++ and a simple multimedia library, covering events, rendering, and Pong in a Windows setup.

  • Preparing our environment12:55

    Prepare the development environment for the course by installing Visual Studio 2013 community edition and configuring CMake. Set up build and source folders to enable debugging and running the project.

  • Installing Visual C++7:23

    install Visual C++ 2010 Express and set up Visual Studio 2010, then create a new console project and run hello world to verify the environment for future SFM game development.

  • Installing SFML9:27

    Download and install SFML 2.0, copy the bin, include, and lib folders to your project, and run the pong example to learn basic integration with Visual C++ 2010.

  • Creating The Project11:45

    Create an empty Visual C++ project, configure include and library directories for SFM, set debug and release configurations, link the SFM graphics, window, and system libraries, and copy runtime DLLs.

  • Creating the window8:06

    Create a render window with SFML, using a video mode of 800 by 600 and naming it SML, then compile and run to see the window.

  • Game loop7:23

    Learn how a game loop works: create the window and game objects, then run an infinite loop at 60 frames per second with events, logic, and rendering.

  • Keyboard Events9:59

    Learn to handle keyboard and mouse events within the game loop using an srf event object, check event types, and print key presses and releases to the console.

  • States for events11:41

    Learn to disable key repeats and separate events from the game loop by using states for key presses and releases, moving console output into the logic and updating per frame.

  • Mouse Events11:34

    Learn to handle mouse events by detecting left click presses, counting clicks, and printing the count. Track mouse movement to capture and print the x and y coordinates.

  • Basic Shapes15:32

    Render a rectangle and a circle inside a window, define their size and position, apply colors, and implement basic movement within a simple top-left origin coordinate system.

  • Creating an image and rendering it9:31

    Load a PNG image with alpha into a C++ game via sf::Texture, load from file before the main game, bind to a rectangle, and resize to 100 by 100.

  • Downloading an image and preparing it3:57

    download and prepare web images for your game, verify licenses from sites like openclipart.org, convert to png, handle transparency, and load textures into your visual studio c++ project.

  • Fonts and texts7:54

    Learn how to render text in your game by loading a true type font from the system, binding it to a text object, and configuring size, position, and color.

  • Preparing the project3:58

    Prepare your project to use sounds and music by updating the linker inputs for both debug and release, and copy the required audio DLLs into the project folder.

  • Create and play sounds7:06

    Create and export a sound effect with a simple tool, import it into your project, and play it by loading into a buffer and binding to a sound object.

  • Playing music5:10

    Learn to load and stream music in your C++ game, using an ogg file, a music object, looping, and volume control for playback.

  • Simple Logic9:32

    Learn to integrate events, rendering, and sound to make a rectangle rotate when holding a key, using state-based events, button press/release handling, and real-time rotation.

  • Simple Movement12:42

    Implement simple movement in c++ using two buttons per axis and velocity variables to move a shape with x and y. Handle key presses to set velocities for movement.

  • Simple collision8:59

    Explore basic collision in game development using two rectangles, detecting intersections, and stopping movement when they collide, then separating the X and Y movements to pass around the red rectangle.

  • Part 1 - Resources7:48

    Load and prepare game resources for a Pong project by organizing textures, sounds, and fonts, then set up initial code and validate assets before gameplay.

  • Part 2 - Shapes7:45

    Create a backdrop rectangle, two paddles, and a ball; set sizes 800x600, 50x100, and 50x50; apply textures and positions, then render the background first for a complete game scene.

  • Part 3 - Movement15:12

    Develop paddle and ball movement for a pong game by managing keyboard state (up and down), velocity (y velocity, ball x/y velocity), and out-of-bounds bounce logic.

  • Part 4 - AI And Collision10:24

    Implement a simple ai for the second paddle that tracks the ball and adjusts its y velocity, detects collisions with paddles using intersects and global bounce, and plays hit sounds.

  • Part 5 - Finish12:33

    Finish part 5 by implementing score rendering in a pong game, updating the score text each frame, and resetting the ball to the center while increasing enemy speed.

  • Preparing out environment on Windows18:09

    Prepare a Windows development environment for C++ game development by installing Visual Studio 2015 Community and SFML tools, then configure include and lib paths and build a simple console app.

  • Preparing out environment on Linux (Ubuntu)14:20

    Learn to prepare a Linux Ubuntu development environment for C++ game development by installing SFML, CMake, and OpenGL, setting up Qt Creator, and building a simple windowed app.

  • Main game loop16:26

    Learn to create and manage an SFML window, implement the main game loop with event handling, rendering, and optional frame rate controls like vsync and style options.

  • Handling keyboard and mouse events18:48

    Learn C++ game development covers handling keyboard and mouse events in the main game loop, using event types, modifiers, and state variables.

  • Drawing basic shapes17:56

    Learn to render basic shapes in C++ game development, including rectangles and circles, with color, origin, movement, rotation, outlines, scaling, and adjustable polygon points.

  • Drawing sprites16:41

    Load image files as textures from the data folder and apply them to shapes and sprites. Use correct file paths and enable smoothing when scaling textures.

  • Using fonts to draw text9:08

    Load a font file from the data folder and create a font object. Create a text object, set the font and string, adjust position, size, color, and style, then render.

  • Project setup for audio3:40

    Prepare the C++ game project to support audio by updating debug and release linker dependencies, adding openal32, copying openal dlls to the project folder, and including the openal header.

  • Playing sound effects and music12:00

    Learn to load and play sound effects and music in a c++ game, using a sound buffer and sound object for effects and a music class for streamed playback.

Requirements

  • No programming experience necessary. Must have a computer and internet.
  • Visual Studio Community is used (the free version) and students will not need to purchase any software.

Description

Which programming language is often seen as a badge of honor among software developers? C++

Which programming language can you learn that when added to your resume, will often get you a job interview? C++

Which programming language is routinely ranked in the top 5 programming languages by popularity, and been consistently in the top 10 for close to 20 years? C++

Why you should learn C++

Much, if not most of software written today is still written in C++ and this has been the case for many, many years.

Not only is C++ popular, it is also a very relevant language. If you go to GitHub you will see that there are a huge number of active C++ repositories and C++ is also extremely active on stack overflow.

There are many, many leading software titles written entirely or partly in C++. These include the Windows, Linux and Mac OSX operating systems!

Many of the Adobe products such as Photoshop and Illustrator, the mySQL and MongoDB database engines, and many many more are written in C++.

Leading tech companies use C++ for many of their products and internal research and development. These include Amazon, Apple, Microsoft, PayPal, Google, Facebook, Oracle and many more.

Who this course is for:

  • Anyone who wishes to program video games in Unreal Engine but does not yet know how to code in C++.
  • No programming experience necessary. Must have a computer and internet.