Making a Multiplayer Online Browser Game

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Making a Multiplayer Online Browser Game

    Creating browser-based games can be a terrific way for new game creators to break into the industry while also providing a potentially lucrative hobby. Browser games can be monetized in a variety of ways, which we'll discuss later in this post. Simple web games, in contrast to the AAA game business, fare significantly better than games with mind-blowing graphics.
    You'll notice a few trends if you look at some of the most popular internet games, or web games that went viral and made a lot of money.
    • Ultra simple gameplay: Browser games can be complicated, but the majority of the most popular ones are simply sidescrollers or strategy games. For example, Fireboy and Watergirl are a series of puzzle-based sidescroller games in which you control two characters at the same time. The WASD keys control one character, while the arrow keys control the other. You must guide both characters through riddles and obstacles, solving puzzles with one character in order for the other to advance, until both characters have completed the level. On Crazy Games, you can play Fireboy and Watergirl.
    • Remakes of famous games: Snake io games, such as the one you can play right now, are essentially a modernized version of the classic Snake game, with multiplayer action. Slither is an example of a game that is incredibly simple to create. io was created in six months, with the majority of the time spent fine-tuning server management — and paid its developer $100,000 every day.
    So, now that we've gone over several examples, how do you go about making your own browser-based multiplayer game? We won't be able to give you a step-by-step tutorial because there is so much that goes into it, but we will explain the principles and point you in the right direction.
    To begin, you must determine how you want to make your game. Because the majority of basic browser games are made with HTML5/Javascript, an engine framework is an excellent place to start. There are numerous frameworks available for generating HTML5/Javascript games, but two of the most popular are:
    • Phaser.io: Possibly the most popular framework for novices, Phaser.io uses Canvas and WebGL technology to allow you to create games for the web and mobile. It's designed for 2D games.
    • PlayCanvas: PlayCanvas is a cloud-based HTML5 engine for building 3D games.
    There are numerous gaming engines available, some of which are more complicated than others. Once you've gotten a little more experience with game development, you might want to look into Unity, which is primarily used for native desktop and mobile games but can also export to WebGL for usage in browser games. Bullet Force, a popular browser-based first-person shooter, was developed in Unity.
    Many developers would tell you that making a game isn't the difficult part. It's actually fairly straightforward once you've mastered scripting, level editors, and the fundamentals of gameplay. The networking is the most difficult aspect of making multiplayer web games.
    You can't have thousands of players in one area, or even one server, in a multiplayer game. You could, but it would almost certainly be a dreadful experience for everyone. You must consider network code, data transfer, and so on...split let's it down.
    Assume you have 64 players that are all in close proximity to one another. Each piece of information (player movements, game updates, etc.) must be transmitted to each player individually. So, if there were just two participants, each frame would require one chunk of data (so 2 chunks per frame).
    You can now begin to increase the number of players in your game. With four players, your network has grown to 16 chunks every frame (4*4). Now keep scaling up, and you'll see what I'm talking about. Your servers may eventually get congested, either owing to bandwidth restrictions or bad network code. This is why many multiplayer games, such as first-person shooters, limit the number of players per server to 16–30. Because AAA studios can afford it, games like Battlefield 4 can contain up to 64 players.
    There are tools and resources available to help with the network side of things.
    • Nengi.js is a tool for distributing games to an Ubuntu server that prioritizes great performance and low bandwidth usage. According to the developers, up to 100 people can be displayed on a single screen.
    • Socket.io is a server-side and client-side component that integrates easily with Node.js.
    • Node.js is a cross-platform JRE (Javascript Runtime Environment) that allows clients (players) and the main server to communicate in real time. There is a strong developer community, therefore there is plenty of help.
    This blog shows the basics of setting up a multiplayer network for an HTML5 game using Socket.io and Node.js.
    Browser games are often monetized through ad income (generating visitors to your game) once it has been established. You can do it yourself, however many game producers prefer to license their games to gaming portal websites and split the ad money.

Top Active Users

Collapse

There are no top active users.

Unconfigured Ad Widget

Collapse
Working...
X