Usually when a system shuts down like that during a game, etc, it may be an indication of an over temperature in the CPU. It shuts down to prevent damage.
You don't say what model computer.
Have you check the temperatures?
Have you cleaned the computer of dust recently? ........... I really did not monitor heat temperatures prior to this issue. I opened my computer and found LOTS of dust and my fan was a bit dirty. I believe you are correct on the heat issue. So, I bought a liquid cooler and now I can monitor my computer temperatures in real time, which I never did before. I can also adjust my cooler to work harder to aid me when running my simulator. No problems so far and I am able to lower temperatures when necessary. Only used this for five days, but I seem good. Thank you for your assistance. I will advise you if I have any problems. Thank you very much for pointing me in the right direction. Not good with these computers.