Building Browser Games: An Overview
When I started reading the series of blog posts on the site Building Browsergames, I thought it was cool that somebody had started a project to build a persistent browser based game (PBBG) and shared the code. But it has gone a great deal further than that. Every post that features code is done first in PHP and then repeated again with Perl. Beyond that is the frequency of posts. Having worked on XPlus, DevGames.com, and finally GameDev.net I've heard about hundreds of game projects started by enthusiasts. I can tell you that the vast majority of them have grandiose ideas and then reality intrudes. After a while it gets hard or boring and they stop.
But not this time. Dozens of entries later, you can actually see a bunch of the pieces that make up a simple PBBG sitting there and there's lots of interesting design advice to go with it.
Now it's my chance to participate in the creation of this Rosetta Stone of programming, because that's what it is. The original Rosetta Stone was a tablet carved with bureaucratic proclamations about taxes and statues, it's value lay in the fact that it had the same text in both Greek and Egyptian languages and it gave us a key to begin decrypting hieroglyphics. Maybe this one isn't quite up to that level, but it gives us a place to start discussing PBBG design and it gives us that in both Perl and PHP. My contribution is a simple one. I've gone back and started rewriting all the same code again, this time in Ruby on Rails.
Perhaps someone else will add Python with Django versions of everything or Java and some mix of technologies. I don't know. But whatever happens, this might prove helpful to someone looking for a language to learn, looking to learn about PBBG building, looking to learn programming, or looking to move from one language to another. For me personally it was an attempt to both improve my own basic skills at Ruby and Rails as well as hopefully adding to something that might prove helpful to others.
The entries as they stand today:
| Designing Your Game's Database | |||
| The Registration Page | |||
| Why You Should Be Hashing Sensitive Data | |||
| Using Configuration Files | |||
| The Login Page | |||
| Cross Site Scripting: What It Is And How To Prevent It | |||
| A Flexible Stats System | |||
| Implementing A Flexible Stats System | |||
| Implementing An Email Confirmation System | rails |
||
| Getting Started With A Templating System | |||
| Making Your Forms Auto-Focus | |||
| Making Your Forms Remember Their Values | |||
| A Brief Design Document | |||
| Putting It All Together | |||
| Adding Stats | |||
| Displaying A User's Stats | |||
| A Simple Combat System | |||
| Creating The Bank | |||
| Healing Your Players | |||
| Forcing Users To Log In | |||
| Designing A Flexible Items System | |||
| Retrieving Items | rails |
||
| Reducing Repetition | rails |
||
| DRYing Out Our Database Connections | N/A |
||
| DRYing Out Our Stats | N/A |
||
| Securing Our Hashes | N/A |
||
| Simple Cron | |||
| Using The "On-View" Method Instead Of Cron | |||
| Buying Weapons | rails |
||
| Swapping Weapons | rails |
||
| Integrating Weapons Into Our Combat System | rails |
||
| Buying Armor | rails |
||
| Integrating Armor Into Our Combat System | rails |
||