Aug 122010
 

I’ve been pretty motivated lately to try to make some positive changes in my life.  Given the opportunity to attend a game developer’s job fair, put together by the awesome Jim Rivers from Obsidian Entertainment, I’ve decided to be a little more proactive regarding the development of my career as a Software Engineer in the game industry.  With approach of the job fair (that took place yesterday) I decided to implement some much needed updates to my personal website.  Prior to my changes my website wasn’t much more than a skeleton.  I had some pretty non-critical content, including some social networking and gaming references but there wasn’t really any kind of content that describes what I do for a living or my skill set as a programmer.  That has all changed.  I’ve got a pretty accurate depiction of my last 2 years working as a programmer at Quicksilver and I’ve got some of my game reviews and tutorials posted as well.  There is still room for improvement, however, and I hope to continue making these improvements to the website until I have at a place where I’m satisfied with the message it puts out there for the internets at large.  Feel free to check out the main site (http://jeemusu.com) and let me know what you think.  Thanks for reading.

Jul 062010
 

Its been a while since I’ve posted a blog.  I’ve been quite busy with many different things.  I’ve been working with my company (Quicksilver Software) to get our comic book app Longbox out finally (http://longboxdigital.com).  I’ve also been working with some old classmates from college on some game projects outside of work in my spare time.  So, sufficed to say, I’ve been a little busy.

I wanted to post an update and also ask that you vote for me as I have entered Sony’s open casting competition to be a contestant on Season 2 of “The Tester,” Sony’s PSN show that follows a group of gamers that are in competition to become a Sony Quality Assurance tester at SCEA San Diego.

I submitted an entry for myself because I thought it could be a lot of fun and I would like to see what can come of it.  So here is a link to my “audition” video.  Following the video there will be a link to my profile.  If you could, please vote for me, and as always, thanks for reading!

Here is my profile page:

http://casting.thetester.com/Jeemusu

May 042010
 

So, I guess I’ll give this tutorial thing a try.  I’ll begin with something simple.

Let’s learn about Extension Methods in C#!

Extension Methods were introduced in C# version 3.0 (C# Version 3.0 Specification).  Extension methods allow you to add or “extend-to” a pre-existing class a method of some sort.  This is particularly useful when you wish extend a method to a type that is defined in C# (or something closed source) without having to create another class and derive another type.

The format is as follows:

public static void ExtensionMethod(this extensiontype var, type additionalvar1, type additionalvar2, .....)
{
    //Do something...
}

Ideally, you might wish to encapsulate these extension methods in their own class.  Perhaps even a class that only contains extensions for the particular type you’re extending:

public static class SomeTypeExtensions
{
    public static void ExtensionMethod(this extensiontype var, type additionalvar1, type additionalvar2, .....)
    {
        //Do something...
    }
}

Furthermore, you could encapsulate the multitude of extension classes you create into their own namespace and optionally include the use of the extensions on a class to class and/or file to file basis in the using statements.  I’ll let you decide on that at your own discretion.  I like to follow this convention in my projects where I need to use extensions:

namespace Extensions
{
    public static class SomeTypeExtensions
    {
        public static void ExtensionMethod(this extensiontype var, type additionalvar1, type additionalvar2, .....)
        {
            //Do something...
        }
    }
}

It’s important to note that the class containing your extension method must be static and the method you are extending must also be static.  This is a requirement for extensions methods.

OK.  Now that we have the appropriate syntax in our heads for defining an extension method, let’s put what we’ve learned to use.  Let’s define a simple extension to the int type that allows us to print the value of the int to stdout:

namespace Extensions
{
    public static class IntExtensions
    {
        public static void PrintInt(this int integer)
        {
            //Print the integer value for the int object caller
            //and a newline
            Console.Write(integer.ToString() + '\n');
        }
    }
}

You can choose optionally which classes you wish to implement this extension based on the namespace where it lives.  If you have encapsulated the class in an ‘Extensions‘ namespace like I suggested earlier, then you can simply add it among the using statements of the classes you wish to have access to your extensions:

using Extensions;

Once a class has access to your extension you may call the extension method on any variable of the type you provided an extension for:

int number = 5;
number.PrintInt();

The output to the console will look like this:

ExtensionsExample1Output

It doesn’t get much straightforward than that.  If you wish to try out the code explained above here is a link to download the Visual Studio Project (requires Visual Studio 2008. Though, it may work with Visual C# 2008 Express or 2010 Express which are free.  I haven’t tested it.  You’re welcome to.):

Example1.zip

I have taken the time to create another, more advanced, example using the Microsoft.Xna.Framework (this requires XNA 3.1).  In the second example we are modifying a Texture2D object to extend a draw method to it.  The end result is a sand texture stretched across the game window.  Here’s a link to the second example project:

Example2.zip

For more guidance and examples you can consult the C# Programming Guide for Extension Methods at MSDN where they provide the general syntax and usage as well as recommendations for when extensions should and should not be implemented.

Hope this was helpful.  Thanks for reading!

Sources:

C# Version 3.0 Specification
(http://msdn.microsoft.com/en-us/library/ms364047%28VS.80%29.aspx)
Extension Methods, C# Programming Guide
(http://msdn.microsoft.com/en-us/library/bb383977.aspx)
Sand Texture Graphic for Example 2
(http://mayang.com/textures/Nature/images/Sand/sahara_sand_patterns_220511.JPG)
Mar 242010
 

I’ve recently rekindled my interest in development using the XNA platform after rifling through some old project files and finding a game project that has gone unfinished.  I had great plans for this game as it was a contender in the 2008 Imagine Cup competition for game development.  We did pretty good.  Team CTW was awarded 3rd place nationally and we were able to showcase our game prototype to many people.  But, as is the case for many projects, it died shortly thereafter.  With impending midterms and graduation for some of us, Team CTW quickly disbanded as well.  As I said, I always had plans for this game.  With that, I’ve been given a spark of motivation as of late to actually finish it.  This would entail a tremendous overhaul of the base game framework and some more art.  For now I guess I will tackle the easier of the two tasks and fix the code base.  Hopefully, with little resistance, I can convince the old team to get back together for one final shot at finishing this game right.

In my browsing I also came across and old DVD with some rudimentary tutorials for 2D and 3D programming using XNA.  The video tutorials in the XNA Beginner’s Guide DVD and the supplementary information provided therein were pretty helpful.  I would recommend the tutorials to any novice or beginner interested in learning the XNA framework having no previous programming experience.  The video tutorials do a good job of easing you into programming with C# and XNA.  If you can’t get your hands on the physical DVD with all the tutorials and resources you can find the tutorials (and resources) here; at the XNA Creator’s Club website.  Here is a listing of the tutorials found on the DVD that are also hosted on the website:

The Creator’s Club website (http://creators.xna.com) is also a great place to find more tutorials and support that go beyond the concepts presented on the DVD.

Thanks for reading.

Dec 292009
 

Borderlands Box Art

Borderlands

5 / 5
Platform:
PC, PS3, Xbox 360
Release Dates:
Consoles: NA October 20, 2009; PAL October 23, 2009; JP February 10, 2010
Windows: NA October 26, 2009; PAL October 30, 2009
Developer:
Gearbox Software
Publisher:
2K Games
Genre:
FPS (First Person Shooter) / RPG (Role Playing Game) [See also Role-Playing Shooter]
Playtime:
100+ hours

I will say that I genuinely enjoyed every moment of this game. The fact that I can play through the game once, buy DLC the day it comes out, play through the game again and still come back wanting more is a testament to the quality of the game-play experience found in Borderlands. Though I gave the game a 5 out of 5, it is not without flaw. I experienced many a bug and glitch in my extensive play through of the game, but despite all its flaws I can say this is one of the best cooperative Role Playing Shooter experiences I’ve ever had.

The best analogy I can provide to describe the game-play of Borderlands would be to say that if Diablo 2 and Fallout 3 got together and conceived a child of a video game, the offspring produced would be Borderlands. Borderlands encapsulates the first person shooter elements and apocalyptic setting of Fallout 3 and the role playing, character advancement, item generation and inventory system of Diablo 2 and fuses them together to create a bastard of a video game that is nothing short of amazing.

The game is set within the world of Pandora where you assume the role of a treasure hunter who is seeking the fabled vault: a place that is said to hold a great alien treasure but is only accessible every 200 years. Game-play consists of completing main quest missions that follow the main quest story arc as well as optional side quest missions that are not required to complete the game. You can assume the role of 1 of 4 classes each possessing their own strengths and weaknesses and a special power intrinsic to that specific class. You gain the use of your special power at level 5 and from then on you are given a stat point at each level to assign to whichever skills you deem best all the way up to the level 50 cap. Each class skill tree consists of 3 main branches emphasizing a particular build of that character class; each build offering certain enhancements to that tree designation.

For example, as the Hunter you might choose to level up the branch of skills that enhance Bloodwing’s abilities; the pet that is called forth to attack as the hunter’s special skill. You do, however have the option to instead assign points that enhance your abilities with pistols, or your abilities with sniper rifles, or you can distribute the points uniformly across all 3 tiers. This flexibility in skill set attribution is a quality that is present in the Diablo series (hence the heavy comparison to that series).

Borderlands has a high amount of replay-ability as you have the option to play it alone, play on local co-op with a friend in split screen mode (Xbox 360 and PS3 only), or play it online amongst your Xbox Live, PS3 or PC friends. I chose, personally, to play through it alone the first time so that I could experience the entire game at my pace. In my second go through I often played with my Xbox live friends or on local co-op with my brother. Much fun was had by all.

If you are looking for a challenge I must warn you that the game doesn’t get much easier once you’ve hit the level cap. In fact it becomes much harder. And if you’re thinking strength in numbers will help you, you’re wrong. The level of difficulty in Borderlands scales with your level (and oddly above that once you’ve reached 50) and with the number of people you have joining your party. So the formula for eye gouging, head splitting good time is to arrange a party of 4 each at level 50 then have a go at some of the later missions within your 2nd or 3rd play through. I guarantee many deaths and much frustration for you and yours. But its all in good fun right?

I mentioned previously that Borderlands is not without flaw. I can say, personally, on the Xbox 360 build of the game that I experienced many bugs and glitches. For your consideration here are just a few:

    I had issues with getting stuck in the level geometry and having to reload the map in local co-op (not to mention this happening in single player mode and having to completely restart the game).

    I experienced strangeness in one of the missions where I had to completely restart the game after getting locked out of the world behind a sliding door in a “kill all these guys without dying” mission scenario.

    The final bug I should mention should probably be filed as a physics problem. In a co-op game with my brother I engaged him in a duel and ended up getting blasted off the map. After this first momentous occurrence we decided to play around with the glitch a bit seeing how far he could possibly blast me off the map. We found the best approach to achieve this was for me to stand at the edge of some square piece of geometry like a crate or box of some type. He would the crouch down below and aim the shotgun somewhere at my feet and blast me to ridiculous heights; often times outside the map bounds killing me instantly. We played around with this for quite a while and eventually ended up launching my character completely outside the collision bounds for the map resulting in my character falling through the level infinitely.

    [NOTE: In case you might wish to attempt to replicate this, my brother was considerably lower in level than my character maybe about 10 or so levels and he was using Sledge’s shotgun on my character in a duel scenario. We attempted to reverse our roles in trying to replicate this bug but I killed him instantly as I was a much higher level than he was. The key to this glitch is for the shooter to be a much higher level than the “human canonball.”]

I’ve mentioned some great things about Borderlands, and some not so great things (maybe even some shortcomings that one wouldn’t expect to see in a commercial game). Despite my opinions and my findings in playing the game, the fact that I can still with great excitement declare it to be worthy of a 5 out of 5 really says something about the entertainment value of the title. I can’t wait to see what Gearbox has in store for us in their next DLC update for Borderlands.  Hope you see you online when it comes out.  Thanks for reading!