Dive into C++11 - [2] - Frametime, FPS, constexpr, uniform initialization

Subscribers:
6,290
Published on ● Video Link: https://www.youtube.com/watch?v=tPbrWAbzyTE



Duration: 49:11
25,988 views
258


http://vittorioromeo.info
- Check out my website!

Source: https://github.com/SuperV1234/Tutorials

Hello everyone!
Here's the second episode of my game-development series, `Dive into C++11`.

In this episode we will learn more about two previously mentioned new awesome C++11 features: "constexpr" and "uniform initialization syntax".

Most importantly, we will also deal with a very big issue that every game developer must face: FPS/frametime, and how to avoid the game from behaving differently on slower/faster machines.

In addition, we'll also briefly learn about "const-correctness" and using the "noexcept" keyword.

We will analyze the "time-slice" method to allow the game to run smoothly and consistently on every machine.

In the last code segment, we will also "refactor" our code by creating a `Game` class, making our source much easier to read and maintain.

0:00 - constexpr addendum
3:20 - uniform intialization syntax addendum
10:10 - 1st segment (const-correctness, noexcept, event polling)
19:40 - 2nd segment (FPS and Frametime management)
34:15 - 4th segment ("time-slicing" for consistent logic with any FPS)
45:10 - 5th segment (refactoring)

The intended audience for this tutorial/screencast are people who have some experience with C++ in general, and who watched the previous episodes.

I greatly appreciate comments and criticism, and ideas for future videos/tutorials.

Feel free to fork the game's source code at
https://github.com/SuperV1234/Tutorials
and expand upon it: I may feature the best forks in a future video, if people enjoy the idea.

Thanks for watching!

---

http://vittorioromeo.info

---

You can find SFML 2.1 here: http://sfml-dev.org/

More on the framerate issue:
http://www.koonsolo.com/news/dewitters-gameloop/
http://fabiensanglard.net/timer_and_framerate/




Other Videos By Vittorio Romeo


2015-01-29"Delver's Choice" RC7 gameplay - GGJ2015 entry
2014-11-29Handle-based entity management experiments
2014-10-08Video of my CppCon2014 presentation now available!
2014-09-29[Surface Pro 3] "Touhou 11 - Subterranean Animism" gameplay (Touch Keyboard)
2014-09-29[Surface Pro 3] "osu!" gameplay (Touch Keyboard + Pen)
2014-09-17[VLOG] post-summer - (Absence, CppCon, Open Hexagon, ...)
2014-05-21Oh Lord Piglet, guide me. (League of Legends)
2014-01-03Dive into C++11 - [4] - Smart pointers
2014-01-02operation bloodshed - devlog #17 - (text editing, GUI styling, new particles)
2013-12-15Dive into C++11 - [3] - Automatic lifetime, pointers, dynamic allocation
2013-11-29Dive into C++11 - [2] - Frametime, FPS, constexpr, uniform initialization
2013-11-24Dive into C++11 - [1] - Arkanoid clone in 160~ lines of code (SFML 2.1)
2013-11-23operation bloodshed - devlog #16 - (GUI, force fields, bullet boosters)
2013-10-22operation bloodshed - devlog #15 - (on-off pressure plates, explosives, new elements/tweaks)
2013-10-08operation bloodshed - devlog #14 - (new elements, multi-level sectors)
2013-09-30operation bloodshed - devlog #13 - (many new elements)
2013-09-30operation bloodshed - devlog #13 addendum - (example room)
2013-09-29operation bloodshed - devlog #12 - (fully working level editor)
2013-09-28operation bloodshed - devlog #11 - (particle blendmodes, ai changes, wip editor)
2013-09-26operation bloodshed - devlog #10 - (wall autotiling, charge particles, raycasting, new gfx)
2013-09-25operation bloodshed - devlog #9 - (turrets, hp counter, pits, new enemies)



Tags:
vittorio
romeo
vee
gamedev
game
development
software
programming
c++
cpp
open
hexagon
super
terry
cavanagh
sfml
ssv
tutorial
video
ludum
dare
10corp
operation
bloodshed
carnage
midnight
synergy
hyper
princess
pitch
devlog
dive
into
c++11
screencast
fps
constexpr