Not that long ago, movies based on video games were considered risky, thanks in no small part to a string of notable flops.