How can you make an online game and add it on an online website?

First you need to know how to code, or know someone who can code. Then you just have to think up an idea of a game - how many players, the objective, the story, etc. Once you get the details sorted out, you'll need to code the game and pay for server storage and a domain name.