Like those "idle games" (Candy Box, Cookie Clicker) which you're meant to leave open in your browser as you do other things. It must be simple, but I haven't been able to find a straight answer.
As it is, all the activity in my game freezes when the tab is changed or window minimized, and I want it to continue regardless of whether the window is in focus or not. How would I do this?
edit: another answer had this jQuery solution:
$(window).blur(function(){
//your code here
});
$(window).focus(function(){
//your code
});
but I'm still not sure what I would put there in order to keep the game loop running when out of focus.