Wednesday, April 6, 2011

Exploring the Galaxy

In 2008 I created Galaxy Gameworks as a small LLC to handle commercial licensing of Simple DirectMedia Layer on the iPhone. Since then I have been maintaining it at a minimal level in my spare time to make it possible for people to use SDL on iOS and other embedded platforms.

As soon as I made the concrete decision to leave Blizzard, my brain started exploding with ideas on how to expand Galaxy Gameworks into a full blown games middleware company. My vision was to build the company into three pillars each designed to help people make games:
  1. Software: Starting with SDL and expanding to meet important needs for small developers, based on my experience leading a development team at Blizzard Entertainment.
  2. Education: I have always been a big fan of student and indie development, and I know an awesome woman, Brandii Grace, who used to teach at Digipen and is on the board of the LA Independent Game Developer Association who could help start this.
  3. Consulting: This is a less developed idea, but there are lots of companies that need help at strategic points to help get their games shipped, and this would be a great service to complement software and education.
As soon as I left Blizzard, I blasted into overtime starting development on SDL and learning what I needed to build Galaxy Gameworks into a real business. I had lots of connections and people interested in what I was doing, and was really excited about the possibilities. I gave myself until the end of March to explore what is involved with creating a company and making my dream a reality, without committing myself.

It was a really amazing experience. I brought all the pieces together to start the company:

Company Vision
I have seen quite a few companies in my day, and I wanted to bring a company vision that incorporated the best of what I have seen, with an eye towards practicality and treating employees really well. I also wanted to have clear goals so that employees who are brought on and potentially given ownership have a good idea of the kind of company we are trying to make.

Virtual Office
I decided early on that I wanted to create a virtual office. This gives flexibility in hiring and reduces overhead, but means you have to work harder to find people who can be self-disciplined, stay motivated, and communicate well remotely. I put together a virtual office around Google services, and set up business phone and FAX. I also worked out the advantages and risks associated with distributed development, and talked to some companies that actually operate that way to find out how it works in practice.

Website
Good branding and easy to use website are really important. Some of the important elements are a showcase for your products, good documentation, clean presentation, and easy navigation.  I hired someone to create a logo (the process is described in another blog post) and create a new website for a commercial presentation.  The result is at http://www.galaxygameworks.com and while it's not complete, it's a good start.

Customer Service
I hired a friend of mine, Jen, to handle customer communication and start setting up hiring processes. She is is amazing at organization and has customer service and HR experience. She is handling the mailing list and forum, organizing bug reports, and handling customer inquiries and licensing. She also did research on the tax implications of hiring contractors and full time employees in other states and potentially other countries.

Documentation
I have been working very closely with my friend Sheena, who has great technical writing skills and is learning programming, to put together high quality API documentation (work in progress at http://wiki.libsdl.org) We also put together plans for tutorials and use cases with examples.

Business Plan
I worked with my wife Lauren and an old friend Jeremy on the draft of a business plan. Lauren is awesome because she is a technical writer by trade and can take large amounts of technical information and organize it in an easy to understand manner. Jeremy is awesome because he's spent the last 15 years or so in software sales and business development, and is extremely innovative and works well with customers.

Between the three of us, we came up with a great business plan centered around three products. The business plan really helped us focus on our goals and business strategy. We thought about our strengths and weaknesses (SWOT analysis), our competitors and potential partners, the trends in the games industry, and our costs and potential sources of income.

We got great feedback on our plan, and a few themes came up repeatedly:
  • What problems are you solving?
  • Keep it short - what's your elevator pitch?
  • Can you show a fast return on investment?

In response to the feedback, we cut one of the products to stay focused and reduce costs and ended up with a revenue and expense chart that looks something like this:


Investors like to see an exponential chart, and a return in the 6-18 month timeframe. :)

Coda
I'm pretty confident I could find some investors at the $300,000 price point and create a small sustainable company creating middleware in the games industry.

At the end of the day though, I realized that even though I have all the pieces I need and lots of support from friends and customers, it was taking all my waking hours and would continue to do so. In a few years when the girls are older and becoming independent that might be okay, but my time with them is precious and I want to have as much of it as possible now.

So, I'm closing Galaxy Gameworks for now, and the quest continues...

Monday, April 4, 2011

How I left Blizzard

Blizzard doesn't tend to be very open about how and why people move around at the company, and I still have people asking me what happened, so for those interested I thought I'd share my story.

As far as I know, nothing I'm writing here is confidential, so please tell me if that's not the case.

To understand something of the story, I really should start at the beginning...

After the Wrath of the Lich King launch, I was looking to move on to something new. I loved Blizzard and I didn't want to leave the company, but I wanted to work on a smaller team, a smaller project, with more responsibility. Unexpectedly, a job opened up for technical lead on a small unannounced project that was getting underway. It was a small project, with a short timeframe, at least for Blizzard, and it was a project that I personally was very interested in. I applied, and at the beginning of 2009 I was the engineering lead on a new unannounced Blizzard game!

I was very excited, and spent the first few months researching engine technology, getting some of the  infrastructure set up, and worked with the producer on a detailed technical plan for the project.  After that, since the designers had a solid idea for the game and were making great progress in the prototype, I started work on proving out the gameplay systems and hiring the most urgent engineering positions.

Come July 2009, the company sounded a call to arms to help Battle.net get ready for the Starcraft II launch. There was much to do and each team loaned a person or two to help out. Since our team was so small, most of us went to help out, including our producer and UI artist. We kept a small crew of designers, an artist and our newly hired graphics engineer to keep the project alive during our tour of duty on Battle.net.

We kicked butt, took names, and Starcraft II launched smoothly a year later with Battle.net 2.0.

During the course of that year, our producer was promoted to lead Battle.net producer, and the designers made great strides in evolving the game design and the gameplay model. The graphics engineer had completed the core of the graphics engine and was roughing out the tools pipeline and content creation system.

When we returned from Battle.net, I jumped right on getting our AI/gameplay engineer up to speed on the gameplay systems and started the herculean task of migrating code I had already finished over to the new gameplay model and tools systems that were developed while we were gone.

Three months later that work was being wrapped up, and I was called in to a meeting and told that there were issues on the team.  I had just worked out some issues with my gameplay engineer, but there were issues beyond that, which they needed to follow up on to give me concrete feedback.

Over the next week I implemented a great suggestion from them which improved my communication, our part-time producer led technology goal and milestone meetings which I had requested and were very helpful, I worked on a clear division of labor and responsibility among the team, and I had one-on-one meetings with all of my engineers to see how things were going.  As far as I could tell morale was improved, things were going great with my gameplay engineer, and we had a clear plan for the future.

I was feeling great, and was told that even though things had improved, there were still unspecified issues that were being looked into.  The meeting was very uncomfortable as though something were being danced around, so I mentioned that if the leadership of the team thought it was best, I was willing to step down.  The meeting suddenly relaxed and I got nervous.

A few days later, I was asked to interview someone for technical leadership of the team!  I asked for the chance to talk to whoever was having problems, and was told that would be awkward.  A few days after that it was confirmed that they had already made the decision to have me step down, but that the team leadership was there to help me succeed however they could.

So after a little primal scream therapy, I sat down and really thought about what went right, what went wrong, and what really was important to me.

One of the factors that I think contributed was that we hired really experienced people in the industry, and I hadn't had experience building a small game from the ground up.  Instead of mandating how things should be done, or bringing a set of best practices, I tried to work collaboratively to help us develop the best tools and approaches for our unique needs.  I think this was a creative and good way for us to go given our talents, but I think it increased stress and was possibly interpreted as weakness on a team already feeling time pressure.

So, assuming that was a factor, and since I honestly did not know how other game companies work, I set out on a quest to tour the industry and learn as much as I could about how companies other than Blizzard operate.  I was interested in everything including technology, development processes, team composition, project planning, and business relationships.

I want to stop here and thank everyone who helped me in this quest.  Lots of companies opened their doors and under NDA showed me everything that I wanted to learn about.  Blizzard management too, went way above and beyond the call of duty and introduced me to people who could help me learn about the industry.  I learned that there are a ton of great companies out there, and lots of good ways to approach things.  Thank you all! <3 :)

Armed with a good perspective on the industry and how games are developed, I looked back over how we set up our project and came to the conclusion that it was entirely reasonable, from a tech perspective, and felt comforted.

With that awesome tour completed, I turned my attention back to my future.  My options were to stay on the team as an engineer, transition to another team at Blizzard, leave and start my own venture, or join another company in the industry.

I realized I didn't really want to stay on my team, because even though I love the team and I still think it's an awesome project, I didn't feel like I got any support in that role from management, and I never was told why I was asked to step down.  I don't feel like it was personal, that the management really was trying to do the right thing for the team, but I still didn't want to stay in that environment.

I thought a lot about joining another team at Blizzard, or joining another company, but I realized that after launching Wrath of the Lich King, booting engineering on a new team, and shipping new Battle.net on StarCraft II, all in less than two years, I was starting to feel burned out.  I also looked at myself and realized that sometime in the last ten years I had become a family man, and what I wanted to do more than anything else in the world was spend time with my family.

I took a deep breath and relaxed, feeling my shoulders unclench and my face break out in a smile, and knew I had made the right decision.

Friday, March 11, 2011

Life and Love

Every once in a while you see something that takes you completely out of your day to day routine and reminds you that this world is a wide and wonderful place.

Spider Robinson is one of my all time favorite authors, and he has been entertaining me and teaching me about love and laughter most of my life.  I finished the Callahan series (again) tonight, and was touched by the plight of Doc Webster, who passed on with a brain tumor in the final story.  I finally noticed in the back of the book contact information for the American Brain Tumor Association:
http://www.abta.org/

I got on the 'Net and found his website and found that his wife had passed on, in peace, almost a year ago and was able to piece together a little of what his world has been like since then.  He is a brave man with a wonderful family. I'm lucky that I haven't had to deal with the death of someone close to me yet, but this world is richly textured, and people deal with pain and loss and anger and joy and triumph every single day around the world.


If you haven't seen his work, you can check it out in traditional and audio form here:
http://www.spiderrobinson.com/works.html

To all of you who are dealing with and have dealt with loss, I wish you the best, and while I know nothing can ever replace those you've loved, there are still more out there who have loved you, love you now, and will bring you joy in the future.

*HUG*
--Sam

SDL Job Opportunity!

Software Engineer - Focus: SDL


We're looking for a talented developer who would be interested in developing and maintaining SDL. 

Skills:
  • Passionate about helping people make games
  • Able and motivated to learn quickly
  • Organized
  • Good at communicating, both with developers and with customers
  • Comfortable with game development concepts
  • Comfortable with software design and implementation concepts
  • Comfortable using and developing for multiple platforms
  • Fluent in C, with a familiarity with some other languages
We're bringing the next generation of the widely acclaimed Simple DirectMedia Layer to game developers everywhere, and we need talented and motivated engineers to hone the library to a fine polish, improving stability, performance, and usability. The position is initially for contracting work, with the possibility of moving to a full time position. 

Interested candidates should send a resume and cover letter to jobs@galaxygameworks.com

Monday, March 7, 2011

GDC 2011

GDC was really great this year.  It was interesting watching the interplay between different companies and people, and the ebb and flow throughout the show.  I got some great feedback on the business plan, got to pal around the show with an old friend of mine from high school, and learned a lot about presentation.  (note to self: Comic Sans is a terrible font for professional presentation) :)

Aside from the great contacts and fun meeting people, the highlights of the show for me were the exciting things happening on the Indie scene.  Unity had a great booth overflowing with people the whole time, GameSpy announced their Indie technology program, and it seems like every major technology developer has free or extremely inexpensive licensing for independent developers.

Of course each year I really enjoy the Independent Games Festival finalists.  The booth was packed the whole show, so I didn't get to try everything, but there were a few that really stood out in my mind:

Solace - http://solacegame.com
Solace is a blend between top down arcade shooter action and the creative experience of emotion and sound.  I've never seen anything quite like it before, it's definitely worth checking out.

Helsing's Fire - http://www.ratloop.com/?games/helsings_fire
Helsing's Fire has a unique art style and interesting gameplay.  I haven't played all the way through it, but it uses the tried and true method of introducing new elements as the game progresses, so the gameplay is constantly evolving.

Oh, before I forget... I met the developers of Angry Birds!  Wooo! :)

I have lots of followup e-mails to send, so I'm heading out, but until next time... Cheers! :)

Friday, February 25, 2011

Business Phone and FAX

For business purposes I need a contact phone and FAX number, but I don't want to have the cost and equipment requirements of a separate phone line.  Given that I'm creating a virtual office, I figured there must be inexpensive and flexible ways of setting up a business phone system.

Google to the rescue, again!

Actually there are lots and lots of options available with different pricing schemes and features, but given that I'm using Google for business e-mail and document sharing, and Google Voice is free, it's a natural fit:
http://www.google.com/voice

It's a little awkward to call from - it requires you to enter the number you want to call and which phone you want to call from and then it calls both and connects the two, but it's freakin' awesome as an incoming voice message system.  You can route your virtual number to any phone you want, and if it goes to voice-mail, Google will take a message, transcribe it to text, and send the message to you via SMS and e-mail.

So, now that voice is taken care of, I need a solution for FAX. Again, there are lots of options available, but given that I plan to use e-mail for most outbound communication and FAX only for receiving signed license documents, OneSuite turns out to be a good option:
http://www.onesuite.com/

You have to create an account and "charge" it with $10, but once you do that, you can activate a FAX number for unlimited incoming transmissions for $1/month.  If you want outgoing FAX capability, or want the incoming FAX messages to go to multiple e-mail addresses, you can upgrade to $2.95/month + 2.5c/page for outgoing transmissions.

Business phone and FAX solution implemented.  Total cost?  $1/month.  Pure win?  Priceless.

Problem Solving in PowerPC Assembly

When you're working with other people's code, you don't always have the source, and sometimes this means you have to dive into the assembly code to figure out what's going on.

If you're lucky, there will be a small function where there are well defined inputs and outputs and you can see what's going on...

In this case someone reported a bug where if they created two different streaming textures, the program would crash deep inside glTexSubImage2D() in a routine called gleCopy().  They helpfully sent a small test program, and sure enough, it crashed on my iMac.

So, not having any leads, I start stepping through the assembly code:

...
0x0424a3fc <gleCopy+88>:        mtctr   r4
0x0424a400 <gleCopy+92>:        rlwinm  r0,r9,2,0,29
0x0424a404 <gleCopy+96>:        addi    r9,r9,1
0x0424a408 <gleCopy+100>:       lwzx    r2,r11,r0
0x0424a40c <gleCopy+104>:       stwx    r2,r3,r0
0x0424a410 <gleCopy+108>:       bdnz+   0x424a400 <gleCopy+92>
...
0x0424a464 <gleCopy+192>:       add     r11,r11,r7
0x0424a46c <gleCopy+200>:       add     r3,r3,r8
... 

This is a tight copy loop, where the loop count is loaded from register r4, and the data is copied by offset from pointer r11 and stored at that same offset in poiner r3. At the end of the loop, r11 is incremented by r7 and r3 is incremented by r8.

In C this might look like:
while (rows_to_copy) {
    for (i = 0; i < count; ++i) {
        dst[i] = src[i];
    }
    src += src_pitch;
    dst += dst_pitch;
}

When I printed out the registers, I noticed an interesting thing. The source and destination pointers started out the same, but the source and destination pitches were completely different!

To understand why the source and destination pointers were the same, I looked at the code that creates streaming textures and saw I'm using an Apple extension to have OpenGL use application memory instead of internally allocated memory.  Since I use that same pointer when updating the streaming textures, it makes sense that if the system thought copying needed to be done, it would copy from the pointer I passed in, to the pointer I told it to use for data storage.

But why would it think it needed to do copying?  I looked on the original web page describing how to optimize Mac OS X texture upload and noticed that it had a note saying that only textures with a width of a multiple of 32 bytes would bypass the copying step.  I figured that it shouldn't crash if they didn't have an aligned width, but what the heck.  I resized the textures and as expected the program still crashed.

So what would cause the pitches to be different?  Well, in a normal texture upload, the pitch is controlled by the  GL_UNPACK_ROW_LENGTH attribute.  In a flash, I realized that's probably what the extension uses to determine the original pitch of the texture.  Sure enough, I was missing a call to set that attribute when creating the texture. Looking more closely at the values in assembly, the pitch that it was using for the destination was indeed the pitch value that was set for the first texture upload, and of course if pitch values don't match in a pixel copy operation, you have to copy them row by row, just like the assembly code above was doing.

Adding a call to set GL_UNPACK_ROW_LENGTH in texture creation fixed the problems!

So, even though the bug was in my code, and a pretty obvious one in retrospect, it was really helpful to be able to look at the assembly and understand WHY my code was wrong.

Cheers!