Game programming as a hobby

I have never built a game so i was wondering how do you guys make a programme?I know that it involves math but what is that secret in you that you use it to create your own games?Is it logic?Is it max focusing?
I want to make a game but i don’t know where to start from.What do i need?

Within high school, you can take computer science classes to learn a programming language. The language is key to making games. If I were you, I would use sites like Codecademy and find books to learn Python first. That way, you get a basic understanding of programming. Then look into other more advanced languages like Java and C++.

I’ve been making vidjagames as a hobby since middle school, so here’s my two cents:

Python and pygame. XNA, or some C++ libraries are great for fiddling around on a low level (and there are good libraries for 3D fun out there), but be warned, you probably won’t get much out of them.

Gamemaker studio is a good start if you want something 2D, Unity3D is a good all-around starter with great documentation, and Unreal Engine 4 has a great flowchart system (blueprints) which compliments its C++ backbone.

Your game won’t be much to look at without art, and 3D art is miles harder to make than 2D sprites (and animation is tough no matter the medium). Feel free to fool around with that, too!
Gimp and Blender are good, open-source tools for 2D and 3D work respectively, although neither is very user friendly.

IIRC all of those toolsets are free. Download one (or two, or all of them) and watch some videos to get a feel for the design process. Play around a bit, read the documentation, write up your ideas, and make sure to start small.