Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Daivuk

Member Since 26 Mar 2002
Offline Last Active Oct 30 2014 02:29 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