I want to be a game programmer and it's come to my attention that people who work in this industry are laid off/fired every few years. Can someone please tell me how to deal with this? Thanks
Sebastian, you are in for a reality check. You make it sound like layoffs happen only in the game industry.
You may want to have a look at what happens in other industries. Many jobs disappear, Many companies go bankrupt or downsize. Intel just announced major layoffs. Microsoft had them in the last years.
You cope by finding another job. This is not Japan in 1920 where jobs were assumed to be for life. This is the year 2016 and you are explicitly NOT guaranteed a job for life. Many jobs will disappear in the next years.
Want guarantees? Be much better than your peers (and in programming I have seen standards go down to incompetence in the last 15 years, sadly) and you will not be fired first.
As game developer you might be hired for a project, or you might be hired by a company that files for bankruptcy after disappointing sales of a single title. That's like working for a start-up in any other industry. You also might be hired by a humongous soul-crushing entity which provides job security but low wages and very little artistic freedom, so you might decide to quit on your own.
Personally, I don't think I'll ever commit myself to any industry for several decades. Don't tie yourself to an industry. You get skills. These skills may be especially valuable in one place, but they are still valuable in lots of other places.