BitBuilder Game Platform Documentation

I’m using the Wiki that’s built into the GitHub service for the BitBuilder Game Platform documentation. GitHub’s Wiki is full-featured, easy to use, and plugged right in next to the source downloads and commit history.

For any open source project to succeed, it needs serious and quality documentation. This is where most open source projects fail and it’s an area that I want to put a lot of focus on with BitBuilder. Since it’s a wiki, anyone can help out, and you don’t need to be a programmer to do so. In fact, it might even be better if you’re not as you’ll have a unique perspective trying to get things running.

My goals for the wiki are to have serious technical specifications for each facet of BitBuilder, but more importantly a series of great, simple walkthroughs to get you up and running, building your game quickly no matter what type of game it is (platformer, puzzle, rpg, adventure, shooter, etc.)

When it comes to documentation, what do you look for? What do you need from documentation? What do you hate about documentation? What makes one project’s documentation better than another?

I may have just solved my bug!

It’s compiling, so I thought I’d take a second to update the blog on my progress!

The other day, I blogged about the difference between char and char * in C and how I spent a good deal of time wrapping my head around how concatenations and string comparisons work in C and C++. It turns out that in my initial search…replace I mistakenly forgot to switch some of them back to the way they were written beforehand.

Since BitBuilder uses ELIX and the erroneous concatenations and comparisons were in the ELIX files, I may have solved it by reverting it back to the way they were. Programming is great like that. You learn a lot but it takes time and patience.

Here goes.

Liveblogging Progress on BitBuilder Today

BitBuilder Game Platform Logo

BitBuilder Game Platform Logo

I’m building games today with @hoylemd at Red Brick Cafe and, once we’re done our coffees, back in my apartment living room. Actually, to be truthful, I’m not working on my game BastardBlaster, I’m working on the BitBuilder Game Platform, which is my fork of the Mokoi Game Engine.

It’s a great exercise for me since it exposes me to C, C++, GTK, and git, which I love.

Hoyle is really good at C and C++ so he’s always great at bouncing errors off of and helping out. Will post more as I make progress.

Comparing char and char * in C++

I’m fresh off the boat when it comes to C++. I learned C in high school and enjoyed it very much, but it’s been so long since I’ve done anything with it, I’ve become really rusty.

Partway through my fork of MokoiGaming’s Game Engine, I ran into a strange condition in an if-block that was comparing the last character of a string to ELIX_DIR_SSEPARATOR. Why would there be two Ss? Did I do something wrong while renaming functions and code blocks with search/replace?

Investigating further, I found this double definition in a header file:


#define ELIX_DIR_SEPARATOR "/"
#define ELIX_DIR_SSEPARATOR '/'

I looked at this, completely puzzled why something would be defined twice. I figured it had to do with the difference between the quotes, so I removed one of the definitions and replaced the few instances there were of the DIR_SS version in the code to the DIR_S version to see what it would do (gotta love that.)

After an hour or so getting into the intricacies of C++’s string comparison, char comparison, and char* comparison, I figured it was just better to have two definitions in my header like what was originally there instead of dynamically trying to cast depending on the situation.

Is that right, or wrong? I like to live by DRY programming if I can avoid it, but in this case, casting to char from char* and vise-versa just seemed like so much more work than one more line in my header.

What do you guys and gals think?

Helpful Code Snippets (and app ideas!)

This post is about sharing my ‘Programming Notes and Code Snippets’ document, which I’ve been building on-and-off for a while in the hopes that it might help some of you solve a programming question you have or save you time while you’re building your code project.

I’ve also found this document to be very handy for coming up with new app ideas to get me started using new languages or tool chains. It’s how I got started on Quoats.

Google Wave used to offer this really awesome document embedding feature that doesn’t appear to be available with Google Docs (am I wrong? Correct me, please!), so I’ll just include a link to my code snippets document and an iframe version below.

Note that on all of the code snippets I include a link back to the source that I’m referencing. If these are in error or you’re the owner of the content and want it removed, be sure to drop me a line and I’ll correct the problem. As it is, these code snippets were found scattered across the Internet and this work-in-progress document merely hopes to compile them into something useful.

Enjoy and happy coding.