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.

Windows Azure SDK + Visual Studio 2008 Error

Error creating Windows Azure project in VS2008. Help!

This is not a typical blog post for this blog and I apologize for this one in advance. I’ve been working with some friends from Coffee and Code on gearing up Azure development and I need the community’s help. Your help.

I’ve freshly installed a copy of Windows 7 in VirtualBox. I’ve installed Visual Studio 2008 Professional and its SP1. I’ve also selected .NET framework 3.5 from the Windows features menu. I’ve reinstalled DX11 and Uninstalled then reinstalled the Azure SDK and the Azure VS2008 tools.

Every time I go to create a new project I get this error:

'Grid' object cannot be added to 'Grid'.
Exception from HRESULT: 0x88980406.
Error at object 'System.Windows.Controls.Grid' in markup file.
'Microsoft.VisualStudio.CloudService.Wizard;component/newprojectdialogcontent.xaml'.

After I click OK (the only option available), Visual Studio shows the message in the status bar:

Creating project AppTest ... project creation failed.

I’ve searched on the web and asked around to find a fix for this error as I’d really like to get going on Azure development. Can anyone in the community help me?

Reblog this post [with Zemanta]

Back into Torque. Big time.

I haven’t touched anything to do with level design or game development in a few months as there have been a few other important issues and projects to tackle. But, with the upcoming Christmas holidays, I’ve decided to take 2009 and really flesh out some C++ and torquescript skills and maybe do some creative work, such as 3D modeling and music. I’ve installed VC2005 and VC2008 along with Torque Game Engine Advanced and Torque Game Builder. Let’s rock.

I’m really excited. I’ll be posting all of the work that I complete in the Game Development, Game Art, Xandorus, and Torque categories.