Categories
General

Taking Responsibility For Your Code

When you start a new project from scratch, you have a lot of freedom. Adding lines is almost as simple as typing it out and compiling.

As you add more code, however, it starts to constrain itself. You can’t easily add a few lines here because the code over there interacts with it poorly. Eventually, your code starts to rot and smells awful, but you have to work in it. It’s just not as fun nor easy anymore.

The state of your code base is the result of decisions made in the past. Sometimes developers have taken shortcuts to “get things done”, and then they have to suffer by working in stinky, smelly code that makes it difficult to do The Right Thing(tm). Unfortunately, these developers don’t take responsibility for their situation, and they keep doing what got them there in the first place. A colleague of mine says that they get into a state of learned helplessness.

As a result, it becomes easier to accept the state of the code base, to go with the flow, and to forget to be proud of your craft.

Soon, you are taking shortcuts as the normal course of events in large part because the shortcut looks like the main path. The path to creating legacy code (definition: code that doesn’t have tests) looks a lot less tangled than the path of TDD and SOLID principles. The real deception is that doing so creates the barriers, the gnarled weeds and growth, and you need more discipline and more patience to cut through it in order to get back to the right path, if you even bother at all.

Today’s shortcut results in problems with delivering results in a timely manner tomorrow.

The good news is that code is malleable. Even if the current state is bad, it’s possible to improve it, even if just a little.

Each day, you have an opportunity to improve the code for the people following behind you as well as for yourself as you traverse the path through the code again. And each day, despite the cause of the stench, you have the opportunity to use your skills as a software engineer, skills such as refactoring and TDD, to change the code from the stinky state it is in to a better, lemony-fresh state.

The alternative is to wallow in poor quality code, slowing your ability to deliver, and oftentimes adding to the problems that got you here in the first place.

Take responsibility for the quality of your code. It’s possible to have a better code base. Make it happen.

Categories
Game Design Game Development Games Linux Game Development Personal Development

March #1GAM Entry: The New Worlds

I did it.

I thought I had a design that was a bit too ambitious, but I somehow managed to finish my March entry for One Game a Month.

“The New Worlds” is a space exploration game. Your homeworld’s star is known to go nova eventually. Evacuating everyone is the only option, and evacuation is expensive. Explore the universe, set up bases on suitable planets, and increase the wealth of your homeworld before time runs out.

Download The New Worlds for Linux 64-bit (547 KB tar.gz file)
UPDATE: A 32-bit Linux version is available now. Download The New Worlds for Linux (543 KB tar.gz file)

I’ll have to write up how it all happened later, as I’m rushing off to see family this weekend. I had to cut back on features, such as setting up trade with alien civilizations.

There’s still at least one major issue with the game play. It’s entirely possible to run out of fuel and supplies and have the game continue to run even though you can’t do anything. You can’t go anywhere. You can’t wait to die. You can’t scrounge for supplies as it was a feature I didn’t have time to add even though I really wanted it.

I want to come back and address this issue, although the next time I touch this code I’m sure I’m in for a shock. It’s horrible and ugly and I hate myself for writing it. B-)

Still, it’s playable, and it’s possible to lose and win. And it is fun exploring and trying to survive in the universe.

March1GAM-14

March1GAM-15

Categories
Game Design Game Development Linux Game Development Personal Development

Jumping Into The March #1GAM Project

Last month, I finished my One Game a Month February project on the last day, just in time to submit it and get credit for it. Whew!

February’s project was made in almost 12 hours of actual work throughout the month. That is, for about 3 hours per week, I was able to hack a game together. What surprised me was that I didn’t need a huge block of time to get something substantial accomplished. I thought that 45 minutes was the minimum amount of time I needed to concentrate and get my bearings before writing or changing code, but some of my more productive game development sessions weren’t more than 15 minutes in length.

For March, I know I am capable of throwing something together quite quickly. I’ve spent a little over four hours so far on game development this month, and while I’m worried that my game design might be a bit too ambitious, I’m pleased with the results so far.

March’s game is “The New Worlds”, a space exploration game. You’re tasked with discovering interstellar resources to bring back to your homeworld to get everyone off of the planet before the sun goes nova. Hopefully you can find a new home for everyone as well.

Along the way you might discover planets that are already inhabited, and you can setup trade. As you increase the wealth of your homeworld, your ship can be upgraded to allow you to travel farther and faster with more passengers.

Here’s some in-progress screenshots over the last ~4 hours of development:

A random star field.

March #1GAM

Some random solar system. I changed the background from black to a purple-ish hue as I found it was a bit easier on the eyes.

March #1GAM

More planet variety, and clicking on a planet sends your ship there.

March #1GAM

Categories
Game Development Games Geek / Technical Linux Game Development Personal Development

February #1GAM Entry: Electomagnetic Play

I managed to put my February entry for One Game a Month together mostly in the last couple of weeks, sometimes with only 15 minutes at a time to dedicate to working on it. It’s amazing how much comes together in 15 minutes.

Electromagnetic Play is currently only available for 64-bit Linux as I wanted to get it in under the deadline. I’ll work on ports later when I have some time.

Download Electromagnetic Play for Linux 64-bit (1.5MB tar.gz file)

A quick description of the evolution of the game.

I thought of having magnets that you use to move metal balls around an arena.

February 1GAM

Eventually I decided on a simple game in which you have to catch the balls in a metal bucket, and you can only move the bucket by charging magnets on either end.

February 1GAM

Once I had balls dropping and magnets charging when you clicked on the green buttons, I had something that was basically finished.

February 1GAM

Add some scoring and lose conditions…

February 1GAM

…and tweak the challenge a bit by level, and we have a game.

February 1GAM

Categories
Game Development Marketing/Business Personal Development

I Have a Day Job Again

EDIT: You can see a post mortem of sorts in a presentation I made on the lessons I learned from my experience: Playing the Long Game: The Vital Importance of Purpose, Mission, and Vision to Your Business.

“You don’t know what it’s like out there! I’ve worked in the private sector. They expect results!” – Dr. Ray Stanz

I’ve been meaning to write about this topic for some time. Back in May of 2010, I put in my two weeks’ notice at my day job.

At the time, I wrote:

So why walk away from that? Because I’m also cutting myself off from an obligation to be anywhere for 40-60 hours a week. Those hours are mine now. I have the freedom to use them however I want. Instead of being a cog in an otherwise pretty great wheel, I’m making my own wheel.

Of course, with that freedom comes great responsibility. I’m solely responsible for the success or failure of my business. My future income depends more on my marketing, sales, creativity, and productive output than the time I spend sitting at a desk. It’s going to be hard work, and I’ll encounter challenges the likes of which I’ve never seen.

My burn rate said that I’d have enough savings for one year. Thanks to living in a city with a lower cost of living, the stipend I get as President of the Association of Software Professionals, and the support of my girlfriend-now-wife, I was able to last until 2012 before I needed to seriously look to supplement my income.

My income was near non-existent, though, and I should have been focused on supplementing it way earlier. You can do a lot of things wrong, but so long as you have sales/cash flow, you can live to tell the tale. If you don’t have cash flow, you can’t survive. I waited too long, unfortunately, so after having some contract PHP work disappear out from under me and realizing that I didn’t really have the network of support to find game development work easily, I once again took a full-time job.

I should do a full post mortem on my full-time indie attempt, but for now, here’s the highlights.

When I started out full-time indie, I probably spent too long figuring out what to do with my time. Eventually, I got into a structured daily routine of work. Things were going to be fine so long as I spent my days being productive. Get up, exercise, get some game development done, write a little, repeat the next day.

Unfortunately, I didn’t ship fast enough. My flagship game, Stop That Hero!, wasn’t officially released until a year after development, even though I thought it would be a one-month project at first. Even though I knew not to focus on technology and to focus on the game, even though I knew I should focus on getting to a positive cash flow as quickly as possible, even though I knew better, I still did the exact wrong things. While I had a good flurry of support from the pre-order, the sales are very low and aren’t going to be covering a regular meal, let alone mortgage payments.

Clearly what I’ve been doing isn’t working, but what was I supposed to do next? How was I supposed to turn things around?

Anything I spent my time on that didn’t bring in money felt like the wrong thing. I was feeling a lot of stress. Towards the end, I found myself somewhat paralyzed. Planning was important, but planning wasn’t action, but action for action’s sake wasn’t working. I could spend time learning a new development platform, but that would still mean no published games right away, but if I took time to plan I could figure out a way forward but who has time to plan? I know one hour of planning saves three hours of work, but if you only have mere hours left, you want to make them count. But that brings me back to trying to move forward while also trying to figure out which direction forward is. Gah!

I was disappointed, but I also felt like I was letting a lot of other people down. I’ve had a number of aspiring game developers tell me that I was an inspiration to them. My wife reminds me that I had a good couple of years worth of trying which is more than most people give themselves since they never make the attempt. She’s right, but it’s still hard to think I had an opportunity and lost it.

These days, it’s a lot less stressful not to worry about how to spend my day, wondering and second-guessing if I’m making the right choices in order to make a living. I’ve reintroduced that 40-60 hour week obligation, which means everything else in my life takes a backseat, but for the last few months, I’ve been able to breathe a bit more. I could take some time to reassess.

When I was hired, I made it clear that I fully intend to continue work on my business. It would have been a deal-breaker for me if I they were going to insist that I couldn’t as a condition of employment.

Now the trick is making time for my business outside of the day job hours while balancing the rest of my life. But I’ve been here before, and being on the other side of having a full-time business, I have new insights. I understand more fully the lessons I thought I pre-learned. I understand the game development industry just a little more.

So I’m not done. I’m going to live on. I’m going to survive.

And while there’s plenty of advice on how I should go about doing it, while there’s no shortage of people who can say that I should have focused on Facebook or mobile or free-to-play or Flash or HTML5 or Unity or Windows or any number of business models, platforms, and tools, I know I’ll find my own way. I’ll make my own rules.

In some cases, the consequences are heartache and failure that could have been avoided had I listened to someone else.

But I didn’t go into this to follow someone else’s lead. I’m not doing this to be like everyone else or make games like them.

I’m an independent game developer. I define my own success.

Categories
Game Design Game Development Geek / Technical Personal Development

January #1GAM Entry: Walls and Armies

I’m in crunch at the day job, and so I didn’t have weekends like I had hoped to work on a game project. Luckily, I had finished the design of this two-player card game, and it counts. I call it “Walls and Armies”, and the rules are below.

CardGameDemonstration

Setup:
Take a standard 52 card deck of cards. Remove the jokers from the deck and leave them out of the game.
Shuffle all cards into a main deck.

For each player:

  • Determine how many “walls” and “army” cards you get. For each type,
  • Flip the top card from the main deck to determine the number of cards to deal
  • If it is a face card (Jack, Queen, King, Ace), then place that card down in front of the player face-up and sideways to indicate that it is a “shield”.
  • If it is a number card, discard the card and deal the indicated number of cards face-down in front of the player. For example, if the top card was a 3, then discard the 3 and deal three cards.
  • The wall cards and shield cards are laid out individually in front of the player. The army cards are placed in a deck, and the player should not look at them.

Play:
The first player is the one who has the fewest wall cards, or if tied, the one with fewest shields, or if tied again, the one with the fewest army cards. In case of a tie across all three sets of cards, flip a coin.

For each player:

  • Pick one of the opponent’s wall or shield cards to attack, then flip the top card from your army deck. If the target card is face-down, flip it over to reveal it. You cannot attack wall cards until your opponent’s shield cards are eliminated.
  • If your card is higher, then discard both the target card and the army card.
  • Otherwise, your opponent can choose to leave it alone or counter-attack:
  • If left alone, you may stack your next army card on top of any of your in-play army cards, adding the number of the armies together to attempt to eliminate the target card.
  • Your opponent may choose to counter-attack by playing one of his/her own army cards.
  • If the counter-attack is higher than your army card, then the counter-attack is discarded, and each of the stacked armies are added to the opponent’s wall cards.
  • Otherwise, both the counter-attack and the stacked armies are discarded.
  • Repeat until you run out of army cards.
  • Replace all face-up shield and wall cards with face-down cards.
  • Replenish your army deck by flipping the top card from the main deck. If it is a face card, add it to your shields. Otherwise, deal yourself the number of cards indicated into your army deck.
  • Play continues until either player has run out of wall cards. The other player is declared the winner.

Categories
General

I Received My #LD48 Gift Exchange Gift!

This is the first year I’ve participated in the Ludum Dare Gift Exchange. Yesterday I received an invoice in the mail in French, but no package. I was confused, thinking, “An invoice? This isn’t how this works.”

Today, there was a knock on my door. The jolly postal worker had me sign my name on a small piece of paper and handed me a rectangular box:

A mangled up box marked FRAGILE

It says “FRAGILE” and yet you can tell it was still shipped in the same cargo ship that transported exotic circus animals. Still, I opened it, and it seemed that even if the box looked worse for wear, the contents were packaged in some heavy-duty materials to make transportation safe. So the laugh is on you, circus animals!

Mead!

Chouchen Lancelot is mead, according to La Boutique Du Comptoir. Sweet nectar of the gods, I have a bottle of French mead! And the cork is covered in real wax, and it smells like fantastic French cork and wax!

Merry Christmas, Ludum Dare! And thanks, Adrien Giboire! I look forward to enjoying my gift!

Categories
General

Merry Christmas, Indies!

Merry Christmas 2012

It’s another Christmas, this time with snow here in Des Moines.

I’ll be enjoying a few days with my wife’s family, feeling welcome in each other’s company, playing cards, eating our fill, and watching classic holiday films. As a tradition I don’t want to skip, I hope to convince them to watch “Santa Claus Conquers the Martians” with me. It wouldn’t feel like Christmas without it.

May you and yours have a fantastic holiday season!

Categories
Game Design Game Development Games Geek / Technical Personal Development

12 Games in 12 Months #OneGameAMonth

OneGamePerMonth

It’s mid-December, which means people are remembering their New Year’s resolutions and rushing to accomplish them before 2013 rolls around.

Last year, I managed to release the Stop That Hero! alpha after many months of delay. This year, I similarly managed to get the next update out a few months ago after many months of delay, and it still hasn’t been ported to the Mac. Otherwise, I have a couple of Ludum Dare games under my belt. One of my aspirations is to be a prolific game developer, and this is not a good track record.

Ludum Dare has three main compos during the year (one is this weekend!), but each month in between features a miniLD with custom rules by whoever is hosting. I have been considering making it a goal to participate in each of these miniLDs if only to get 12 games in any given year.

Chris Kaitila, aka McFunkypants, wrote 12 games in 12 months about his experience in the last year attempting to make at least one game a month, so it seems I’m not the only one with such aspirations.

I set out this year to prove to myself that not all game projects need to stretch on for months or years. It was a battle against the featurecreep and code bloat that I’d suffered from for years as an indie gamedev. I’ve started so many more games than I’ve finished in the last 20 years.

From assembly language “hello worlds” to BASIC choose-your-own-adventures without an ending. From to Turbo Pascal Tron lightycles games, to Visual Basic prototypes so woefully buggy and half baked they weren’t even worth backing up. From unpolished (but complete!) C++ openGL shooters with only one level to Adobe Director (shockwave) horse-racers with no finish line. From php sports simulators with broken AI to html4 multiplayer chat worlds with server problems.

Looking in my Projects directory, I see that my unfinished 0h Game Jam about a horse race with no finish line. Hmm.

Now, Kaitila has a broader range of experience with tools and engines than I do. I could probably stand to get outside of my C++/SDL comfort zone, but the risk is taking the time to learn something new versus using what I know to work on games.

But he found that it’s easy to get sucked into a never-ending project, one that quickly stops being fun to develop, and so becomes one that never gets finished. I’m sure we’ve all been there. There’s a lot of discipline involved in game development, which isn’t obvious to anyone who hasn’t done it before.

So what can you do? Reduce scope! But feature creep is always a problem. Set short deadlines! But projects always have a way of taking more time than you planned.

Kaitila’s answer to both: game jams.

Instead of getting involved in a long marathon of game development which might force you to choose between your health/family/friends and your project, you run little sprints. Ludum Dare’s 48 hour compos and miniLDs are perfect. There are also other game jams throughout the year, such as Meaningful Game Play Game Jam and 0h Game Jam held during a missing hour due to Daylight Savings, so there are plenty of options.

Like daily workouts, each game project made me stronger. Faster. Better.

You can do this too. Challenge yourself to make a game a month this next year. Let this be your new year’s resolution. I’m going to do it all again in 2013. One game per month, on average, and a dozen finished products by the end of the year.

I’m issuing a challenge to all my gamedev friends: join me in the epic quest. It CAN be done. You don’t have to be hardcore, insane, or obsessed. Join me in the gameamonth challenge. We can help encourage each other.

If you have a Twitter account, you can sign up for the One Game A Month challenge. It’s like a game for game development. You get XP for each new game you post, and people who sign up before January 1st get 100 early adopter bonus points.

I’m in. Are you?

Categories
Games

The Response to the Humble THQ Bundle

What I love about the Humble Indie Bundles is that they are DRM-free, allow me to pay what I want, and the games are available for GNU/Linux, my preferred platform. The people behind it were involved in Wolfire Games, and I reviewed Lugaru years ago for Game Tunnel, so I was familiar with them. Even though the Humble Bundle company is now spun off and has serious investment behind it, it still felt like a great vehicle for publicity, sales, and altruism for indies.

I was surprised to learn about a new Humble Bundle while catching up on my game news. I normally receive emails from the people behind it. I even received emails when they tried branching out into ebooks and Android titles. I never received an email for their latest so-called “humble” bundle, though, and it’s probably because I’m registered as a Linux-based customer.

Humble Bundle Not So Humble

I first read about it in Ben Kuchera’s Penny Arcade Report article “The Humble THQ Bundle loses indie games, adds DRM, and is a step backward for the bundle model”. Kuchera writes about how this new bundle offers nothing that previous bundles were loved for, even pointing out that THQ no longer employs most of the people who made the games in the first place. This year alone there were reports of over 200 layoffs.

But here’s what really bothers me about the article. After lamenting the return to DRM, the removal of platforms, and the lack of indies, and stating “this is a move in the wrong direction. None of the things that make a Humble Bundle great are present. Instead we’re presented with what amounts to a Steam sale”, Kuchera says:

I’m going to be a hypocrite and buy a bundle, just because these are incredible games at a staggeringly low price, but wouldn’t it have been something if they were offered without DRM? Or if they ran on Linux? Or if the space was used to promote games that hadn’t already sold millions of copies? This isn’t a bad deal, but it’s certainly a step away from what made Humble Bundle so unique. If this is the sort of thing we can expect to see in the future, the Humble name could quickly become just another cut-rate digital retailer pushing catalog titles. Humble Bundles should be something special, and worth getting excited about.

The way I read that section: “Outrage! This is horrible! But I’m going to support its success so it has a better chance of happening more often.” Yes, it is hypocritical. Considering how over half a million bundles have been sold in only a couple of days, making it the most successful Humble Bundle yet, it’s clear that there’s a lot of people who don’t mind this Steam sale at all, but why add to their numbers if you don’t like it? Why support the “step backward”?

I’ll also call out Juuso of GameProducer.net for his Us vs Them: The New Humble THQ Bundle Case.

When looking at this offer only, it’s irrelevant whether there has been previous bundles or not. Whether previous bundle had Linux games or not, is totally irrelevant when it comes to evaluating the current offering.

If I’m having a good day today, it’s irrelevant whether I had a good or bad day yesterday. I can be happy about today, even if was shitty day yesterday.

Similarly, I can objectively look at this bundle offering, and determine whether it’s a good or bad.

I’m not quite sure where he is going with this argument. The past is irrelevant to today? There are no consequences you’re experiencing today as a result of actions from yesterday? If a company is known for being one thing does something that seems the exact opposite of what they should, I’m supposed to ignore it and pretend that it’s a brand new company? He continues with the oddness:

Equally well we could turn it around. Imagine that all the previous bundles were AAA, windows-only, DRM games — and you bought none of them.

And then comes a new bundle. If the new bundle offers indie, windows+linux+mac, no DRM games, would you not buy “because previous bundles were windows only”? To me, that makes no sense.

No, it doesn’t make any sense. Let’s take that last argument and really think about it. In reality, if such a bundle came along, I could see people deciding to buy it to support this step in the right direction. The idea that this example is the same thing at all is bizarre.

Now, I’m coming at this from a different perspective. Juuso doesn’t care that Mac and Linux were supported. He doesn’t care about DRM. He doesn’t care that the bundles have been good for indies. The Humble Bundle, to him, was just another option for getting good games at a good price, and so that’s his main criteria for evaluating this latest bundle. To him, everything else is irrelevant, and so sure, he finds the arguments against this bundle irrational.

For me, the Humble Bundle meant something else. It meant supporting independent developers. It meant explicitly not supporting DRM. It meant supporting more Linux-based games. It meant supporting charities and non-profits doing good work (it still bothers me when the EFF is not listed in a given bundle). The Humble Bundle brand made a difference. Up until now, I knew that if they were offering a new bundle, it supported all of these things, and I was happy to support them.

In contrast, I haven’t participated in Indie Royale sales or cliffski’s Show Me the Games because they almost explicitly don’t support Linux players, for one. I don’t have Steam on Linux (yet), and so I’ve only heard about the flurry of sales they always have. It’s great for you if you have a Windows-based system to play on, but irrelevant to my interests.

So let’s evaluate this bundle independently of the previous ones. I’ll use the same “facts” that Juuso used:

I get to pay whatever I want ($1 or more)

Ok, just like in previous bundles.

I get several games from a company who has paid & owns the rights for those games.

Sure, I like supporting the idea of buying the games from a legitimate and legal source. I’m not paying someone selling fake copies on a street corner.

But who is that company? Do I want to support THQ? I think that’s a legitimate question. Later in his article, Juuso asks if it would have made a difference if EA did it. Yes, I think that’s also a legitimate question, considering how many layoffs and reported bad practices there have been in the past.

I can decide the amount that charity will receive
I get to decide the amount that bundle creators receive

Here is a bit of redeeming news. Even if I have to pay a minimum of a dollar to be a hypocrite, I can decide that all of my money goes to charity, or at the very least, that none of it goes to THQ or to the Humble Bundle.

There’s DRM.

Oh, that’s a deal-breaker for me. If I paid for a game, I expect that I won’t have trouble trying to run it, and DRM is nothing but an impediment. Even if I want to try to play Windows games on my Linux-based system through Wine, paying for DRM is paying for me to have a tougher time. I don’t care how good you think the games are. The hassle is not worth it to me, and I don’t support such a draconian practice if I can help it. And I can help it here by not purchasing. I vote with my dollars by not being a hypocrite.

These are Windows-only games

Also a deal-breaker for me. If I have to reboot into Windows to play, I’m not likely to do it these days. I rarely have to use Windows, and I’m not paying for the privilege of encouraging me to do so. If I can’t play on a platform that is convenient for me, it’s a problem. It’s hard enough getting my older games to play on my modern system. I’m not interested in paying for more difficulty with simply getting the game to work.

As a GNU/Linux user, my experience is likely different from a Windows-based user’s, but I hope you can see that these aren’t irrational arguments against the newest bundle. You might think it is irrational for me to expect to play games when I use a Linux-based system, but see, that’s the thing. The Humble Bundle was responsible for many indies making their games available for me. I didn’t care if the latest major first-person shooter involving World War II or space marines wasn’t available for me to play. I did care that games such as Braid, World of Goo, and Gratuitous Space Battles were available. The latter game would NOT run in Wine, and cliffski has made it clear that he didn’t care much about Linux before. Since Humble Indie Bundles required that you supported Windows, Mac, and Linux, I’m grateful that I could finally play his amazing and innovative game.

Since I can’t play THQ’s games without encouraging DRM and a lot of effort, I’m not going to support this latest Humble Bundle. It would be irrational and hypocritical of me to do otherwise.

What’s your take? Do you find this latest bundle to be a good development?