Friday, May 21, 2010

Origins of BlitzCoder

I received a request from one of my long time friends, Malcolm "Chiefy" Brown, to write up a piece regarding a site that I ran a number of years ago. The site was called BlitzCoder and it was all about Blitz Basic development. Chiefy happened to send me a bunch of questions to help get things started. I'm going to go ahead and answer his questions here. If there are more questions from anyone, just post a comment and I'll do my best to answer. This will make it more interactive than just an article. :D

Chiefy's Questions

1 - What sparked you to start the site?

I was looking at the current blitzbasic.com site and was finding very little information on how to code up stuff using Blitz. I basically studied the demo stuff and the commands list and did up a few simple things and then decided to write a full game in one day. I created Rocktoids, which was a cheesy little Asteroids clone. People asked how I did it and I thought I'd write up some tutorials on that. But where to put them? That's when I decided to open up BlitzCoder.

2 - Did you do it on your own?

I did all the development stuff on my own, yes, but I had big support at the time from Paul "Snarty" Snart. He was the biggest cheerleader, giving tons of ideas and support as I plodded through the development cycle.

I never expected it to be more than some tutorials, but then a forum got added and I had to start picking up PERL in order to build things into it. Snarty was managing the community along with me and he was telling everyone to come check it out. We started growing and people started asking for more and more...and more...and more. hehe

3 - How did you get all the parts to work together? e.g. people could LOAD their projects ONTO the site, did you know all the www coding to do that or was it part of some website package?

The only thing on the site that I didn't code was the UBB bulletin board system, but even that I spent countless hours modifying. All of it was PERL with flat files for storage. Looking back, it was simply horrible coding practice. Regardless, I learned a heck of a lot.

4 - The absence of advertising made it a really clean slick place - did you ever consider having advertising?

Not at first, no. I personally hated the whole ads thing, but in the third year I was paying a fair share of my own money to keep the site running because it had gotten quite popular. So then I started looking for ways to make some money on it to at least break even.

That's when I started writing the Blitz book. It was a very rewarding project to work on, but man was it HARD. Anyone who says that it's easy to write a book has never written a book. :)

After it was published it was a double-edged sword. On the one side, it was making enough to help me break even on the site costs; on the other side, it made the site more popular and filled my email with tons of requests and questions about game coding and development, etc. I was slammed.

Fortunately, Charles "Specis" McCrimmon was fully supporting the site at that point…to the point of basically administrating the entire thing. If it hadn't been for him, I'd have lost my mind.

5 - In the early days there must have been just a few members there, how did word spread? How did people know it was out there?

Mostly Snarty was responsible for starting the influx of people. Then I think my tutorials started pulling more and more folks in. Then I went to a couple of BlitzCoder conferences in the UK (and a number throughout the US) and that added even more people. Finally, the environment that was set up was one that fostered help and didn't allow snapping at people simply for asking questions.

The goal was to be helpful, not elitist. I've always felt that just because I'm better at something than someone else doesn't mean I haven't traveled the road that they're currently on. Also, I'm smart enough to know that there are MANY people out there better at that same thing than I am…and it's quite likely that this person I'm helping today it going to end up surpassing my skills in the long run. Plus, frankly, I just can't stand people that act elitist. They're clearly hiding some type of inferiority or they wouldn't be that way. I think this attitude spread from me to the moderators and to the rest of the people on the site.

People weren't afraid to ask questions. They weren't afraid to participate in discussions, even if they were still noobies. It was about coding prowess, it was about enjoying the geekiness of coding in a mostly obscure language.

When it's all said and done the community ultimately made the site as popular as it was...they deserve the credit.

6 - Did you have bandwidth warnings/ data moving up to maximum levels to contend with?

In the end, the site was being slammed with so much usage that the Webhost I was using contacted me and said I had 30 days to remove the site from their servers! LOL. I felt a mix of pride and panic. I didn't have the money to do anything with this so I was going to put up a message that I was taking the site down.

I happened to be talking to George Bray (then of Idigicon) about some book fixes that I needed to make before the next run and I told him that BlitzCoder was in trouble. He talked to Giles Hunter and they offered to take over the running of the site. From there I slowly moved away from Blitz stuff and into other languages, doing another book for Idigicon on Pure Basic.

Well, that's about it I guess. It was a fantastic experience and there are so many fond memories of all the people that I got to meet on that site. Most of the people I know only by their Aliases, which is kind of cool actually.

Thursday, May 13, 2010

Blackbox coding

I'm in the middle of a big project for work that is very geeky and fun. I'm having a blast coding it up.

Essentially I have a bunch of APIs that I have to integrate a game into each time one comes in.

As anyone who codes knows, this is a tricky proposition because it takes time to understand someone else's code. Once you understand the code then you have to start working the API hooks into it. Then you do your testing and get others to help test. Finally, you ship that version of the product and then do the next integration point for the same game (hook in another API for a different launch portal). Currently we have three portals to launch out of, but there will be another 3-5 over the course of the year. This puts me in the position of each game taking like a month to do. With 15 games looming, anyone can see that's not gonna happen quickly.

So I thought about it and decided to write a blackbox interface for all this junk that I can turn over to the game developer and allow them to do the integration themselves.

It looks something like this:



So the blackbox is essentially an interface. It has a list of all the available functions that the developer can code to. The developer doesn't have to worry about the Platform specific code. I do.

  • When the SWF is loaded, I set the distribution argument in the embed tags flashvars section, which tells the black box what platform to connect to.
  • The developer builds once on a generic platform, hand the code+build to me.
  • I create multiple .html files that have different distribution arguments, and then launch the game.
  • The blackbox handles the routing to the appropriate platform and the platform communicates with the appropriate server.
  • All the data that comes back into the game is identical regardless of the platform selection because the blackbox handles the translation.

I know that this isn't a novel idea at all, but it sure is freakin' fun to code! :D