You need to learn many things before making a game.
Even an apparently simple 'Mario' game, takes a lot of work to be made.
Yes, but no one in their right mind begins software development and jumps in to a major task(which not really major to a professional at all, but major to a beginner)you have to question their reasoning.
No one starts off with a Mario game. In fact most people start off with a picture on the screen and slide it around.
After that you can add two pictures to the screen and slide them around ... then three!
Then you can add event handlers for input, add sophisticated functions that work together and handle operations efficiently, add garbage collectors, add drawing/animation functionality, and then finally implement some artificial intelligence.
That, to me at least, is how absolute beginners should start out. There would be no discouragement if you start small and work bigger over time.
I'm currently working on a game with a square block that moves through walls to reach a checkpoint, and learning slowly how to implement collision on a 2-D basis.
It may sound dumb to some, but this is progress for me, and you don't need to have years of experience to code games like this, and even more complicated ones as well.
Lastly, even the simplest things in game programming and graphics is things like sliding images being handled by functions, etc.
I realized that these are the building blocks for everything, yet people think it's dumb and/or nothing of a success to do simple things(people have told me it's no big deal to blit images, use Windows API without documentation, etc.).
Many people discourage you by overthrowing a massive set of code, libraries, utilities, functions, data types, syntax, etc.
I recommend anyone with some decent C++ skill(possibly the OP)to try: http://www.lazyfoo.net
It's helped me get back up strong so far in programming since my last downfall from discouragement.