Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Daivuk

Member Since 26 Mar 2002
Offline Last Active Jun 30 2015 02:53 PM

Journal Entries

Journal of Daivuk > async loading and syncing threads with your mainloop in C++11

Posted 10 October 2014

Loading resources or map data asynchronously in games is not an easy task. C++11 makes all of this a lot easier. I am going to demonstrate how to create a thread using async. And then how to sync back to the main loop using lambda functions.

Consider the following code, that is blocking:
void onNewGame(){ // Load the map loadMap("level1-1.map");...


PARTNERS