CppCon 2016: Jason Jurecka “Game engine using STD C++ 11'

preview_player
Показать описание


This session is going to give an account of the process and features used to create a game engine focusing on using std C++11 features and concurrency. We will go through the architecture of the engine design and the specifics of the C++11 features being used. We will also go through optimization choices and design mentalities that are being used to keep the code base simple, but powerful in game usage. The engine architecture we will be going through will be using parallelism as a way to distribute work and get performance out of the available hardware that can scale into the future.

While completing a full engine with cutting edge graphics techniques and a game to push the engine to its limits will take a while this session will go over the current state of the project and lessons learned. The ultimate goal of the project is to show the validity of using C++11 (and beyond) features in game engines to simplify code and improve stability while maintaining the performance and memory usage games demand.

Jason Jurecka
Blizzard Entertainment
Senior Software Engineer
Jason Jurecka is a 12+ year engineering veteran of the game industry that has worked on titles in the full range of platforms from PC to next-gen consoles. He has done a wide range of tasks that include engine architecture, asset management, asset pipelines, gameplay features, task automation, tools/plugins/scripts for content creators, automated testing, game/toolchain optimizations, and many other generalist engineering tasks. Jason has contributed to titles such as Rise of Nations: Rise of Legends, Catan, Red Dead Redemption, Max Payne 3, Grand Theft Auto 5, Battlefield 4, Battlefield: Hardline, Call of Duty Black Ops 3, and Amazon's Lumberyard Game Engine/Editor.


*-----*
*-----*
Рекомендации по теме
Комментарии
Автор

ah, remember when PC and Mac were both x86_64? good times.

criticalposts
Автор

55:30 one can force compile-time execution of constexpr functions by wrapping them in an integral_constant. For example using
#define FORCE_COMPILETIME(e) (std::integral_constant<decltype(e), e>::value)
Thats what i am using to use constexpr string hashes in switch statements.

DedmenMiller
Автор

Good talk, I always enjoy the "game engine" talks :)

hanneshauptmann
Автор

48:40 "resource sterilization"... so these pesky resources don't start to multiply and things get out of hand :D

sanjuuyonsai
Автор

I also use C++11 (and boost) heavily in game development - love it! Good talk.

danhiggins
Автор

@19:36 *sigh* Yet-Another-Reflection-System implemented via macros because the language doesn't offer it ... yet.

MichaelPohoreski
Автор

Can someone help me find the video he's talking about around 5:40 ?

ytho
Автор

haha, he looks slightly annoyed at the people (same person?) not really asking questions, but wanting to show off their own knowlegde of c++.

emilrostad
Автор

anyone knows which Chandler's talk he was referencing?

Darleer
Автор

With this task system, how are tasks interrupted?

Test-ivpm
Автор

Compile time asset processing is like the exact opposite of the kind of change I want to see in games development. We should be making it easier for end users to make modifications, which both increases target audience and expected life time for any game, and can provide even more benefits including free community patches and the like. Instead we are to _design them out_ entirely, instead of providing better error messages to our artists, or to squeeze another few moments out of our load time?

noxabellus
Автор

isn't make_unique a c++14 feature?

rastaarmando
Автор

Anyone know what color scheme is being used for the code in the slides?

xthebumpx
Автор

what theme is that for the code on the slides?

davidporterrealestate
Автор

What does it mean that a task is "not completed" and it is placed back into the queue?

Test-ivpm
Автор

He's saying he's using a unique_ptr to have automatic cleanup if there's a crush, but he also says he's not catching exceptions... so if there's a crush, the whole process is killed anyway and unique_ptr doesn't matter at all, doesn't it? It only helps him to forget about it if the user quits the game normally... Or am I missing something?

MrWorshipMe
Автор

@28:00, his code is really bad.
When there aren’t tasks to execute, his code will wake up each thread in the pool 333 times each second. This prevents CPU sleep states, meaning his code is going to burn battery on mobiles, and will keep CPU hot on all platforms.
And when a task is posted to the pool, his code brings up to 3ms extra latency for absolutely no reason.The right approach is use some better queue, that can block consumer threads on some synchronization primitive, e.g. std::condition_variable, until more tasks are available. Or on Windows, there’s a built-in queue, I/O completion port.

soonts
Автор

52:50 stick with =0 for pure, and use the word pure for 'immutable by default'

walterbz
Автор

15:50 BOOM!
CPP became unreadable monster

kosbarable
Автор

"We can patch to fix found things in the wild" Now i understand why Blizzard games are bugged

samuelalonso