Monthly Archive for October, 2008

GATM?

When I changed my webhosts I neglected to move over gatmhq.com. WHRY WOULD I DO THAT?!? Because I was trying to prepare and design a new site prior to the big move. Anyways, I did a complete website backup, including all MySQL information on Oct 17th… that was the last time I did it.

Then my old webhost got mad I didn’t pay them and suspended my account on the 28th, which is almost 2 weeks of lost forum data. I tried desperately to convince them (without paying them for another year) to give me access to my cPanel or at least send me the latest GATM forum database. They weren’t having any of it… it doesn’t help when your main domain is already pointing to a new webhost service :P

gatm4everAnyways, that was sort of the straw the broke the camels back… so to say.

GATM has been a frustration over the last 6 months. Its been a constant uphill battle trying to keep things running. Toward the end none of the members got along, the admins bickered and fought between themselves and our servers were usually empty.

Sandbox servers are the biggest pain in the ass to keep maintained. Every addon fucks up another addon, one thing breaks another, people want this… they hate that… add this… remove that… this map sucks… add that map… ARGGH!!

I had considered developing some custom games for the community and eventually shutdown the Sandbox server (or make it a lot more simple, easier to maintain) but then someone stole all our custom games and that sorta ended that idea. Plus, every time I tried to sit down and work on a new custom gamemode, I couldn’t focus on it because there was thread after thread with lists of the most minor bullshit they wanted fixed on the server… but 90% of them were issues because addons broke other shit and it wasn’t anything I could fix unless I just rewrote the entire addon myself.

Chad and I have been severely exhausted trying to keep up with everything and eventually we’ve just ran out of fuel. Scripting for gmod is extremely boring and monotonous now… we can’t find anything that keeps our attention. It used to be fun and exciting developing new stuff, but the recent versions have added such tremendous problems that we have to come up with three workarounds to fix one feature we want to add, but then it isn’t stable and it turns out being shit compared to what we had planned. We miss gmod9 :(

People kept trying to offer to help but it seems no one had the technical skills to really take any of the workload off. We had to maintain the server hardware and system configuration, maintain and develop the website and forums, maintain and develop custom Lua scripts for The Arcadium and all Garry’s Mod servers, setting up and running other game servers (CSS, TF2, etc) and then deal with all the problems in between.

So after long consideration I’ve decided not to bring gatmhq.com back up, nor do we have any plans on supporting the server. I guess it will keep running, but its up to the less-than-active admins to keep that going.

Its ironic though… this Halloween would have been our 2 year anniversary. Oct 31st 2006 was the day I purchased the domain for PGM and made plans to start the community… which is what turned into GATM.

What’s next? Mostly enjoying playing games again… and overall having a good time instead of working on gmod shit non-stop. Chad and I have already started planning a new game… no not a gamemode, but our own game. We’ll keep you up to date.

The sickness ate my brain

Like the last 5 days I’ve been sick. I know how I got sick… its all this crazy weather. One day its like 60° F outside and the next its 90°!! I guess Al Gore was right :(

Anyhow… when I get sick like this my brain stops working. Its either the over abundance of sleep or the medicine that kills my ability to do complex shit. I haven’t really done… anything… at all… whatsoever.

I did manage to play video games though, that’s simple enough for weakened mind. I’ve been playing FarCry 2, which is pretty damn awesome. And I’ve been catching up on my GTA 4 single player, trying to finish the game and get some achievements.

Today I feel much better, I did some more webhost transferring. Hopefully tomorrow I can be back to my normal grind.

A look back

As I’ve been slowly moving files over to my new webhost, I started cleaning out my file dump and I found some old shit that was interesting.

Sorta neat looking back and seeing what I’ve done and how I don’t even remember doing it. I made some tutorials for Garry’s Mod 9 for basic posing, some pretty crappy wallpapers, and even a few comics.

I didn’t save all the files… a lot of them were crap. I did find this picture which reminds me I need to update it to use the new Gecko binary module:

Server Logs: when XML and PHP have sex

My homey Chad has introduced me to the usage of XML. At first, I really didn’t know much about it besides the fact RSS feeds use it. But now the more I learn the more I love it.

When we wrote the logs for Gear, we had a couple of choices. We could bloat a MySQL database with tons of log events, write it all to a flat file, or devise something new. Which chose the latter and our answer was XML. With the ability to store attributes and content, have parents and all sorts of hierarchy… its easily one of the best decisions we’ve made.

But when we get back to the topic of having the website and game servers talk, we run into a hiccup. All our events are stored in different sub tables; which means the log has a tables like <chatlog> and <eventlog>. Yeah that’s all fine and dandy, and we love how it turned out… but what happens when people want to view said logs? They aren’t shuffled together in chronological order… they’re all separate. SHIT FUCK DAMN!

Putting them together in order wasn’t as easy as it should have been. Well actually I’m lying; it was easy once I figured out how to do it. That’s the thing about programming/scripting/developing custom shit: its not that the syntax or platform limits your ability to do something, or that it requires butt-loads of work… its being creative enough to figure out how to fucking do it. WHRY?!? Because not everything you want to do has been done by someone else in easy copypasta format.

Server LogsWhen I started working on it I was looking for some PHP command that automagically did it for me, and I think that was my problem. When trolling the PHP manual website and furiously searching Google for “put my XML in order” was no help, I decided to do it on my own.

Basically it came down to putting all the data into an array, and then sorting said array with the usort function. SUCCESS!

The only thing left was to display the data in a readable format. So mix in a tad of HTML, add a pinch of CSS… blend until sexy and you’ve got a finished product!

Tinkering with characters and stuff

I wrote this code up a few months ago. I will continue working on it but as of right now I have more important things to do (Gear, website, stuffs). So this is sorta on hold, but I mess with it on occasions… you know… make sure it knows I still love it.

I think the character creation turned out great. I spent a long time on it so… you know… it better be good or else I’d have to kick my cat. And we all know I love my cat.

There are actually many more animations or “actions” not shown in this video, and they are really easy to add. I basically created an animation class that does all the heavy lifting for me, so I just need to supply it with what sequence I want to use and other minor variables. Good shit!

Design v2

The new community website design is just about complete. I’ve moved along onto more troubling things as finishing the CMS.

It’s really interesting when you do something right… things seem to… work! The best idea we’ve had was to properly design a CMS and make it modular. I can’t even begin to explain how its helped the process. Instead of having shit loads of code in a single file, I’m able to break them apart and organize the functions.

The way it works is pretty simple too. First you create your CMS’s main class, and when the page is called it creates an instance of it… lets say $CMS.

The CMS loads all its modules into an array, $CMS->Modules[]. From there you can have stuff like $CMS->Modules[News] or $CMS->Modules[Files] or anything. Each one of the keys are an instance of a class created from the modules.

Then when we’re writing the front page, we can just add a line of code somewhere in the HTML like $CMS->Modules[News]->DisplayNews(). Everything is handled in the module code and doesn’t need to clutter up the HTML of the front page. WHRY is this so helpful? Simple answer is simple: If we need to move any HTML around, or tweak the way the front page looks, we don’t have 120 lines of PHP code jammed in the ass of it all.

Progress is good, but I think I have to take a break for a while and start moving the files over to the new webhost because the old webhost is starting ot take a shit.

Android *beep boop bop*

This may seem unrelated to what I normally talk about here, but keep reading and it will all unfold.

One thing most people can agree on is that Google pretty much kicks ass. It seems like whatever they get their ever-stretching hands on magically turns to gold. (I wonder how they take a piss without adverse side effects?)

Over the passed few years they’ve been working on a mobile platform called Android, which is joint effort of The Open Handset Alliance. The concept is simple: create an open source platform that gives every developer the same tools as everyone else. There’s no private or reserved libraries that only the phone developers can access… everyone is equal.

What does this mean? It means that unlike Apples iPhone, anyone and everyone can develop and write applications that access all aspects of the platforms stack. They even released the SDK already… how long has it taken Apple?

The platform is very impressive to say the least. It holds Google’s theory of minimalistic design with maximum usability. T-Mobile has announced the release of the first phone utilizing the Android OS… the T-Mobile G1.

Now, I’ve been a long time user of Blackberry. I’ve had three different Blackberry smart phones and loved each one of them, especially my current one. I will admit I’ve had interest in an iPhone, but I just couldn’t overcome my admiration for RIM devices to go and get one (not to mention I don’t subscribe to AT&T, which is the single wireless provider for iPhones in the United States).

Since I am a subscriber to T-Mobile, I’ve found myself looking at this G1 more and more. I’ve read review after review, watched hands-on videos and side by side comparisons against other smart phones. There are several things I really like about it, and a few I don’t. There has been an ongoing struggle in my head whether to get it or not.

Part of managing GATM is realizing that you’re not always at a computer to instantly take care of critical issues, but having the ability to address them on the move is an amazing benefit. With my Blackberry I have everything from web access, remote desktop, email and instant messaging. All of our admins have my mobile IM account and I’m able to communicate with them very quickly. WHRY would I do this? Because I try to manage GATM like its a business, whether we’re making money isn’t important… its doing something right that is. But will this new phone do everything my Blackberry does? Will it hold me back or move me forward? Will it have problems/issues/bugs? I DON’T KNOW!! WHAT SHOULD I DO?!?

At the end I decided to go ahead and preorder the G1, which should arrive early next month (I missed the first wave of preorders which will arrive Oct 22nd). The few concerns I have with the platform will probably be fixed soon after release (thanks to being open source). And my other obstacle was thinking “if I order this, what cool phone will come out shortly after?“. But you know what, in this age of technology that sort of thinking will only hold you back. No matter how long you wait, or what you wait for, almost as soon as you buy it something bigger and better will come out the next day.

So I figured, why not be on the bleeding edge and have one of the first of these new “Google Phones“?

Website and game server ballet

An important factor we’ve focused on when managing GATM has been keeping the website and game server on different platforms. The main purpose for this has been simple: performance.

We keep the website on a shared hosting account and the game servers on our dedicated server. Believe it or not, websites are resource hogs… especially high traffic ones. Every time someone loads up a page from your site, all the content including images needs to be accessed and sent over to the user. And that’s not even mentioning MySQL. If you have something running a database (i.e. a blog or forums) not only does the previously mentioned stuff happen, but then the MySQL server has to perform a query (or maybe even 10 queries, depending on what you’re doing).

So start taking that into account every time you hit refresh on a forum page, or quickly browse through pages of a post. There’s a lot of shit going on behind the scenes. And we wouldn’t want all that affecting the experience of those in our servers.

Now that you understand why we keep them separated, there’s one other issue. How do you communicate between the two? This is a major part of our task because people like seeing the integration of game server and website/forum. For the stability of the games, we keep the game data local to the server. WHRY? Simple answer is simple: you never want the game server dependent on ANYTHING. If the data is stored on the website and the website takes a shit… what happens? Yup… the game server takes a shit too, and you have a possibility of lost data.

Overcoming this obstacle isn’t all that hard, but the solution can’t bring down resources on the game server as I spoke about earlier. I’ll explain how we do this later.

Using divs and stuff

Recently I’ve been trying to better my HTML style. One of the main things I’ve been focusing on is using divs instead of tables. WHRY? Because if you know how to use them, they are much more powerful.

Protip: divs are useless without CSS. So learn that first. If you don’t already know CSS and you’re still designing sites without it… leave website design alone and spend your free time knitting sweaters. And by “knitting” I mean “kicking“… and by “sweaters” I mean “midgets“.

When you’re laying out a site, you can setup a div class for lets say.. um… a logo. Then you can set an absolute position of said div inside the CSS class. What does this do? Well it gives you full control over the position of the image… even positions in negative numbers. Which means you can have images overlapping containers and other cool shit like that. It really helps to make your website look tricked out.

The other cool shit about divs is you can have them act like tables, and yet you don’t need to have them nested all fucked up like tables need to be. Oh and they seem to be more XHTML friendly. Seems like most websites that aim for meeting standards use divs over tables.

Another interesting thing is using CSS to skin standard HTML blocks. You can do anything from defining your own “strong” tag, or completely overriding the standard look of an “hr” tag.

So far the new site design is coming along great. It didn’t turn out to be a complete redesign, but its enough to be a big change and bring back the attitude the community misses.

Writing a CMS

*** Preface: For those who want to further read about what a CMS is click here

A content management system (CMS) is a computer application used to create, edit, manage, and publish content in a consistently organized fashion

So the last website design I cooked up was pretty neat, but I’m remaking it (see my previous post to understand why). The other thing I’m focusing on is the script that drives the site. Last time it was a rudimentary PHP script that just spit out content. This time I’ve taken a step back and decided to do it RIGHT.

I’m going to write it myself from the ground up. Its easy enough to go with some prepackaged script some nerds put together, but then I’ll end up hacking the shit out of it to make it do what I want… so whats the point in using it in the first place? The other reason to write this myself is because the website interacts with the game server so much; I want to make sure I have as much control over this as possible.

Here’s some cool things I’ve learned that you should all use at one point or another in a PHP script:

  • Classes. Use classes or you’re and idiot. Object orientated programming is your friend.
  • ob_start… look this function up and harness its power.
  • Just like any application, make your web applications modular. God kicks a puppy in the face every time you don’t.
  • Comment your code. Even if you’re the only person that’s ever going to look at it, it helps you debug and sometimes even reminds you what the fuck you were thinking.

I don’t think I’ll make a template system. I’ll just make a hybrid index.php that renders the basic site layout and calls functions to display content. I’ve tossed around the idea of making templates, but I think its a waste of time for what my needs are.

I’m still working on the new site design… I’m getting closer. One step closer I guess, but now I’m off to play some Xbox 360.