Is life just a game?

Life is not just a game. We are here for a reason. We have a purpose in life - why we exist and why we are created. The answer is simple, Allah says:

"And I did not create the jinn and mankind except to worship Me." (Quran 51:56).

We believe in Allah the Almighty. He did not create us for anything.

"We created not the heavens and the earth and all that is between them for a (mere) play." (Quran 21:16)

"O mankind, indeed We have created you from male and female and made you peoples and tribes that you may know one another. Indeed, the noblest of you in the sight of Allah is the most righteous of you. Indeed, Allah is Knowing and Acquainted." (Quran 49:13).


Allah the Almighty explained to us in the Quran and through His messengers what is the purpose of life.  The purpose of life is to worship Him alone.
  
Allah reminds us that the enjoyment of worldly life is temporary not forever, like the Hereafter.

The Hereafter is for eternity, so if we have to prefer one life over the other, we should prefer the Hereafter, but Allah does not ask us to choose just one.

"And this worldly life is not but diversion and amusement. And indeed, the home of the Hereafter, that is the [eternal] life, if only they knew." (Quran 29:64)

"O my people, this worldly life is only [temporary] enjoyment, and indeed, the Hereafter, that is the home of [permanent] settlement." (Quran 40:39)


Allah the Almighty is the One Who created us and He knows best the wisdom behind His creation.