Saturday, November 6, 2010

IGDA Leadership Forum: Tools Round Table

I hosted the Tools Round Table at the IGDA Leadership Forum this year. The group focused primarily on project management and communication. Attendees were producers, tech leads, a software consultant, an agile coach, a Hansoft employee, two localization professionals, and students.

Below I've included my notes from the discussions. Contents are purely in order that they were mentioned.

But before the notes, some quick thoughts on the conference. It was pretty small just a hundred or two people. I missed a lot of people who cut out half way through the second day (I showed up only for the end). There was a dinner with John Romaro interviewing Will Wright, with a goal of capturing designer's thoughts for posterity (romeroarchives). This is a great idea, though the level of detail covered in the interview only scratched the surface. It was interesting, but was primarily just getting the rough timeline of Wright's early career.

On with the Tools Round table notes:

Project Management
  • iteamwork
    • online - project management - slightly dated feel - free
  • jira with greenhopper front end
    • good for short term sprint plans, limiting for long term projects
    • some web-app style hiccups
  • (in follow up for long term:)
    • MS project
    • pen-paper
    • spreadsheets
      • hard for a wider team to use, OK for the single producer working with it
  • pivotal tracker
    • good for scrum
    • nice 'index card' like view
    • not a database
  • devtrack
    • often pushed by publishers
    • database backend
    • not great out of box, lots of work needed to setup for a team's process 
  • base camp
    • good for small teams
    • day to day level workers annoyed at it, though higher levels liked it
    • didn't scale up as well
  • scrum works
    • smaller teams, medium teams, good for burndown charts
    • free and paid versions
  • smart q
  • 5 pm web
Transitioning between long term planning and fine grained issue tracking remains the largest problem.

Communication
  • yammer
    • like an internal twitter
    • threaded views
    • third party tools good
  • google wave
    • threading issues
    • recommended using RSS updates of a wave to track it
  • google docs
  • gotomeeting
    • great screen sharing, not so great web cam
  • mikogo
    • similar to gotomeeting - free
  • webex
    • too heavyweight
  • skype
    • great webcam sharing, so-so screen sharing
  • meetingplace
  • active desktop
    • HTML on desktop with team specific information, e.g. bug counts
  • design docs placed in source control shadowed to a web server for ease of access
  • wiki

Monday, October 18, 2010

LootGrab: HTML5 Game from Triangle Game Jam 2010


Spoilers in the Video! Consider Playing LootGrab first. (As of Sept 2010, Chrome was definitely the best option since Firefox and IE struggled, you can give your smart phone a try too).

2010 Triangle Game Jam game: LootGrab Video on youtube, or LootGrab Video on vimeo.

This year brought changes from the Game Jams of past:
First, I moved from the Research Triangle and now work at Google, and Adrienne came too (we've worked together on 5 of the game jam projects now). So, we got some fresh blood at Google to join us and ran a game jam in parallel with the 2010 Triangle Game Jam.

Second, instead of using C# we used HTML5 this year:

Third, you can Play LootGrab with a click of a button - ridiculously easy compared to all previous Jams where I didn't even bother giving you the gazillion prerequisites required.

Theme and Game Ideas
The theme this year was, "Placing Blocks". Here is my game concept, which didn't make the cut::


(someone pointed out it would be great from the side too, with ballistic arcs.)

We voted up ideas, and Adrienne's one out: LootGrab is about placing down blocks in a dungeon to influence the hero, instead of controlling the hero directly. The greedy guy runs for the closest loot, food, or exit ... without care for monsters or traps.

We figured we'd need a map editor, the runtime, and perhaps a level sharing system online via AppEngine. I was particularly attached to an idea of allowing user contributed game object definitions. Allow a user to upload an image and a snippit of javascript that defines it's behavior. How cool would a mod-able game jam game be? :) That was stretching a bit far though.

HTML5

HTML5 is a grab bag of new functionality in browsers. Some of it is pretty cool (peer to peer networking, local storage, video and audio tags). We focused on two simple components, canvas 2d to draw and audio for sound effects.

In my day job I'm working to accelerate canvas with GPUs, as are others at Microsoft, Mozilla, and Apple. It's fairly fast even in software, and LootGrab runs fine without GPU acceleration. In fact, it runs on phones pretty well, such as my Nexus One Android phone. That's pretty cool, all we did to support mobile was to make sure we handled low frame rates without changing gameplay. To do that we used fixed time step gameplay logic (tick based), and just run as many ticks as needed to cover the amount of time elapsed.

Our use of canvas is basically clearing it, drawing a pile of sprites (via sub-rectangles of larger images), and also a line to show where the player is moving. Actually, we have a few layers of canvas stacked on top of each other. Theoretically we could have saved performance by not redrawing non animating tiles - just compositing them underneath.

Adrienne took on audio for sound effects, and did run into a bit of trouble. The sound effects were very short, and had to be padded out to longer audio lengths to trigger properly. Also, multiple instances needed to be created in case the sound was played more than once.

Javascript

Several of us hadn't done anything substantial in Javascript before. Certainly not an object oriented game entity system that can factory from user created levels. Some complicated flurry of activity by Glen, Ian, Nat, and Gregg made that happen. The result could be cleaner, but worked well. We have JSON data blobs, e.g. for the tile definitions.

Things I loved:
Need to add extra data to your level components of game object definitons? Perhaps only to particular items? No problem! Just start typing. At runtime it is trivial to just check if the data is there and use it if so.

Writing some code and wish you could hang more data off an object? Just set that value! Check to see if it's === "undefined" later and you can pick up  your special data easily. Object definitions don't have to worry about implementation details of other systems, and those other systems don't need extra book keeping kept in parallel. e.g.:

  try {
    ctx.drawImage(this.img, ...);
  } catch(e) {
    if(this.error_printed === undefined) {
      tdl.log("problem with image " + this.entDefID);
      this.error_printed = true;
  };


Development tools: Logging. Resource load timeline. Immediate mode editor: Hit a breakpoint, and just execute some code at the Javascript console.

Fast iteration time, though C# was great for that too.

Instant continuous "build"! Glen installed an Auto Reload Chrome extension and put the game up on a projector. Check in some code and see the game running it in 20 seconds. ;) Helps to have a game that can play its self.

Libraires such as TDL, and JQuery: some helper code for Javascript. It's not so important what you use, but you definitely want to not worry about the minutia.

Not so great?
I didn't use an IDE that had code analysis, and that's a very convenient feature of MSVC. Though, Ian had good things to say about WebStorm.

Also "classes" in javascript are syntactically very sad, and inheritance to my novice eyes looks messy. And variable "scoping" is dicey.

Debugging is functional and GUI, which is better than what most programmers use around my on linux. But it falls short of a modern debugger such as MSVC with C++ or C#.

Also, deciphering a web page via HTML, script, HTML embedded in script, CSS files, and dynamic changes to styles? ... yikes.

Things for Next Time


Would be nice to have some basics already written:
- Factory that will created entities from JSON data packs
- Cleaner audio solution
- Sprite system for canvas

Smaller teams. We had six on this project, and that's a bit much for a game jam game. Several were first time jammers, and several Javascript newbies, so it did really help to share know-how. But we wasted a lot of time getting started, coming to consensus on implementation choices, and stepping on each other's code.

The End

And now I leave you with some screen shots:


And a thanks to whoever oryx is, who created the sprites we used:

Monday, October 4, 2010

Scriptcode: misc batch files and visual studio macros

Here are the random macros I use in Visual Studio and windows batch files. Nothing monumental, but I find them useful often enough.
  • scheib.vb
    • The general purpose Visual Studio macros I use, particularly useful to me are:
  • addpath.bat
    • Eases adding more directories to your path environment variable.
  • cmd_here.bat
    • Right click any directory or file in windows explorer or a file save/open dialog and get a command prompt at that location.
  • copy-certain-files.pl
    • Assists automation to copy certain files from one directory to another, e.g. just the .html files but not the images.
  • remove_empty_directories.bat
    • Cleans up a directory tree to not have empty directories.
The following are useful to have when writing a batch file:
  • isadirectory.bat
  • isafile.bat
  • isemptydirectory.bat
Files can be downloaded here:
http://gist.github.com/582050 - visual studio macros
http://gist.github.com/582036 - batch files





Wednesday, September 15, 2010

Leadership by Influence


Leadership is an interesting skill; here are a few thoughts I've had recently at Google.

Skills are honed by practice, but leadership is a daunting skill to try before you have your confidence. Some skills you build up little by little, and often you can learn about them before you try them. But leading is one of those skills that you need to learn by doing and then thinking. It can be intimidating to try, like public speaking. But that's the pattern to follow: try leading a little bit at a time, and growing.

Finding opportunities to improve leadership is also different than many skills. Learning how to program? Start writing some code. Learning how to lead? You need some people to (possibly) follow, and an appropriate time and place. That's a good segue into some of my experiences.

At Emergent I spent the last few years as a software architect. My role was varied, but essentially was influencing the direction of our product and business. I did that by understanding technical issues, building compelling explanations, and influencing the decisions of others. Those others ranged from software engineers on our product, managers and executives, and external game teams considering tech. The key point is that I had no authority or decision power myself, even over our own engineers.

My situation was different than some of my peers. A few of us rose into senior positions at the same time. Some of my friends ended up as technical leads over groups of engineers. While they didn't have "personnel management" responsibilities, they did have direct technical management. Teams collaborated on the work that they did, but generally speaking these technical leads defined tasks onto their team members. If they needed to they could specifically direct a given engineer. I contrasted this against my role, with no reports and only the ability to influence engineers.

Gathering information from groups was novel as well. The technical leads' smaller groups met regularly and shared information. Spanning the engineering department I couldn't gather information directly from all engineers. I relied on meeting notes, speaking with team leads, and most importantly individuals coming to me for relevant topics. Some engineers did this voluntarily , "Vince, I've got an idea to bounce off you." Other's work I wouldn't have heard about unless I stopped by and asked them about it.

Moving back in time, I recall developing a game during my undergraduate degree. We had some initial meetings with dozens of interested students. A smaller group moved forward to create a game. But, being entirely volunteer work there was no certainty that anything would get done. In the end, only a couple of us made much progress, and we were left with many good intentions of others, but no work done.

And that brings me back to Google, where the internal engineering structure is decidedly bottom up. Engineers self organize, recognize issues, and address them. Leadership at Google is more similar to my experience as a software architect at Emergent than the tech leads there. Engineers aren't assigned tasks, they generate them or adopt them. The top down influence comes in two parts: influential direction, and team allocations. The technical influence is something anyone at Google can, and is expected, to do. And that's what motivated me to write out these thoughts.

This is also my first time contributing to open source projects. And I can see they follow similar patterns. There is decentralized control, and often no specific hierarchy of technical authority. Rather, the community relies on those individuals who've proven the kind of influential leadership I've described here.

So, what's your takeaway, dear reader? How about a few answers to questions I asked myself in the past:

How does one gather more influence?
By recognizing when something needs doing, making compelling explanations for why and how, and showing others how it can be done by doing it. By doing so you build respect as someone who will make things better and solve problems.

How do you get an opportunity to try leading?
Everything you do is an opportunity, and you have to grow by taking small steps. It is rare that you'll be given the responsibility without first having demonstrated that you can lead. Don't wait for someone to decide that you can try leading. Just offer your contributions and thoughts, lead by doing, and be sensitive to what the group needs.

And, a final thought. At Emergent, we frequently used the phrase, "Managing engineers is like herding cats." The statement has a changed meaning for me now. If you manage engineers by herding them, you'll be as frustrated as if you were herding cats. But, all the cats will run to tasty food. Perhaps that's why Google invests so much in it's cafes ;)

Tuesday, August 3, 2010

QR Code hacks: modifying and altering for artistic fun

QR Codes are a quick way to get information with a camera. (Think modern evolution of a UPC Bar Code). Smart phones will scan them for you to quickly get information into your phone, such as a URL to browse, a business card, etc.

I was inspired by the BBC QR Code that intentionally distorts the image to insert the letters "BBC" in the middle. QR Codes have redundant information to offer error correction, and I am amused at the different ways you can abuse this.

First, this is what a QR Code for "http://beautifulpixels.blogspot.com/" looks like unmodified:
"Pure" QR Code:
Now, the experiments:

Simple pixelated distortion in the center (similar to BBC code):
Any image could have just been overlaid, just like plopping a sticker in the middle, but doing it in the pixel grid feels nice.

The idea I like most is using a collage of images that form the QR Code. Where the collage gets the pattern right, there's no need for error correction. But there's slack for the collage to be off a bit. It's very tedious to do, so I only have this partial version, but I'm certain with patience a fully collaged version could be made:

Collage:
The collage might be automated too. Do an image search and then paste in images "fit" to the QR Code target.

There are several ways to play with color, as the scanners will just care about the luminance.

Pixel grid colorization:

Gradient:

High resolution image colorization:

There are several ways to play with the QR Code as conceptually just "dots".

Dots:

Dots merging:

Dots as images:

And on we go, a few more ideas: 
Rounded corners:

Perspective:
I wasn't able to change the perspective to something as extreme as I thought, this was about as far as I could get it.

I also didn't have the patience to create several "natural media" QR Codes. But I thought sand art, pebbles, leaves, etc, done with real world materials would be great. Here's a synthetic Go board (the gaps maintain a valid game state, ;):

Go Board:

And I should show failures too. I had high hopes for a pen sketch, but it doesn't scan. :( I'm convinced it could work, though I think a more even contrast would need to be used.

Ink Sketch:

Except for the last, all of these scanned correctly for me using the ZXing Barcode Scanner 3.3 on my Android phone. Collage clip art included elements from flicker users greekadman, bombardier. 

[Edit:] A Link from the comments that shows a good 'natural media' example:

Monday, June 14, 2010

Games for Infants

Games for infants. A noble cause. But they're tricky customers. And in the end, so easy to please.

Once upon a time I thought, "I shall make a game for infants, it shall be easy and quick." So, I thought to myself, what do infants like to do? Whap their grasping tentacles at things. Yes, such as keyboards. And they like it when things do things, but they're not very sophisticated.. so simple reactions should be just fine.

So, I sat down and made a simple program to change the color on the screen when keys were pressed.

Fail.

First, infants seem to like all buttons, especially the windows key, Alt key, etc. All sorts of ways to make an application loose focus. Second, they like to mash buttons. To grind them down. As if pinning the machine and asserting, "I AM YOUR MASTER!"

So, let's see.. easy things first. Holding buttons down can change the color of the screen too. How about a key press causes a flash in green that fades away quickly, and the intensity of blue ramps up the longer you hold keys. Ok, working well, let's try it out. Ah, it works, but again, infant seems rather determined to exit the app, launch new applications, all sorts of not intended things.

Most of a Saturday later, I've learned about windows hooks. How thoughtful of Microsoft to give me a way to catch and handle the key presses before Windows interprets them. I'd like to do this from C# and XNA, so that was a bit of searching and tinkering, but Bnoerj.Winshoked seems to work. Yeah, that works fairly well, gimme your kid again, lemme try.

Fail.

Yup, infants are dutiful testers, seems to reliably mess things up. How much time do I really want to spend on this? Let's try searching the Internet again... nope, nothing really good out there. Hmm, except...

Ah-HA!

Windows log-in screen should do nicely. If anything in windows can stand up to button mashing it'll be the log-in screen. Whap keys, see dots show up, hear beeping noises as the length limit is hit, that should entertain the kiddo. Give that a shot.

Blue screen.

Really? Had to have been a fluke. Try again. See, it works, happy kid. Blue screen.

Hmm.

Well, I've learned something. Why build a game when an infant can be entertained with just the log-in screen. And, how disconcerting is it that sustained mashing of keyboard keys can cause a blue screen?

Sunday, May 23, 2010

HTML Canvas Lines Toy



Karl Hillesland and I toyed around with the Canvas HTML/Javascript API this weekend. We remade an old program I noodled around with in highschool. The heart of it is just drawing lines between curves made with trig functions (the "offset" constants are continuously changing every frame via their own sin waves):

 var x1 = Math.sin(2*Math.PI*(t+offsetInner1)*periods1x+offsetOuter1);
 var y1 = Math.cos(2*Math.PI*(t+offsetInner2)*periods1y+offsetOuter2);
 var x2 = Math.sin(2*Math.PI*(t+offsetInner3)*periods2x+offsetOuter3);
 var y2 = Math.cos(2*Math.PI*(t+offsetInner4)*periods2y+offsetOuter4);
 // line from (x1,y1) to (x2,y2)
If you're using a browser that supports Canvas, you'll see it above. Internet Explorer doesn't support it as I'm writing this - so use Chrome or Firefox or ... wait for Microsoft to catch up.

It's not exactly "done", but who knows if we'll clean it up. ;) If you'd like to experiment with it, here's a version with debug mode sliders you can drag around:

lines-07.html

  • Changing the periods (last 4 options) results in very different effects.
  • Use Chrome for slider input support - sliders are nice. Firefox just displays input boxes ;(.
  • Resize your browser's width for the desired aspect ratio -- that page auto-letterboxes.
For sad people with no capable browser, here's a still image: