Making a Browser Game: The Basics

December 18, 2016

This is the second post of the Making a Browser Game series. Check out my last post here.

In this post, I’m going to discuss the basics of how a text-based browser game works.

As I’ve said in my first post, text-based browser games are a lot like web apps - only more fun. A web app can be a simple to-do list, or it can be a full-blown document editor like Google Docs. But they work inherently similar. They offer the user a means to log in, do something (like write a note, add an item to the shopping list), and they store the user’s data somewhere on a server. CRUD!

Crud! - Philip J. Fry

In a browser game you don’t write notes, you write private messages to other players. The process is very similar though. It’s Create, Read, Update, Delete (or CRUD for short). Let me give you an example of how this works for the radar in Directive Alpha.

These objects are stored in a persistent database which means that if you log out and come back a few hours later, the information about your account is still there. The keyword here is “persistent”. That’s why games like Directive Alpha are usually referred to as Persistent Browser Based Games (PBBG).

The main difference between a conventional web app and a browser game is that games usually involve some degree of randomness to simulate loot drop rates, decide on damage numbers and determine whether a hit has been blocked or not. A conventional web app should operate deterministicly so it doesn’t screw up your shopping list. In a future post, I want to elaborate on the effects and the need of randomness in a game.

If you haven’t started playing yet, go to https://directivealpha.com and sign up now!