I want to learn to make a 3D FPS, what programming languages should I learn to make a browser compatible game possible. What are the advantages and disadvantages of making my game open source on GitHub ?
I would use unity and as target I would set javascript :). The question is do you want to build a game or you want to build the game engine.
For the game engine I agree with M C++ is the dominant language but it does not have a good compile target in WASM which lead to one of the things Marco Alka mentioned Rust
Rust is close to equal to C++ at least one of the talks of the last meetups was about a guy writing his master thesis by porting his game engine from C++ to Rust.
There are also pretty decent engines written in JS threejs.org for example.
Open or closed source is business decision. Flip a coin if you are not sure ;) you can always move between them if you pick the right licensing model.
Besides that I think Marco Alka is way more competent in this topic than I am. But most of my game developer friend use unity and unity added a new FPS sample unity.com/fps-sample where you can explore things.
I still guess that might be overwhelming for a beginner . I just implemented isomorphic top down arcade space shooter based on tutorials or a sidescroll game with GML .... and I am most likely overwhelmed.
But again first pick your tools and make the decision if you want a game or a game engine they relate to each other but they don't necessarily need to mix :)
what programming languages should I learn
First, the basics: HTML, CSS, JavaScript. You can never go wrong with them when you are in a browser. Keep them all vanilla and only add frameworks as an extra on top! You definitely should replace JavaScript with TypeScript (TS is a superset of JS, so you will need JavaScript anyway!), because types are a huge help to prevent many errors effectively and establish a better documentation in-code, enforced by the transpiler. It might also be nice to move number-crunching into WASM, for which you can use a range of languages, like Rust, C++, Kotlin,... however, I recommend Rust for various reasons I already explained a lot here on Hashnode.
If you want to use a game platform, then you might decide to use Unity, which can build for the browser, but requires C#. It won't help you build the website around the game, though ;)
What are the advantages and disadvantages of making my game open source
The advantages are, that you get help and feedback from other people, which includes coding, debugging and documentation by others. Also, GitHub and other git providers usually offer a range of additional tools which help you manage the project (like a Kanban task board, issue tracking, CI, etc.).
The con is, that you cannot really sell the game. You will have to provide additional services, like hosting an official server, offering additional in-game items, etc. Doing a Patreon might be a good idea, too!
Little spoiler: I am working on porting my Game-from-scratch article from Rust to web-dev and continue both, Rust and web-dev, in parallel. You might be interested in reading that, as I start simple and will introduce different aspects and mechanics (I won't write them as language tutorials, though). I will go for TypeScript as main language.
Unbezahlte Werbung durch Nennung und Verlinkung von Personen, Organisationen oder Unternehmen.
Mark
formerly known as M
EDIT Sorry I missed the browser part, so this answer may be irrelevant.
You should probably use some engine which already includes a lot of logic that many games use. You'll spend many months building it yourself, otherwise. Unity seems to be a popular one.
I believe that for professional game development, C++ is the dominant language. But others are also used, especially for smaller projects.
Open source is nice because people might help you. That is very unlikely until you have some working version though - there are a lot more aspiring game designers in need of help than there are programmers with too much time. Another advantage of open source is that others can reuse parts of your code (which is clearly an advantage for them more than for you).