Categories
Uncategorized

Counting Down to Seven: XNA Game Studio 4.0!!!!

Welcome to another installment of Counting Down to Seven, a series of articles about mobile app development that I’m writing as we count down the days to MIX10, when we reveal more about the up-and-coming Windows Phone 7 Series.

Xbox 360 Achievement: "Achievement Unlocked: New Version of XNA!"

"Counting Down to Seven" badge

The Game Developers Conference is a good time to make game development announcements, and that we did: version 4.0 of XNA Game Studio, Microsoft’s framework and toolset for easier game development. Here’s what it means in a nutshell:

  • No matter whether you develop with managed or unmanaged code, it’s what you’ll use for game development on Windows Phone 7.
  • You’ll create better mobile games faster, thanks to a powerful and comprehensive set of tools.
  • Xbox LIVE comes to mobile, meaning that you can take advantage of the Xbox’s popular gaming social network.
  • For those of you already building games with XNA, you’ve got a brand new platform, and it’s one that you take everywhere you go.

Games pages on Windows Phone 7

You’re going to see all sorts of details about XNA Game Studio 4.0 over the next couple of weeks, and here are some of the best places to get them…

Follow the “Seven Samurai”

By “Seven Samurai”, I’m referring to the Windows Phone 7 Series development team:

Check Out These Sites

This article also appears in Canadian Developer Connection.

Categories
Uncategorized

Hello, Kodu!

kodu game lab

Last week, I presented Kodu (pronounced “Code-ooh”) to a group of teachers and high school students at Corpus Christi Catholic Secondary School. Kodu is a system created by Microsoft Research for programming videogames without using a traditional programming language; instead, you use a combination of menus and visual programming. It was designed to be a gentle introduction to programming that would appeal to children, but many adults – myself included – have ended up getting drawn into it, spending hours constructing and tweaking game worlds.

Kodu was built using XNA, Microsoft’s framework, toolset and runtime environment for building games for Windows, Xbox 360 and Zune. It was released for the Xbox 360 last summer as an Xbox Indie Game; you can download it for 400 Xbox points — about 5 bucks – or you can try the free trial version (it’s time-limited, but full-featured). If you don’t have an Xbox 360, you can download the Windows version of Kodu for free.

Kodu’s a little tricky to describe – it’s one of those things that’s much easier to show rather than tell. Here are a couple of videos that should give you a bit of Kodu’s flavour. First, here’s IGN’s look at Kodu:

Here’s XNA Roundup’s review of Kodu:

Kodu was designed to be programmed with the Xbox 360 gamepad, which you can use if you’re programming it on the Xbox 360 or a computer (if you’re using a computer, you’ll need either a wired Xbox gamepad plugged into one of its USB ports or a USB adapter for your wireless Xbox gamepad). If you’re using Kodu on a computer, you have the additional option of using the keyboard and mouse.

This is the first of a series of articles on Kodu programming that will appear here from time to time. If you’ve got kids (or know some) who are curious about programming, or if you’re looking to try a completely different kind of programming, get Kodu on your Xbox or PC and give it a try!

In this first installment, I’ll show you how you can build a simple little program that lets you drive an avatar around a small world. In later installments, I’ll show you more game-like elements and the “code” for a game of mine called “Stupid Sparkling Vampire Game”.

Touring Teran00bia

In addition to a programming “language”, Kodu provides you with tools for editing the worlds in which your games take place. I often start with a simple, no-fuss world that I created called “Teran00bia”. It’s a small, flat square world suitable for experimentation. If you have the Windows version of Kodu, you can download Teran00bia here. I can also share the Xbox 360 version, but you have to “friend” me on Xbox Live first – my gamertag is “Accordion Guy”.

Teran00bia is a blank slate, a world with nothing in it. Here’s what it looks like when you load it:

kodu 00

In this exercise, we want to stick a single character – Kodu – into the world and allow the player to drive him around using the controller’s left stick.

To start programming, get into Edit Mode. Press the “Back” button on the gamepad to switch to Edit Mode. Your screen should now look like this:

01 world view

In Edit Mode, the left thumbstick moves your “cursor” (the purple “donut”) around the world, while the right thumbstick changes your camera angle. You use the left bumper (that’s the button just above the left trigger) to zoom out and the right bumper (the button above the right trigger) to zoom in. The screenshot below shows a zoomed-in view of Teran00bia:

02 closer up

The floating icons near the bottom of the screen make up Kodu’s menu. You use the left and right triggers to scroll through the menu and the A button to select a menu item.

Select the Object Tool from the menu. It’s the second menu item from the left, and its icon is Kodu, who looks sort of like a blue fish with an antenna. When you select the tool, the Kodu menu disappears and you’re now using the object tool, as shown below:

03 about to add

The Object Tool lets you add items to the world or edit any existing ones. There aren’t any items in the world at the moment, so let’s add one. Use the left thumbstick to move the cursor to the spot where you want to place an object, then press the A button. The following menu will appear:

04 add menu

This menu lists the items available to you. Starting at the top and going clockwise, the items in the menu are:

  • Kodu (the game system’s mascot, who can be used as either a player character or a non-player character)
  • Apple (useful as a health power-up, but nothing stops you from making them poisonous or explosive)
  • Bots 1 (a set of characters that can be used either as player characters or non-player characters)
  • Bots 2 (more characters that can be used either as players characters or non-player characters)
  • Objects (things that characters in the game can interact with, such as rocks, coins, castles and factories)
  • Tree (another object that characters in the game can interact with – I have no idea why trees weren’t part of the set of Objects)
  • Path (lets you draw paths which Kodu and the other bots can follow)

Use the left thumbstick to select Kodu from the menu, then press the A button to confirm the selection. A Kodu will appear:

05 kodu added

You can move Kodu around by pressing the A button to select him, using the left thumbstick to pick a new location and then pressing the A button to drop him there.

What we want to do is program Kodu to move in response to the left thumbstick, as is the convention for most Xbox 360 games. While Kodu is selected, press the Y button. The screen should look like this:

06 programming

Every programmable object in the Kodu game system has a set of behaviours, each one having two parts:

  • When, which describes the event that the object will respond to
  • Do, which describes what the object will do in response to the event

The behaviours are numbered starting at 1 and are listed in order of descending priority – that is, behaviour 1 has first priority, followed by behaviour 2, then behaviour 3, and so on.

Your programming “cursor” is the pencil. Move the pencil over the “+” in the “When” part of behaviour 1 and press the A button. You’ll see a menu pop up:

07 when menu

This menu lists the events to which Kodu can react. For now, we’re concerned with making him respond to the left thumbstick, which is part of the gamepad. Select “Gamepad” from the menu with the left thumbstick, then press the A button to confirm the selection. The menu will vanish and you’ll see that a “Gamepad” tile has been added to the “When” part of behaviour 1:

08 gamepad added

We need to specify which gamepad control Kodu should respond to. Make sure the pencil is over the “+” of the “When” part of behaviour 1, then press the A button. A menu containing various controls on the gamepad will appear:

09 gamepad menu

Use the left thumbstick to select “L stick”, then press the A button. The menu will disappear and you’ll see that the “When” part of behaviour 1 has two tiles: “Gamepad” and “L Stick”:

10 ks added

We’ve just described an event that Kodu should respond to. Now it’s time to describe the response. Move the pencil over the “+” of the “Do” part of behaviour 1 and press the A button. A new menu will appear:

11 move selected

This menu lists responses to events. In this case, we want Kodu to move where the player tells him to move, which is specified by the left thumbstick. Select “Move” from the menu with the left thumbstick, then press A to confirm the selection. The menu will vanish, and you’ll see that a “Move” tile has been added to the “Do” part of behaviour 1:

12 move added

We’ve now completely defined a single behaviour for Kodu: “When the player moves the left thumbstick, move in that direction”. It’s time to take our (admittedly simple) game for a spin.

Press the Back button to stop programming Kodu. You’ll now be in the Object Tool. Press the Back button again to return to Edit Mode, where Kodu’s main programming menu will become available. Use the left trigger to select Play Mode and press A to confirm the selection.

13 play selected

The program will start with the intro screen. Press A to dismiss the intro screen.

14 opening screen

You’ll now be in the game world. Use the left thumbstick to move Kodu around:

15 gameplay

Kodu moves, but he’s not so fast. Let’s look at a way to speed him up a little. Press the Back button to exit the program and return to Edit Mode. Use the triggers to select the Object Tool from the menu, then press the A button to confirm the selection.

16 stopped

Move the cursor under Kodu so that he’s selected:

17 kodu selected

Press the Y button to program Kodu. You’ll be return to his set of behaviours:

18 current program

Move the pencil over the “+” of the “Do” part of behaviour 1, the press the A button. A menu will appear:

19 quickly selected

The menu will contain modifiers for the “Move” response. Select “Quickly” from the menu using the left thumbstick, then press the A button. The menu will disappear and you’ll see a “Quickly” tile has been added to the “Do” part of behaviour 1:

20 1 quickly

To make Kodu move even faster, you can add another “Quickly”:

21 quickly selected 2

…in fact, you can add up to three “Quickly” tiles to push Kodu to his maximum speed:

23 3 quicklies

Play Around

I could cover more Kodu features, but you should use it the way it was meant to be used – experiment! Try adding other objects to the world and adding behaviours to them. Take a look at the  programming behind the worlds that were provided with the Kodu game system (be sure to check out “Left 4 Kodu Classic”, a cute Kodu version of the zombie thriller game Left 4 Dead).

Links

This article also appears in Canadian Developer Connection.

Categories
Uncategorized

The Truth About Pac-Man

pac-man

[Found via Certified Bullshit Technician.]

This article also appears in The Adventures of Accordion Guy in the 21st Century.

Categories
Uncategorized

Mario Learns an Important Lesson

mario_learns_an_important_lesson

Categories
Uncategorized

One Possible Upside to the Disney-Marvel Team-Up

"Kingdom Hearts" featuring Marvel characters

Anthony Suarez suggested a possible upside to Disney’s purchase of Marvel: there’s potential for a really interesting sequel to the game Kingdom Hearts.

Categories
Uncategorized

Mental Models, Mantras and My Mission

Mental Models and Bill Buxton’s “Draw a Computer” Exercise

Bill Buxton

In the mid 1990s, well before he was Microsoft’s user interface guru, Bill Buxton often asked people to carry out a simple little exercise: draw a picture of a computer. Most, if not all, of the people he asked would draw something that fit the common mental model of the desktop computer of the era: cathode ray tube-type monitor, keyboard, mouse and that box housing the motherboard and drives that many people mistakenly refer to as “the CPU”.

If Buxton were to ask the question today, the drawings of computers might look like these:

Four computers from the 2000s - a laptop, a couple of all-in-one-desktops and a desktop with a "box" -- all with flat screens

If he asked the question in the mid-to-late 1980s, the drawings might’ve looked like these:

80s-era computers: Apple ][, Commodore 64, TRS-80 and IBM PC

And had he asked the question in the mid-60s, the drawings might’ve looked like this:

The classic fake "home computer as envisioned by RAND" photo

Buxton likes to point out that the changes in computers from the 60s onwards are largely in the implementation technology, processing power and outward appearance. When most people draw computers, he said, they’re merely drawing their mental model, which is based on the outer packaging.

However, if you use the mental model of a technologist, computers have been essentially the same instruction/ALU/storage/input-output boxes whether they’ve occupied whole rooms or fit in your pocket. They’ve been pretty much the same at their core, in the same way that fancy tech and hybrid engine aside, there really isn’t too much that separates a present-day Toyota Prius from a Model T Ford.

If Bill Buxton could approach Microsoft Corporation as a person — and hey, that’s the way the law treats corporations, so why not? – and asked him/her to draw a computer, I suspect that s/he would draw something based on mental model of a souped-up circa 2000 computer: a desktop computer with a nice flatscreen monitor, running Windows XP and having a somewhat limited connection to the ‘net.

I think that this is a problem. I also think that the source of this problem is Microsoft’s success.

Microsoft’s Company Mantras

“A PC on every desk and in every home” was Microsoft’s longest-lived slogan and the company mantra for the first 24 years of existence. Like the best slogans, it succinctly summarized the company’s goal. The problem is that the goal has pretty much been reached. In most parts of the first world, a good chunk of the second world and even a sizeable fraction of the third world, you can easily find a desktop computer, and it’s quite likely that it’s running some sort of Microsoft software.

Since 1999, the company mantra – I really hesitate the use the phrase “vision statement” — has been a little more vague. The company’s been thrashing between them a little more frequently, as you can see in this list of mantras taken from chapter 1 of How We Test Software at Microsoft:

  • 1975 – 1999: “A PC on every desk and in every home.”
  • 1999 – 2002: “Empowering people through great software – any time, any place and on any device.”
  • 2002 – 2008: “To enable people and businesses throughout the world to realize their full potential.”
  • 2008 – present: “Create experiences that combine the magic of software with the power of internet services across the world of devices.”

The post-1999 mantra all seem a little limp in comparison to the original. Reading them, I cannot help but think of a quote attributed to web design guru Jeffrey Zeldman:

"…provide value added solutions" is not a mission. "Destroy All Monsters." That is a fucking mission statement.

Because the old mantra lasted for so long and the new mantras just don’t have the same straightforwardness and gravitas (How We test Sofware at Microsoft quotes Ballmer as saying that we may never again have a clear statement like the original to guide the company), the original remains quite firmly etched in the company culture and mindset.

I think it’s holding us back.

The Desktop as the Goose That Laid the Golden Egg

Altair 8800 computer on display at Microsoft's Building 92 gallery

The original mantra doesn’t just focus on the desktop, it actually mentions it by name. In 1975, when computers were room-filling behemoths that you could access either via batch or time-share, the concept of a desktop computer was downright radical. If you think the iPhone is impressive (and yes, it is), imagine how mind-blowing the Altair 8800, the first commercially-available desktop computer, must have been to a geek back in the Bad Old Days. It was the platform on which Microsoft’s first product – a little programming language called Altair BASIC – was launched, and it was BASIC that in turn launched the company.

In his book Outliers, Malcolm Gladwell talks about how the Altair 8800 was a golden opportunity for Bill Gates and his buddies at his fledgling company, then called “Micro-Soft”. Unlike a lot of other companies at the time, they took the desktop computer seriously. Even when IBM got into the desktop computer game in 1981, it was a product of their Entry-Level Systems division, a clear indication that they thought the PC was a machine you bought until you were ready to graduate to a real computer. I don’t think that this philosophy ended up serving them well.

An Applesoft BASIC cassette featuring a sticker that says "Copyright Microsoft, 1977"

Since the big boys were paying no mind to the desktop computer, upstarts like Microsoft had a big empty field in which to play, and they thrived. Crack open just about any late 70s/early 80s computer that had BASIC built in – even Apple machines — and you’ll see a row of ROM chips with a Microsoft copyright notice. It was Microsoft that swooped in with PC-DOS when a deal with Digital Research for a PC version of CP/M was slow in coming (and this is despite the fact that Gates recommended that IBM go to Digital for an OS). A lot of people’s experience with desktop computers (and Microsoft revenue) is defined by circa-1995 Microsoft thanks to Windows 95 and the results of Bill Gates’ memo titled The Internet Tidal Wave, both of whose influences are still felt to this day.

Once upon a time, it used to be unusual to walk into someone’s home or office and see a computer. These days, it’s unusual to walk into someone’s home or office and not see a computer, and Microsoft’s focus on the desktop had a lot to do with that.

The Desktop as Albatross

Albatross, shot with a sucker-dart arrow, falls on the head of a Disney-esque cartoon character

When electric motors first became available, engineers envisioned factories and eventually houses being equipped with a single electric motor. They imagined that the central motor would, through a series of gears and drive belts, be connected to whatever machines in the house or factory had to be driven by it. What happened in the end is that rather than relying on some central motor, electric motors “disappeared” into the devices that used them. Here’s an exercise to try: go and count the electric motors in your house or apartment right now. The number should be a couple dozen, and if you can’t find them, this article might help.

When big, room-filling computers first became available, engineers envisioned businesses being equipped with a single computer in a manner roughly analogous to the aforementioned big central motor. We know what happened in the end – while many businesses do make use of big datacenters, a lot of the computing power got spread out into desktop computers.

I have a theory that comes in two parts:

  1. Just as electrical motors disappeared into the devices that needed their work, and just as computing power got spread out from big mainframes into desktop machines, computing power is now both disappearing and spreading out into mobile devices and the web/cloud.
  2. Microsoft, with its desktop-centric approach, at least outwardly appears to be missing out on this migration of computing power.

Most of the company’s attention, at least to an outside observer, seems to be focused on Windows 7. Yes, chances are that with computer sales being what they are, Windows 7 will probably end up on more of laptops and netbooks than desktops, but I consider those devices to simply be the desktop computer in a more portable form. It worries me that there have been more concrete announcements about Windows 7 on netbooks than upcoming versions of Windows Mobile, despite the iPhone and BlackBerry-driven evidence that the real mobile action is in smartphones.

(Tomorrow, I’ll post an article in which I argue that netbooks are a dangerous red herring pulling away our attention from devices like smartphones.)

Microsoft ASP.NET

Even when the company reaches out beyond desktop development, there’s no escaping the desktop “gravity well”. Consider ASP.NET (that is, the “traditional” ASP.NET, not the recently-released ASP.NET MVC). To my mind, as well as the minds of a lot of other web developers, it’s a web framework that tries really hard to pretend that the web doesn’t exist. It makes use of a whole lot of tomfoolery like ViewState to create a veneer of desktop app-like statefulness over the inherently stateless nature of the web and a programming model that tries to mimic the way you’d write a desktop application. It’s almost as if it were designed with the mantra “the web is like the desktop, but lamer” instead of “the web is like the desktop, but everywhere”. Although the framework works just fine and there are a number of great sites and web apps built on it, I think a lot of developers sensed this design philosophy and went elsewhere for web development.

(An aside: My old boss at OpenCola in late 2001 told me that he’d been meeting with Microsoft people and suspected that Internet Explorer 6 would be the final version of their browser. The expectation that web pages and web applications would be replaced by Windows client applications pushed over the net, a prediction similar to one made by the Java folks a few years prior.)

Windows Mobile logo

The same situation exists with Windows Mobile’s current user interface, which is basically a subset of Windows’ standard UI controls for the desktop, scaled down to fit smaller screens, and with a stylus standing in for the mouse. It’s almost as if it were designed with the mantra “mobile computing is like desktop computing, but lamer” instead of “mobile computing is like a mobile phone plus PDA and an MP3 player, but cooler.” If the ASP.NET design mantra is a whisper, the Windows Mobile mantra is a scream.

I suspect that the reason the XBox 360 didn’t fall into a similar kind of trap — “set-top boxes are like desktop computers, but lamer and only for games” – is that the XBox team is situated off the Microsoft Campus and less susceptible to the desktop influence.

My Mission

Stick figure, chained to desk, breaking the chain

At my most recent one-on-one meeting with my manager John Oxley, we talked about a need for each member of our Evangelism team to define his or her area of focus. The Microsoft platform is a vast, nerdy expanse spanning the range from embedded computing all the way to Cray supercomputers; no single person can hope to cover it all.

He already had a good idea of what I wanted to focus on, and by now, I guess you do as well. I feel that just as computing expanded beyond the big computer rooms and onto our desktops, computing is expanding beyond our desktops into all sorts of different places:

  • Invisibly, into the web and cloud in the form of web applications and services
  • Visibly, into our pockets and living rooms, and embedded into all sorts of real-world things

While I believe that Windows 7 is a necessary part of the Microsoft platform, I’m not too worried about focusing on it – there are more than enough people at the company to promote and evangelize it. I want to focus on the platforms that I feel that Microsoft hasn’t given enough love and attention: the non-desktop platforms of the web, mobile and gaming, as well where they intersect.

It’s a big area to cover, but I think Microsoft needs to be active in this area if it wants to be true to its forward-looking roots. I even have a mantra for it: “To help web, mobile and game developers using Microsoft tools go from zero to awesome in 60 minutes.” I want to give developers both that rush when getting started with a new technology as well as the sustained passion to keep working with it, in the same way that Ruby on Rails and the iPhone got developers with an initial flash of excitement and turned it into long-term passion. It’s an ambitious, audacious mission, but no more so than the one coined by a bunch of scruffy nerds in New Mexico in the the 1970s: “A PC on every desk and in every home.”

Joey deVilla with cardboard cutouts of Microsoft's 1978 team

Categories
Uncategorized

Muscle March: Weirdest Videogame of 2009

I think we’ve got an early contender for the title of “Weirdest Videogame of 2009”: Muscle March for the Nintendo Wii. As if the game weren’t weird enough, the trailer below ramps up the weirdness by presenting it in that oh-so-Japanese style with epilepsy-inducing jump-cuts and a hyper-enthusiastic Japanese TV announcer:

[Found via Waxy.org.]