If you know nothing about programming, you should probably start by learning Python and the PyGame engine.<p>If you already know programming, then a lot of games are written with either the Unreal engine (using C++) or Unity (using C#).<p>There are certainly exceptions. Minecraft was originally written in Java, but I don't know of any other major games using Java. Undertale was made in GameMaker Studio. Any game with a custom engine is likely using C or C++, but I wouldn't try writing your own engine unless you really know what you're doing. It is not a task for the inexperienced.
Most game engines are probably written in C++, with scripting done in C#, Python, Lua or a custom language.<p>But all languages are used. Minecraft was written in Java. A guy called Michal Ziulek is working on game development ecosystem for Zig, which I think is really neat.<p><a href="https://github.com/michal-z/zig-gamedev" rel="nofollow">https://github.com/michal-z/zig-gamedev</a>
C++ is the #1 language used for <i>commercial</i> games. Followed by C# (because Unity). Those languages would be my #1 recommendation if you want to do <i>commercial</i> games. If you just want to have fun and get something done quick then Python might be a good choice.
Should say "Ask HN: What are the Languages used in gaming?"<p>It depends what platform you wanna release the game on. Google your favorite game and type programming language along with it.