Sunday, December 7, 2008

Red, White, and Blue


It can be found here.

I feel comfortable with Silverlight now and will be releasing a few "How To" articles for people interested in the technology. That said, the actual game didn't turn out as well as I had hoped, but I do think the map control, the one that features the zooming of the States, came out pretty slick.

So do I continue on this project, or move on to another one? Normal d-roc fashion would have me bury yet another failed project, and tackle something new. What will happen this time?

Wednesday, December 3, 2008

Regarding Coding Tutorials on Blogs

I was reading an article about the Model-View-ViewModel design pattern when I noticed a comment which sparked my rage against an all-too-common pattern I've observed in recent years:

If you're doing WPF development, you really need to check out Dan Crevier's series on DataModel-View-ViewModel. Right now there is no easy way to read through all his posts on the subject without navigating through them using the calendar control on his blog.

With the prevalence of increasingly easier blog services like Blogger or Wordpress, anyone can be a publisher.  Unfortunately some have used these services (with little additional customization) for purposes they are not well-suited for.  While we may likely contradict this post at some time in the future, I'd like to express my increasing annoyance with blogs that post coding tutorials.  A blog is a much-less-than-ideal medium for hosting coding tutorials. 

Why?

For one, when I'm looking for coding tutorials, I want them categorized.  I want to be able to easily sort through XNA Game Studio SpriteBatch tutorials or WPF TabControl tutorials.  With blogs, your posts are time-based.  They are generally consumed in much the same way a newspaper or magazine is; you don't often reach for an old issue of a magazine or a newspaper from a few months or years ago.  You use them to get recent information about topics of interest.  Blogs are designed around this assumption as well.

Now admittedly, a blog is orders of magnitude better for retrieving archived information, but the filtering mechanism is still subpar.  The best that you can reasonably hope is that the blog author applied an extensive and thorough use of tags, which certainly isn't something you can count on, and is often completely arbitrary.  (I can write an entire article about the problems with the hacky "tags" system so prevalent these days.  In fact, I'm struggling to come up with an adequate set of tags for this post.)

Instead, developers should separate their tutorials and their blog posts.  Perhaps services like Blogger should (if they don't already) easily facilitate categorized articles.  Google seems to be on to something with their Knol system, but I imagine there's a better way.  Speaking of Google, it seems that currently most tutorials are found by searching for a particular topic, and trusting that relevant archived developer blog entries will appear in the search results.  Thankfully, Google tends to pick up the slack where the blogging system falls short.  But it shouldn't have to be this way.

Tuesday, November 25, 2008

Coding Vacation '08: Bad Timing

Several weeks ago I took the initiative and committed to something that went against my conventional patterns of behavior.  I decided that I would spend some vacation time devoted primarily toward developing software -- my personal projects, of course.  In the back of my head, I heard voices telling me that this was not an acceptable justification to take vacation time.  Vacations are for trips or visiting family, they said.  But, much like the thought processes that steered me toward the video game industry rather than business apps, the thoughts compelling me to take this vacation won in the end.  I announced my plans confidently to my friends and family, as if asserting it this way would protect against any criticism.  And, well, I didn't receive any.  In fact, I only received support.

My girlfriend, of course, saw this as an opportunity to spend more time with me every day.  She is currently unemployed, so she has a lot of free time.  It's very difficult to make the argument that I need to spend so much time doing things alone on my computer when I have a rare opportunity to spend extra time together, but she seemed to understand.  Of course, that didn't stop her from coming over often, inevitably leading to a lot of time spent away from coding.  Much of this time was spent with her playing the newly released World of Warcraft expansion: Wrath of the Lich King.

I can't blame her for this; I always want to play, and I have to keep myself at least somewhat disciplined.  It just makes it so much easier to play when I have someone to play with.  Between my uber druid and my hopelessly gay mage, there's so much fun to be had; so many hours to lose.

image image

For the past week it's taken all my energy to avoid getting completely sucked into the grind.  I have to reach level 80.  I have to purchase an epic flying mount.  I have to obtain uber gear, etc.

To make matters worse, I'm leaving to visit my brother for Thanksgiving tomorrow.  Don't get me wrong, I love visiting him, but it's more time spent away from coding.  Compounding this is the fact that he plays World of Warcraft as well, and I'm giving him the new expansion pack as a gift.  Nevertheless, I'm bringing my Mac Mini and an LCD monitor with me tomorrow.  Yes, I'm a little bit crazy.

Despite all of this, I have made significant progress on my app, but there's much to be done.  I will talk more about it later when I feel less reserved about it.

Thursday, November 20, 2008

Red, White, And Blue Logo


Some say, it's amatuer. Screw those guys.



Tuesday, November 18, 2008

Oct 31st == Nov 30th && Shared plans == win!

So much for that beta by Oct 31st. I've had a lot of petty life things distract me from what's important: Red, White, And Blue! It is coming together though and I have high hopes. There are some interesting obstacles involved with keeping many clients in sync (quasi sync at least), and all the bugs that can occur when you have a client that loses sync with the db.

I have a really annoying issue where a browser's cache will prevent users from downloading a new client, so should I rename my client on every update just to trigger a download? Sounds clumsy. I don't think I would like old silverlight clients pinging my services either, so will I have to check a version string on every login? Seems so.

I am relying on the fact that all of my WCF sessions will exist in the same AppDomain, so I can use a single static to keep track of users. Risky and clumsy, I know, but I'm already stretching the capabilities of a shared hosting plan about as far as possible. I don't know many websites on shared hosting plans using WCF services, Ajax style PollingDuplex binding, Linq2Sql , hosting silverlight. This stuff came out last night (pretty much), so I've been happy with how much I can get away with on a shared hosting plan.

It really is a tribute to the computer industry when you can get so much power for a measly $100 / year hosting plan. This is our one up on any other industry: the low barrier of entry. Can you even imagine something similar in the auto industry? Investment banking? The factories, connections, and brown-nosing needed to do the most trivial things in other industries makes me love my field that much more.

See you next Sunday and have a happy thanksgiving!

Sunday, October 12, 2008

Red, White, and Blue

The final title for my web game, slated for an oct 31st beta. Three parties, three colors: red, white, and blue. I decided to pull back on the plot in an effort to stay out of politics, we don't need half-assed political dialogue in a budget web game prototype (v2?).

The next piece of tech I would like the exploit is Silverlight's Polling Duplex support. Similar to the "AJAX Push" or "HTTP server push", this technique, coined Comet by the web community, allows one to emulate packet "Pushing" in the browser, without having to face the hurdles of socket programming, policy files, and blocked ports. I'm pretty excited about it's capabilities and it's ease of implementation with WCF and Silverlight. Although it won't be enough for any serious real-time multiplayer communication, it'll be "good enough" for most scenarios, especially those found in a turn-based world.

As a side note, does anyone have a problem with dandruff dirtying up their keyboard?

Tuesday, October 7, 2008

XNA Game Studio Coding Jam, Fall '08

I recently signed up to attend an event for developers and artists which allowed them to collaborate on an almost-released build of XNA Game Studio 3.0 and build a game in a short amount of time. When I signed up, I was under the impression that this event took place on a Saturday and lasted all day long. It wasn't until last Friday afternoon that I got an Outlook Calendar reminder which corrected this false assumption, informing me that in fact it was an all-weekend event.

Reluctantly, especially given the time and energy I've been devoting to iPhone development recently, I bit the bullet and told myself that this was an opportunity that I didn't want to pass up.

The event consisted of an Iron Chef-style "five ingredients" challenge (also similar to gamedev.net's "elements" programming contests), in which we picked from randomly generated lists of game elements from which we derived a game concept. We quickly formed into groups, each containing (thank the Lord) an artist, and tried to pick the most appealing set. The elements we chose were Doom, Clock, Robot, Pirate, and Defense. Our game: Doom Clock Robot Pirate Defense.

DoomClockRobotPirateDefense2

As an aside, it's funny what goes on in my head when I have to choose team members in a short amount of time. Ultimately I'm looking for enthusiastic, motivated, skillful people who are also mellow (i.e. no Prima Donnas). Obviously it's impossible to gauge this in such a short amount of time, but I was fortunate with my group.

We ironed out the basic details of the gameplay Friday evening, and began our implementation bright and early Saturday morning. (Seriously, it still amazes me that I was able to show up on time at 9am on a Saturday.) Much to my great concern, we opted against using source control, and instead agreed to use a memory stick as our repository. Yikes. In retrospect, I bet I could have created an actual SVN repository on that thing. It wouldn't have been perfect, but it would have likely eliminated many headaches.

It quickly became apparent that our lack of source control was a very bad idea. Nearly all of our changes involved multiple shared files, and the process of merging was very manual, and very confusing. We essentially had four different versions of the code floating around at any given time, and it became difficult to tell whose changes were the newest. Instead of merging to the USB stick, team members would often just copy the changed versions of their files to a separate folder on the stick, making it nearly impossible for me to tell when a line from the USB stick's code was newer or older than what the programmer had copied to the new folder. Suffice it to say, it was a big mess, and I'll write it off as a reminder of why source control is so crucial.

Our artist, Chris, was hard at work from the very start. I regularly glanced over at his drawings and wished I had that ability. I also envied his lack of need for any sort of source control solution. We'd call out when we needed art assets, and I was tempted to ask for something completely ridiculous just for the fun of it, but I restrained myself. I really like the opportunity to work with an artist on a project for several reasons. First of all, I'm much more inspired to work on a project when I have visual gratification at regular intervals. I may be able to create intriguing gameplay without an artist, but I don't really believe it until I see it. As soon as I see appealing illustrations and animations, that's when I first start to feel the real potential of my project. Second, it's a great experience to discover the processes needed for a functioning content pipeline. What format should my images be in? What size? Should each frame of an animation be a separate image or a large composite image? What if the composite image isn't a square; will the texture importer complain? Questions I may not have even considered are suddenly an important part of the process, and this experience makes future projects go much more smoothly.

DoomClockRobotPirateDefense

After a couple full (but not overly burdensome) days of coding, we ended up with a fairly playable prototype. It contained several types of enemies with AI, three different types of towers, several levels, a controllable player, collision avoidance, a snazzy menu system, support for the Xbox 360, and even same-box multiplayer. I added all the code to a repository which I shared with the team, and I've even seen significant updates from one of the developers in the past couple days. I am tempted/eager to clean up the code, since ours was inevitably very messy and arbitrary, and just enough to "get the job done." I am almost as much a Code Nazi as I am a Grammar Nazi. (Although seriously, I don't think that avoiding "u" in place of "you" and knowing the difference between "your" and "you're" qualifies me as a Grammar Nazi; that just means I have at least a third-grade education.) I just think there's something inherently selfish about writing bad code if you're on a multi-person team, but I'll save that soapbox rant for later.

Thursday, October 2, 2008

More Mac/iPhone development updates

I have several posts in one of my other blogs that are applicable to this one, so I suppose I will fix one of them up and post it here, so as not to appear M.I.A. The following is a follow-up to some landscape-mode issues I've been having with iPhone development; specifically, if I apply a transform to a root level screen in my app, any child screens added 1) will not have that transform applied in the iPhone simulator, as I would expect, but 2) *will* have that transform applied on the actual device:


I've at least found a good temporary solution for the landscape issues, and I've been progressing with learning Objective-C / Cocoa / UIKit / etc. but not to the point at which I can concretely delineate between each of these terms. I'm also struggling a bit but getting the hang of several things.

I finally installed a third-party mouse configuration software so that I can get more than a kindergarten level of control over my mouse sensitivity.

I'm getting the hang of the MacOS app launching model, the dock bar and how it represents running versus non-running programs, the "Finder" file browser and its quirks.

XCode is like Visual Studio Lite, or perhaps "Visual Studio Gimped". I've chatted endlessly on IRC with people who gladly praise XCode over Visual Studio, but I wonder if they've used VS2005 or greater. It's just no comparison; there are redundant windows/panels everywhere, the debugger runs in a separate tiny window, though you can resize it, covering your other windows. The expression watcher is nowhere near as powerful as Visual Studio's, and Intellisense (or its equivalent) is weaker in its implementation, requiring more keystrokes for simple tasks.

Speaking of the tiny debugger window (obviously resizable), this is a common observation with MacOS. It seems the norm to be expected to manually drag windows around and place them as you need them; stretching them to just the right extents, etc. In Windows my usual mode of operation is to only do that when I'm copying files from one explorer window to another. When I'm running apps, I generally switch to the app, then maximize the window if it isn't already maximized. Windows seems to work well with users who are used to this behavior. MacOS doesn't seem to be expecting it; hence, I'll find that apps have lots of little "helper" windows that are expected to be resized to comfortable dimensions for the particular user at that particular time. This is not how I want my apps to work. Visual Studio supports this, but also a very extensive docking scheme so I can have all my windows docked where I want them instead of floating about in the ether, always getting in the way of content behind them, or else getting hidden themselves when I click somewhere else.

Again I find it ironic that so much of what makes the iPhone dominant over Windows Mobile is the same that makes Visual Studio dominant over XCode and the general Mac development situation. Of course, I am trying very hard not to bias my arguments with my existing familiarity with Visual Studio. There's still much more to learn.

Other factors which add major hurdles include simple things like the feel of the keyboard. It's no longer Ctrl-C, it's Command-C, etc., not to mention completely different dev environment hotkeys. And on my particular keyboard, the Esc and F-keys are tiny.

I finally bit the bullet and sacrificed dual-monitors on my PC in order to have a dedicated monitor with a DVI input from my Mac. I also switched placement of my keyboards/mice so that my Mac is in my primary workspace on my desk, and my PC is riding shotgun. This will encourage me to give my Mac some more love.

Update: The lack of multi-monitors with my PC is getting annoying, but I bought a new keyboard for my Mac, realizing that PC keyboards usually work just fine. This has been so great for my sanity and has filled me with some extra spirit that was lacking the past few days.

Wednesday, September 24, 2008

Why am I coding?

Every once in a while, I stop and think, "wow, I've spent a lot of time coding." And for what? How many side projects have I buried in my repository? I code for work and play, and it can be taxing.

Right now, I'm juggling three new technologies, and love experience. But what else could I have done during this time?

  • Raise my bench max to 300 lbs?
  • Write a novelette?
  • Work on my public speaking?
  • Work on something that I can actually show?!

My previous side projects haven't been seen by many. This lack of exposure is a big reason why I've moved to web development. I am tired of doing a substantial amount of work, that's never to be seen. I feel as if I was stranded on an island of creativity, and just kept pushing bottles of ideas into a swallowing sea of bits.

Ok, I've taken the analogy too far. But I hope this time, more people get to see my work. I have to learn a lot of things; gone are my graphics libraries and shader skillz, but so what? They probably weren't that good anyways.

Monday, September 15, 2008

Secession

Today's bankruptcy filing of Lehman Brothers and Bank of America's purchase of Merrill Lynch defined a new Black Monday in what could be a new Great Depression. This event is sure to make future iterations of Globalization when the Economy portion of the game is released, but let's not get ahead of ourselves. For now, let's keep our eyes on the November 30th Alpha which will have the turn-based combat. This first chapter of Globalization will be titled Secession:

Set in 2020, the Republicans have just won their 6th straight presidential election, only to be rewarded with a country torn asunder. The previous decade saw numerous clashes between the two political parties, and spawned thoughts of secession in the halls of democratic strongholds. Throughout the years, media slammed small town conservatives, bible beaters denounced godless liberals, and now, politics wasn't just a stance, it was a way of life.

During the chaos, another ideology bubbled into significance in the northwest. The Green Party Libertarians rose to take the mantle of the west, rejecting the status quo of America's two party System, and jumped into the increasingly hostile fray.

The Republican's November victory was the last election to be held across the Union. Seeking independence from the larger Republican electoral block, the other parties seceded immediately and drafted their own policies. This did not calm the tension, and the new borders became the new frontier.

Thus was born the War of the Primaries, a sempiternal struggle that broke the union, shook the balance of power, and emboldened America's enemies.


Welcome. Choose your party ...


That's all I've got. I chose to have a 3 party campaign to add complexity to diplomacy, and to prevent any one party from becoming too powerful. All party systems seem to evolve into a virtual two-party system, where alliances are formed between the weaker factions to secure victory. Hopefully, the three party campaign will emulate that idea; when there's an imbalance in power, the weaker parties will pair up against the superpower.


With regards to the actual game. I've focused on tool development, with the world editor about 40% complete, and a lot of database work finished. I am looking forward to the ability to manipulate the story and the world in real time. It allows for some interesting dynamics that simply cannot be matched by a fixed plot stamped onto a disc.

In another note, I've read Vargo's posts and can't help but notice his writing superiority. I hope to improve my writing, but I have a ways to go before I can match his eloquence. I DO wonder how many rewrites he goes through for one post ...

Sunday, September 7, 2008

My hiatus

I know you've all been wondering why I haven't updated in a while. There are two reasons: 1) I haven't had a Mac available for iPhone development since August 28th or so, and 2) I'm on vacation right now in Disney World, returning September 10th.

I'm having an awesome time but it'll be really nice to be home and back to my geeky endeavors.

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.

Tuesday, July 29, 2008

Obligations and Pleasures

As the saying goes, "No Good Deed Goes Unpunished."  I've offered my services to the local coffee shop I frequent, now realizing just how much of my free time I'm sacrificing when I could be working on more rewarding endeavors.  D-Roc will undoubtedly take this as some sort of excuse for why I'm not getting work done, which I will combat right this instant by saying that I need no excuse; I fully admit that I am a slacker and often have a hard time finding motivation, and I never claimed otherwise.  He can continue to boast his glossy screen captures with pride, and the straw man he's attacking will continue to tremble in fear.

image

Anyway, I found myself buried in WPF books and articles just to accomplish a simple customer management app.  Don't get me wrong; I intend to continue learning WPF but I'd rather devote my work time for this as opposed to my free time, which is better spent exploring XNA Game Studio

To this end, I've reduced the scope of my customer management app from a WPF app with databound database, to a Windows Forms app with a DataSet serialized to and from a big-ass XML file (though in fairness, given the size of the coffee shop, it's a relatively small-ass XML file).  These are all familiar technologies to me, so I shouldn't have to spend much time in R&D.

On the topic of obligations versus pleasures, as I mentioned before I'm also continuing with XNA Game Studio.  I realize that I could reach a broader audience with a web game, but I just don't care.  The type of game I'd enjoy making is better suited for XNA GS.  And as Jonathan Mak would say, if you're creating a game for someone else, how can you call yourself an indie?  (But let's be honest, I always have a mix of the player and myself in mind.)  Plus, the new Xbox LIVE Community Games system could, at least in theory, easily offset the lack of PR I'd suffer from if I tried to launch a web game from my own site.  Perhaps if a major web portal starts supporting Silverlight, it'd be a different story.

My next post will cover some of the decisions I (or any indie dev) has to make when deciding on a technology.  Until then, not to be outdone by D-Roc, allow me to meet the bar by posting a screenshot of an all-but-empty window:

image

Sunday, July 27, 2008

DotNetNuke and Silverlight Chatter done!

I finally have a framework up for logins and other mundane albeit necessary web things. Using DotNetNuke, I will be having an optional login for my silverlight games. You can check out how to plug silverlight modules in DotNetNuke right here:
http://dnnsilverlight.adefwebserver.com/Silverlight20/tabid/65/Default.aspx

I wanted to take a very minimalist approach, deferring most of the page space to the hosted silverlight module, rather than slamming my viewers with clumsy div boxes that seems to be standard for enterprise web pages. You can check it out below (ignore the placeholder silverlight button):



I custom skinned the Dnn portal which was extremely easy. Don't fall for the lazy trap and buy off-the-shelf skins, they tend to be garbage anyways. Here's a great site to learn how to skin Dnn sites:
http://www.dotnetnukerocks.com/tabid/3167/Default.aspx

If you are just starting off, remember, only edit the .htm files. The "parse skin package" will generate the .ascx file for you to manipulate later. You'll know what I talk about after reading / watching the tutorial linked above.

To get my silverlight app to benefit from the user login received by DotNetNuke, I pass the information as InitParams to the Silverlight module. I leaned away from marshalling data back and forth between JavaScript and Silverlight because of the added difficulty of doing this inside a DotNetNuke module. I might exploit that capability in the future, but for now, I'm just happy with a unique username that I can plug into my own database to create a personal gaming experience perhaps even across multiple games.

As for my associate Vargo, he's been silent lately, probably waiting to have something substantial to show in his next post. Don't wait up.

Saturday, July 19, 2008

Indecision in Game Design

Every week my game changes. This week, we're looking at Civilization meets Supreme Commander with a dash of Wall Street (in game stock ticker reflecting the game economy, stock purchasing incorporated in full force!). A game will be played simultaneously by at least ~40 players in their browser and last around a month. They log in every day or so and spend 30 minutes managing their country/state/corporations. The first chapter will be titled "Secession" and only contain the United States. I'm trying to limit the scope for the initial release while keeping the environment interesting. I don't know about you, but I've always wanted to invade Jersey.

Keep posted for progress reports! My alpha will most likely by a single player game with no ai but a real time version of the game described above, to test out physics and game mechanics.


I would like to take a moment to apologize for the ramblings of Vargo. He's spamming his own blog with gibberish and making the whole site look pretty amateur. Maybe after he reads this, he'll clean it all up. I wish there was an option to view posts by author, if there is let me know. For now, to save you time, just look for posts by d-roc. Vargo's posts combined might produce one with substance. I hope this doesn't continue and again, sorry.

Monday, July 14, 2008

My First WPF Application

While slowly trudging through Windows Presentation Foundation Unleashed, I found a (hopefully) simple application that I can practice with.

About a year ago I offered my programming services to a local coffee shop owner in order to practice my ASP.NET skills and hopefully score a lifetime supply of free coffee. Unfortunately (or in hindsight, extremely fortunately), the owner wasn't very interested in a web site.

Fast forward a year later, and the owner is interested in a tool to manage his customer credits/tabs and punch card status (i.e. number of purchases until the next one is free). This sounded like a perfect opportunity to over-engineer and practice some real-world application of WPF.

I will be creating a simple GUI app with a SQL Server 2005 Compact Edition database back-end to accomplish this goal. I want to also experiment with minimalistic UI, trying to borrow from examples from Apple and counter-examples from Microsoft. I want to try to minimize the "signal to noise ratio" of the app, if you will. I still have a lot to learn about WPF, though.

Sunday, July 13, 2008

Reading Comprehension and Beyond

You can clearly see from D-Roc's prior post that he missed the entire point of my previous post. Namely, the blog was contingent upon his participation, and his willingness to participate (or in D-Roc's terms, his willingness to "take the first step"), was non-existent.

His reading comprehension may need work, but despite this it's good to see D-Roc finally making blog posts, even if it took him a couple weeks to "take the initiative."

Edit: I welcome the opportunity for this blog to serve a selfish secondary purpose of exposing common logical fallacies used in everyday life. I expect D-Roc to be a veritable treasure trove, and he's off to a good start. In D-Roc's last post, for example, we saw a clear example of a Straw Man:
"The Straw Man fallacy is committed when a person simply ignores a person's actual position and substitutes a distorted, exaggerated or misrepresented version of that position".
Examine the following paragraph:
My cohert, Vargo, spoke endlessly of the ultimate blog, with promises of tutorials, vlogs, discussion boards, and the community that would come with it. What was the result, months after the vision? Nothing. The first step is the hardest, is this why he never takes it?
The underlying argument D-Roc is making: "Vargo promised a blog, etc. but didn't deliver, probably because he wasn't willing to take the first step." Notice the false premise that D-Roc sneakily inserted. He implies that I had intended to create a site independent of his participation, but as I blatantly spelled out in my previous posts, that was never the intention. Thus he's attacking a false argument, or... that's right, "straw man". Here is where reading comprehension would have come in handy.

Edit #2: Just to be clear, I never implied that I'm not lazy and unmotivated; just that D-Roc's argument holds zero weight. You'll hear him criticize my lack of future action as evidence that he was correct, when in fact he's only verifying his straw man. Common, tired tactic. Move along, nothing to see here...

Saturday, July 12, 2008

Initiative and Beyond

There's a lot of talk out there with the promise of rich internet applications. Let me add to the pile of e-promises and tell you all right now what my purpose is: To put the BLING in rich internet applications. That's right, Bling. This blog will serve to document my adventures with Silverlight, something I'm equally excited and frustrated about. Excited, because it's a subset of WPF, and frustrated, because it's a ridiculously SMALL subset of WPF (No triggers! Seriously). There is already a very clean application that can be used with the Silverlight 2 beta 2 that you can find here:

http://www.farseergames.com/

My cohert, Vargo, spoke endlessly of the ultimate blog, with promises of tutorials, vlogs, discussion boards, and the community that would come with it. What was the result, months after the vision? Nothing. The first step is the hardest, is this why he never takes it? As is the norm, I took the liberty of relieving him of that step and created the page you are looking at now. Wow, action! Imagine that. I remember the last idea we had, another great one. Behold the glory of an internet multiplayer 3D platformer featuring shader instancing, shadow mapping, etc, which was code named Project Earnie:



Who's idea was it? His. What did he do? Nothing. His sermons only yield inaction. But there is a hidden fruit to all this malice: He inspires me to be different. And so my disposition towards development has been cemented as: Don't talk, Do. I'll be sure to deliver something tangible within the next few months, mark my words.

d-roc

Monday, July 7, 2008

Blogs, Tutorials, and Beyond

As part of the grand blog idea, I wanted to include various coding tutorials, with the selfish goal of testing my own understanding and forcing me to learn things I don't (but want to) know.

I've never been a fan of tutorials via blogs, though. Don't get me wrong; if I Google a coding topic and find a blog post providing a tutorial, I'm certainly appreciative, but what if I want to browse all available tutorials by this person? What, am I supposed to scroll through every story about this person's dog or new baby in order to find the occasional how-to article? Of course not. It's like we've taken a step backwards with this trend of tech professionals providing tutorials in blog posts. What ever happened to the ability to browse?

This is one of the reasons I didn't want to limit this site to a simple Blogger blog; I wanted to potentially have a browsable page of tutorials, vlog "episodes", or whatever the case may be. Blogger may provide functionality to add widgets or whatever -- it seems to allow a lot of customization -- but then this brings up the issue of which web technology to use. As far as I know, Blogger is based on PHP, and I'd rather Dimitri and I use ASP.NET (and I'm sure he'd agree). I was researching several ASP.NET blogging/community site options prior to Dimitri "taking the initiative" and creating this site, and we may make the transition to one of these at some point in the future.

Saturday, June 28, 2008

My Introduction

A couple months ago, wanting some motivation/inspiration for my coding projects, I decided that I wanted to create a blog with a coworker to document our software development efforts as well as our semi-informed opinions about various technologies, etc. I figured it might be fun to also add an audio and/or video podcast, which has become so common these days.

There's no shortage of software development blogs on the internet, but reading through these I often get lost or intimidated, feeling like a n00b due to my lack of knowledge of the subject being discussed. But I also regularly encounter many newbie programmers who are just scratching the surface of professional software development, and I can imagine how intimidating it must be for them.

Being stuck between these two groups, I find myself in a unique position to be a bridge between these classifications. I can learn from the experts and will regularly read their blogs and listen to their podcasts, but I have a lot to offer newbies, and would likely be much more approachable than the alternative. My co-author D-Roc can do the same, though he'd likely deny any hint of n00bness for his ego's sake.

So it seemed natural that the primary audience for our blog/podcast besides ourselves would be these newbie developers, and I was set with the idea. Whether or not we gained a huge following didn't matter so much, because one of the primary goals was self-motivation. Thinking that my friend and coworker D-Roc would surely be on board, I approached him with the idea.

"That sounds gay," D-Roc responded, all-too-familiarly.

I may be embellishing a bit, because it's hard to keep track of whether he called an idea "gay" or "retarded" or just "stupid", but you get the jist. He didn't like the idea at all.

I pressed the issue in the weeks that followed, with no change in his response. I didn't want to do this solo, because two people working together can feed off of each other's motivation. It just wouldn't have the same dynamic without someone to bounce ideas off of.

I had all but given up on the idea when one fateful day, in a far-too-common type of scenario, another coworker (a development lead) sent an email to the group with a link from a post at codinghorror.com. In this post, Jeff Atwood writes a list of ways to improve one's coding skills. One of the items was: "Write a blog."

Not an hour later, D-Roc announced to me his brilliant idea: "I'm going to write a blog! I think that's a really good idea!"

...

As I mentioned, I've encountered this scenario far too often in my life, in which someone else takes credit for embracing an idea that I all but force-fed down their throat previously.

So, despite trying to get feedback from D-Roc about his preferred blogging site/technology/blog name for the past few weeks without any response devoid of the word "gay" or "retarded", that random email sparked D-Roc to create this Blogger account. Further, he had the gall to claim that the reason "we" didn't have a blog was that I was incapable of initiating things, despite the fact that the creation of the blog was entirely contingent upon him accepting the idea, which he didn't until a few days ago.

Needless to say, the name/host of this blog may likely change, but for now I have to settle with the mediocre amount of cooperation I have from D-Roc.

Seriously, why do I code with this guy?

Wednesday, June 25, 2008

WPF a must for Silverlight

If you're interested in Silverlight, be sure to learn WPF first. Or you could do everything backwards like me: traverse the logical tree and set Dependency Properties by hand in C# code (don't do it).