Where to begin. I guess I’ll start with the basics. I built a database through phpMyAdmin in cPanel. This was pretty easy. It’s a really convenient interface for working with SQL. You pretty much just click on things, so it’s hard to mess it up. Here’s what my tables look like:
The user table holds all of the information about registered users. I may add fields as I continue to design the game. The other tables give a bit of an idea about the direction I’m going in. The arrows between ‘users’ and ‘weapons’ and ‘armors’ indicate that these fields are tied together. This makes it easier to make changes to the database. If monsters could have weapons as well as users, for example, I could change weapon data for both tables by changing the weapons table. That’s a bad description, but it makes sense if you’ve ever run into database design issues. I can add new tables or fields to the existing tables at any time, so this thing is flexible.
Once I had the database at up and running, I had to grant myself privileges on it so I could edit it. This was really easy with the MySQL Databases tool available in cPanel. I simply added myself as a user with all permissions, and associated that user with my database. Pretty straightforward given the way they set up the tools in cPanel.
With my database accessible, I set to work on making a site that is actually visitable. To do this, I edited the files that I added to the subdomain that I created last week. I have a homepage that is very basic at the moment. I mean very basic. It doesn’t have any game functionality yet, but it’s on its way to letting you login and register. I’m down with that for now. I’m going to post a link to it below, but I will give fair warning: don’t use your normal password if you choose to register. I encrypt the password before putting it in the database, and defend against SQL injection to a certain extent, but I can by no means guarantee that it is secure. So seriously, don’t use your real password. Also, the register and login functions don’t quite work properly yet. The register kind of works, but it needs work. More to come. Hopefully by next week I’ll have some work done on the game itself.