Tuesday, August 26, 2008

My insane ramblings about how the Internet keeps me sane

Some people who work on their computer all day dread the thought of using a computer for a moment longer when they get home.  For me that's like saying that I've been breathing all day at the office, so I'd rather not breathe when I get home.  To clarify the analogy, I never think about "breathing" as my primary activity.  I'm always doing something else.  Nobody ever calls you boring or uncultured because you breathe all day long.  Sitting at the computer, for better or worse, is like breathing to me.  There are so many different things that I can do on the computer that to clump it all together as "sitting at the computer" is an unfair, hasty, ignorant categorization.  Don't get me wrong, you could easily chastise me for not getting enough exercise, and for having what is almost certainly an addiction and I'd gladly concede, but that's not my point. 

What I do on my computer at home is generally quite different from what I do at work.  For example, after a long, busy day full of hectic events that may be largely computer-centric, I find it therapeutic to sit at yet another computer and blog about whatever it is that's been stuck on my mind.  Hey, it worked for Doogie Howser, and who am I to argue with him or his overly simplistic word processor?

image

Computers can also simultaneously be the source of my stress and stress relief.  An Internet connection keeps you connected to the rest of the world despite the fact that you may be crammed in an office for long hours working on a nerve-wracking project.  (This doesn't reflect my current situation, thankfully, but it certainly has in the past.)  It reminds me of one of my elementary schools, built near a small, somewhat active retail center.  This school stood out from my others in the fact that it wasn't buried in the woods, or deeply entrenched in a residential area devoid of life from 8-5.  The classroom window wasn't just a window outside; it was a window to the rest of the world.  Peering through it reminded me that there were still people out there going about their lives, doing interesting things (since anything was interesting compared to being confined to a classroom all day, every day).  It didn't matter as much that I was stuck in school because I knew that there was still an exciting world out there, and I would eventually be part of it -- and for now, living vicariously through them would suffice. 

The Internet is that window for me.  Whether through RSS feeds, message boards, or chat windows, regardless of how enclosed I feel at work, I am always just a click away from sanity.

Sunday, August 24, 2008

Render Target!


Progress is creeping forward in my Silverlight game. I've heard from 2 other people interested in helping out with the project and have start to refactor heavily as a result.

There are many complications involved when your dev team grows bigger than 1, especially with members new to the technology. As a result, I've gone so far as to throw up a render target (quality is questionable) which you can see to the left, and a bunch of probably unseen UML diagrams which help me lay out my thoughts as much as it helps the other devs figure out what I'm trying to do.

So far, this project has incorporated a lot of the latest and greatest .NET 3.5 has to offer, such as: WCF Services, LINQ, LINQ2SQL, and XAML with Silverlight/WPF (for tools).

It's been great learning all this tech, and I hope it'll result in a great game. It might be a sip of the Kool-Aid , but hearing about Mike's forays into the IPhone SDK, and having a few stints into the LAMP stack, the Microsoft dev environment seems to be unmatched. With some experience and a decent code library, one could create a ridiculously powerful application in a ridiculously short amount of time.

Thursday, August 21, 2008

Microsoft development, I will never forsake you

Warning: The following post was originally posted to a development blog of mine, and is thus heavy on the programming jargon and ranting.  Feel free to ignore for your sanity's sake.

For the past few weeks I've found myself jumping from one shiny project to the next.  I was enticed into trying game development using Silverlight, which I still regard as an exciting technology with lots of potential, but my heart just isn't in it.  If I targetted that platform, I'd be doing so out of pragmatism instead of passion; that is, I know there's a potential market there, but I wouldn't enjoy the work.

My latest flavor-of-the-month project has been game development with the iPhone SDK, whose Kool-Aid I drank in one giant gulp.  The iPhone is amazing.  The interface is slick and intuitive; the app store is exciting and full of great (and not-so-great) apps with a promising revenue model for independent developers, and the development platform is... utter shit.  Without breaking the NDA (I hope), let me just say that just about everything about the iPhone development story is inferior to what Microsoft has to offer.  I don't claim to be an expert after only about a week of experience (albeit with many hours put in), but here are some gripes so far:

1. First, there's the fact that you have to use MacOS to develop for the iPhone.  In my case, I'm borrowing my girlfriend's MacBook.  I would very much prefer to utilize my dual widescreen LCD monitors, but I realize that this complaint is circumstantial.  I'm sure that a savvy Mac user could navigate the MacOS with ease, but it's a struggle for me.  It would be nice if there were a Windows option somehow.

2. Second, I have to use XCode, Apple's free IDE.  I will be fair; for a free IDE, it's packed with decent features, and I can't really compare it to Visual Studio Express (another free IDE) given that the latter benefits from the features of the full versions of Visual Studio.  But it's still a giant step backwards.  The syntax highlighting is overly subtle, the code completion guesses at what you're trying to type but doesn't pop up a list of options (at least not automatically).  I've yet to see a list of method overloads appear; you're at the mercy of your memory and the greatly-inferior-to-MSDN documentation, which lists all of an object's methods/properties in one long list.  There doesn't appear to be any sort of refactoring capability, though I can probably blame the language (which I'll get to soon enough).  The solution explorer equivalent is strikingly un-Apple-like, showing redundant information while lacking important information at a glance.  I've run into bugs in which error and warning markers in the code don't disappear even after you fix the errors. (I even deleted the offending code entirely and rebuilt with no luck). 

3. Objective-C.  Oh my god.  Could Apple have picked a more obscure language?  Why not just stick to C or C++?  The syntax in objective C is unnecessarily arbitrary, with objects calling methods (or more specifically, "sending messages to call a method") of the syntax:

[object methodName]

(including the brackets.)  You can even (and are encouraged to) nest these calls, for optimal confusion:

[object1 methodName:[object2 getSomething:[object3:getSomethingElse]]]

My favorite (sarcasm, in case it wasn't obvious) detail about methods is the parameter passing.  You see, a method signature is defined not by its return type, name, and parameters, but rather just its return type and parameters.  Read that again: Return type and parameters.  Something missing?  That's right, there's NO METHOD NAME.  Or more specifically, the method name IS the parameter list!  So, a hypothetical method to open a file read-only might be:

[FileObject openFile:@"myfile.txt" readOnly:YES]

Or an even better example:

[MySpatialObject setPositionX:100 andY:120]

That's right, I can't have a method called "SetPosition".  Instead, the method is technically called: "setPositionX:andY".  Of course nobody would use the word "and" in a real-world parameter name, right?  GUESS AGAIN, it's encouraged!  Method names are supposed to read like prose.  I am a strong advocate of longer method/parameter names for the sake of readability and avoiding obscurity, but there are much better solutions to this problem than this.

And just as an extra kick in the nads, the standard coding conventions fly in the face of everything that modern, civilized software developers have evolved toward (e.g. curly braces on separate lines for the love of God, curly braces surrounding one-line if statements, non-cryptic class/variable names, etc.)

Oh, did I mention that this language isn't strongly typed?  Enjoy.

4. Interface Builder.  Fine, this relates to XCode, but it's bad enough to deserve its own category.  This is the GUI tool that creates...well, GUIs.  Hell, even Apple devs don't seem to like it.  It's again another ironic example of Apple's dev tools flying in the face of Apple's typical design philosophies.  This tool is completely unintuitive to use as opposed to Visual Studio's designers, involving all sorts of GUI elements that can be connected with lines as a way to graphically "wire up" events and relationships.  So much of what you'd expect (i.e. you click on a control in the visual designer and immediately see a context menu with this control's attributes and event wiring) just doesn't exist.  You have to dig through options to even see these things, and even when you find them, their function is not obvious.  Can the people who designed the iPhone interface please help out designing this tool as well?

---

There is much more to write about the iPhone dev woes but I'll save that for another post.  In general, if you want to know what the iPhone dev environment is like, use an iPhone for a week.  Then use a Windows Mobile phone the next week.  The extra pain you'll feel the second week is analogous to the pain you'll feel switching from the standard Visual Studio/C# environment to the iPhone's.  But at least in Windows Mobile's defense, it does have extra features it's trying to pack in.

 

After working on iPhone development/learning for a few hours today, I worked a bit on my XNA Game Studio project.  It was an almost orgasmic experience.  It felt like the feeling you get right after stepping off a treadmill after a long run.  Suddenly you feel like superman, almost gliding along the floor effortlessly when you walk.

Tuesday, August 19, 2008

Negative Friends

Here's a post from a former blog of mine that I felt was appropriate to post here:

Over the past year or so, I've noticed that there are certain friends and acquaintances in my life who frequently get on my nerves. That's okay, since friends can't always be expected to get along all the time. But at some point, I've noticed, it becomes so bad that I find myself less happy on average with them in my life than I'd be without them. Do you have friends like this?

In my view, a friend is supposed to be more than a warm body that shares an interest with you. A friend is supposed to be somewhat tolerant and non-judgmental. They're someone you can talk to and confide in. Looking over the friends I have now, I can only point out a few who exhibit these qualities.

Most of my friends are largely ego-driven. Some are always looking to one-up a story, put someone down (including me) in order to make themselves feel better about themselves, etc. I can't relate to this. One common example that's especially bothersome is this: When a friend of mine tells me an idea they have, my first instinct is to support them. With my friends, most of them have the first instinct to slam the idea down. Where does this come from? How does anyone become that way?

All of this is leading to my main point, which is that it seems that many if not most of my friends are a net negative force on my happiness. While this is sad, I think it's at least good to identify this, because from here I can actually address the issue; cutting ties with negative friends and surrounding myself with positive ones.


Do you have friends like this in your life? Have you done anything about it?

Monday, August 11, 2008

To create or to borrow

I seem to always find myself working on game projects in spurts, often spread months apart.  Inevitably, by the time I've started a new project, technology has changed enough to warrant an investment in a newer, shinier codebase.  With this realization, I always face several questions: Do I use an engine, or just bake the engine into the specific game?  I almost always choose the former, but then comes the harder question: Do I write my own engine to be exactly what I want it to be, or do I borrow someone else's?

In the past, I'd readily take on the challenge of creating my own game engine.  I've written dozens of sprite/animation libraries, several GUI systems, and a few 3D view management systems.  This process is invaluable and despite what your mentors may tell you, I'd recommend doing this at least at some point in your game-developing life.  The lessons learned are worth the effort, and you'll consequently approach third-party engines with much more insight into their motivations.

But what inevitably gets me are the tool requirements.  If I'm creating any game of remotely significant scale, I'm going to need some sort of sprite editor, level editor, and animation editor at least.  It's not feasible to hard-code these assets anymore. 

To this end, I've been re-exploring the Flat Red Ball engine, which has above average support (dare I say, "exceptional"), a sprite editor, an animation editor, and a particle effect editor to name a few.  It began as a Managed DirectX engine and evolved into an XNA Game Studio engine, with support for XNA Game Studio 2.0 as of this writing.  I have a healthy level of concern about the longevity of this engine, but my skepticism is tempered a bit by the fact that the creator has maintained this code for over two years straight with regular updates, and responds to forum posts and IMs promptly.  It seems to be a labor of love for him, and hopefully he'll see more from it in the future.

Sunday, August 3, 2008

Getting chores out of the way

I spent the past few hours throwing together a very bare-bones customer management app for the local coffee company, which should hold the owner for now.

image

There's lots of room for improvement, and this fact makes me thankful for ClickOnce deployment.  It makes the patching process so much easier; it's almost dangerous how lazy it can allow developers to get (publishing garbage now with the intent to clean it up later).  I think the good far outweighs the potential bad, though.

I look forward to the mountains of feature requests I receive.  Let's hope I get some time to work on my XNA Game Studio project between now and then.

Saturday, August 2, 2008

So long DotNetNuke

My stint with DotNetNuke looks like it's coming to a close. I think DNN is fantastic, but I want to create a complete silverlight experience. Having remnants of Web 1.0 HTML floating around, contaminating my Rich Internet Application like dust on a diamond, just detracted from the user experience I seek.

What does this mean work load wise? I know have to write a login WCF service. Apparently ASP.NET has a rich set a libraries for this, complete with Membership roles. So perhaps it won't be too painful, and I will be able to dictate exactly what I want from my user., instead of lazily requesting your First and Last Name just to keep DNN happy.

Silverlight 100% here we come.