| Jack Palevich's profileGrammerJackBlog | Help |
|
10/14/2007 Moving to a new blogAs I mentioned before, I've left Microsoft and joined Google. While I hope to continue playing with games and game technologies, I probably won't be posting as much on Xbox topics. Because of my new job, I've decided to switch my main programming blog to http://grammerjack.blogspot.com/ . Nothing wrong with spaces.msn.com, I just thought it would be best if I learned how to use my new employer's blog software. 9/22/2007 Problems using a Mac Mini as a Media Center ExtenderI recently bought a Mac Mini to hook up to my HDTV, so that I could watch TV and videos that I recorded on my Media Center PC. I had been using an Xbox 360 to do this, but it died from the "Red Ring of Death", and while the 360 was being repaired I thought I would try the Mac Mini. On paper the Mac Mini seemed to be a good choice:
The AppleTV is specifically designed for the purpose of connecting a computer to the TV and playing back videos. Why didn't I choose it?
Connecting the Mac Mini to an HDTV:
Trying Ubuntu 7.10I need to use Linux for my new job, so I decided to try and install it on one of my home computers. I chose my Apple Macbook as my test platform, which was risky because Linux is much more mature on desktops than on laptops. Since I'm addicted to beta software, I tried the latest Ubuntu 7.10 Tribe 5, which is a beta version of the popular Ubuntu distribution. Some good impressions
In 12 to 18 months I think Ubuntu is going to achieve usability parity with Vista. There are already ahead in some areas, such as application installation. Of course, that won't do anything to help with compatibility with Windows applications, so Vista will remain the OS of choice for many people. But if the trend towards web-based applications continues, I can see Ubuntu becoming a viable choice for many computer users in the next two to five years. Right now, if I were a Linux zealot, I think I would work on
My Xbox is back!My Xbox 360 is back, or rather, they sent me a new Xbox (built in May 2006, so no Falcon HDMI love), which unfortunately means my cool green side panels are lost forever. The new box seems louder to me, but my wife says the old one was just as loud. She may be right. ...just in time for Halo 3 (Woot!) 8/11/2007 The Dreaded Red Ring of DeathHah, poetic justice. I worked on the Xbox 360 launch team, and today my Xbox 360 Launch Console died with the "Red Ring of Death". It actually started freezing during game play last week, and the freezes just got worse and worse, until today it wouldn't even turn on. I am very happy that Microsoft recently decided to extend the Xbox warranty program to cover the "3 red lights" error code problem for three years rather than the original one year. Now I just have to live without my Xbox 360 for the 6-8 weeks it takes to repair it. (The Xbox customer support rep said it was pretty likely that I would get my original plastics back, which I hope is true because I have a special "launch team" case.) I should hopefully get it back in time to play Halo 3. :-) 7/16/2007 Using OpenGL and GLUT on OS X with EclipseI was stumped for an hour today by trying to get a C++ OpenGL GLUT application to compile on OS X using the Eclipse CDT IDE. (Is that a lot of acronyms, or what? :-) ) It turns out that if you use a web search engine, you can find several other people plaintively asking how to do this, but no actual answers. (This is apparently because most Macintosh C/C++ developers use the Macintosh-specific XCode IDE instead.) In the hopes of helping out future web searchers, here's the answer: There are two issues:
#include <OpenGL/gl.h> #include <GLUT/glut.h> instead of: #include <GL/glut.h>
-framework GLUT -framework OpenGL The only thing I haven't figured out yet is how to get the "Outline " browser to understand where the OpenGL and GLUT include files are located. 7/15/2007 I bought an HDTV!I finally got my first HDTV. It's a Sony 40V2500, which is Sony's cheapest 1080p model. I paid $1525 from an online computer retailer. I've had it for a week now, and so far I like it a lot. The reason I chose this model was:
7/7/2007 Bad Macbook Batteries and my iPhone impressionsMy Macbook battery died this week. No advanced warning, it just wouldn't charge. As a result my Macbook thought it didn't have any battery installed. I took my Macbook to the Genius Bar at the Apple Store, and they replaced the battery, free of charge, even though my Mac was purchased 13 months ago. They did ask me if I had installed the Macbook Battery Update, but alas I hadn't. (I wonder why they didn't make it a standard download, as part of their system software update.) I think the Apple Genius Bar is worth it's weight in gold, especially to non-technical users. It's so much easier than mail-in or home service, at least if you live near tan Apple Store. I happen to live 1.5 miles from my Apple Store, which I suspect is closer than most Apple owners. :-) The Mac store was crowded, as was the whole mall, due to a local heat wave. There was a small crowd around the new iPhone. People seemed to like it. I played with it for a few minutes on the way out. My impressions:
6/16/2007 A good GDC Trip ReportKyle Wilson wrote a very good GDC 2007 trip report. (The kind I would have liked to have written, had I attended this year): http://gamearchitect.net/Articles/GDC2007.html My opinion of Mac/Linux compared to WindowsWell, now that I've spent a couple of months coming up to speed in the non-Windows world, here are some of my impressions:
Some things I like about Macs:
Wii (Sports) ImpressionsI finally got a chance to try out the Nintendo Wii. (No, really! Many Xbox team members own Wiis, but they never brought them into the office. As opposed to PS3s, which were brought in immediately. I think this is because the PS3 is more direct competition to the Xbox 360, and also because people were playing their Wiis much more than their PS3s.) I played about an hour of Wii Sports with my kids and nephews. The bowling game was very accurate. I had the same problems in Wii-land that I do in real life, namely putting too much spin on the ball, so that it curved to the right. The relatively low-quality Wii graphics are good enough for "symbolicly rendered" games like Wii Sports, even on a large screen TV. If I had a Wii and played a lot of Wii Sports, then I would want a large screen TV, just so my real-world field-of-view matched the game graphics. I bet Wii motivates quite a few HDTV purchase for this reason. It is unfortunate that so many Wii owners will be watching the Wii stretched horizontally, due to playing 4:3 aspect ratio games on 16:9 screens. The Mii avatar system is a killer feature. The other consoles should copy it. The sound-in-the-controller feature is not very useful, as the speaker is too quiet to hear during normal play. I bet next-gen Wiis will have LED sensors on both ends of the controller, to allow 360 degree position sensing, rather than the 180 degree position sensing in the current system. And finally, I'm not sure I'm going to get a Wii for my family -- my kids loved it, but they kept accidentally whacking each other and the furniture with the Wiimotes when they got excited while playing the games. Maybe when they're older. 5/16/2007 Osaka is a good fixed-width font for the MacI'm using Macs a lot at my new company, and one thing that really bugs me is the relatively poor quality of anti-aliased fonts on OSX, compared to recent versions of Windows. I found this to be especially true for fixed-width fonts used in programming IDEs. The default fixed-width font, Monaco is just a blurry mess at small point sizes, especially for characters like "=". A bit of web searching brought me this excellent web page that describes a variety of alternative fixed-width fonts available for the Mac, with some handy screen shots to make it easier to choose one: http://www.cfcl.com/vlb/h/fontmono.html After viewing that page I was almost tempted to use one of the gaudy Celtic or pseudo-handwriting fonts listed there, but in the end I chose the Osaka regular-mono font, because it looks good and it's actually installed by default on Macs, as part of the Japanese language support. Osaka seems to rasterize much more cleanly than Monaco at equivalent point sizes. Osaka does have the down-side of being very tightly packed vertically, so you might want to add some extra space vertically if your program lets you do that. (I like using Anadale Mono on Vista, but it just doesn't look as good on the Mac as it does on Vista. This would seem to indicate that Microsoft's font renderer is better than Apple's, at least at small font sizes. Good for them!) 4/12/2007 I've got a new jobI recently left Microsoft to take a job at Google. I will be working on mobile phone software. (I should I mention that I never owned a mobile phone until now. I'm such a cave man!)
I will miss working on the Xbox, and even more than that, I will miss working with the people on the Xbox team and in other parts of Microsoft. But after seven years and two complete product cycles (Xbox 1 and Xbox 360), I felt it was time for a change. I will be working out of the Google Kirkland/Seattle office, so at least I should still be able to keep in touch with my ex-co-workers.
I hope to continue this blog, but I'll have to see how it goes. Blogging will probably be extra light as I come up to speed in my new role.
It's been quite interesting to learn a new non-Microsoft tool chain. Google eats its own dogfood, the same as Microsoft, so for the past two weeks I've been using Google's search, mail, and text editor instead of Microsoft's equivalents.
Switching from Outlook to GMail is probably the most dramatic change for me. GMail sure is different than Outlook. I miss Outlook's ability to sort folder contents by sender (which makes it really fast to read through checkin emails). But Gmail has some nice features that compensate, like the conversation threading.
I'm quite surprised to find myself using and liking GMail's built-in chat feature. I was always wondering why people used chat instead of email, and now I am starting to see why. It's especially nice that GMail automatically archives past chat sessions. Most of my chat traffic is me asking someone "how do I do blah?" and someone replying "do this, that, and the other thing". It's great to have a record of the conversation to refer back to later.
One smart thing Google has done is use very short memorable names for internal site URLs. For example the internal GMail URL is "m", and the internal bug tracker URL is "b". These short cuts make it very quick to navigate to different web sites, and it also make it easier for someone to verbally transmit a URL to another person.
Oh, and the free food really is nice, especially on the main Mountain View campus. I must have gained five pounds since I started.
2/14/2007 Joe Decuir on Atari VCS, 800, and Amiga architectureI stumbled upon these presentation while looking for the sources to an old game that I published in a Compute! magazine article.
The presentations are by Joe Decuir, one of the Atari / Amiga designers, and cover:
* how the VCS, 800, and Comodore Amiga were designed
* The architecture of the VCS in detail
* How to develop VCS games
I had heard some of this information second-hand while working at Atari, but I never saw it written down in one place, or in as much detail. Very nice!
Probably the most interesting of the three presentations is the first one, that gives the design rationale behind three generations of console / home computer graphics chips:
One of his presentations also includes a link to the hardware manual for the Atari VCS's "Television Interface Adapter" chip:
1/4/2007 Berkely on Many Core CPU design, RAMP FPGA experimental platformA hot new topic in computer architecture research is "Many core" CPU designs. Recently CPU designers have run into several "brick walls" that prevent them from simply making faster single-core CPUs. As a result, the only clear way to improve system performance is to use multiple cores. We are currently in the "multi core" era, which is loosely defined as 2 to 16 cores on one chip. "Many core" is focused on designs with 32 + cores on one chip. Having many small cores requires a rethink of algorithm design.
Here's the main web page of the Berkeley Wiki on this topic:
One interesting side issue mentioned in these reports is that academic chip designers are now priced out of the chip design business. It simply takes too much money and too much time to design a full-sized chip these days. In an attempt to stay relevent, academics have proposed constructing a standardized FPGA platform, to allow honest simulation of giant chip designs. (You can always simulate your chip design in software, but that's not sexy, and it's also slower, and harder to prove that your simulated design could actually be realized in hardware.)
The "RAMP" developers hope their $100,000 kit becomes a standard, used by multiple researchers, similar to how a VAX minicomputer was a standard for computer science research in the 1980s. That way many-core CPU designs could be traded back and forth, and research claims could be independently verified.
Another suggestion from the View wiki is that researchers concentrate on 14 "dwarf" kernels, which are small problems that are representative of the kinds of code that has to run fast in order for a parallel computer to be useful. The idea is that the 14 dwarves are easier to analyze and understand than whole applications. (Why yes, there were originally only 7 dwarves, but then they looked at more kinds of programs and came up with 7 additional dwarves.) An example dwarf is the "map reduce" algorithm, much beloved by Google.
One cute statistic from the Berkeley wiki is that the first microprocessor, the Intel 4004, had around 2,400 transistors, and one of the first RISC CPUs had 40,000 transistors. You could now fit more than 2,400 of those RISC CPUs on a sincle chip -- more CPUs than the original CPU had transistors! Of course, to be useful, you need to add a MMU, a cache, and inter-core-communication to the 40,000 transistor core. But it's still pretty interesting to think about.
Update: Dave Patterson is giving a talk on "The Berkeley View: A New Framework and a New Platform for Parallel Research" at the Stanford University Department of Electrical Engineering Computer Systems Colloquium (EE380)
The talk will be given on January 31st, 2007, but it will be recorded and available for anyone to view after the talk. (I don't know what the delay period is.)
12/24/2006 Linus Torvalds on CPUsLinus Torvalds is famous as the "Martin Luther" of the Linux OS, but recently I've discovered than one of his other interests is CPU design. And he knows quite a bit about x86 CPU architecture, both from the OS writer's point of view, and as an x86 CPU implementor, courtesy of his time at Transmeta.
Linus posts frequently on the Real World Tech forums. I've learned a lot of interesting points about modern CPU design from his posts.
The easiest way to keep track of Linus's posts is to use the Search the Forums page and search for "Linus".
His general thesis is that the x86 (at least starting with the 386) is a fine architecture, and that many x86 implementations provide excellent performance by making every case fast, not just some cases like other CPUs.
12/11/2006 How to Write XNA Game Studio Express Games with F# - Part 3: Running on the Xbox 360Now to run on the 360. First, you need to set up your Xbox 360 and PC to run regular C# XNA games. That's beyond the scope of this article, but you should be able to find directions on the XNA Game Studio Express web site. I'm going to assume you've already created and run the sample C# games on your Xbox 360, so that you have everything configured correctly. Now, in order to run your F# game on the Xbox 360, you'll need to make these changes:
Let's go over that process in detail: Step 1: Modify the F# game.fs file you created in Part 2: Change this line (that's near the beginning) from the Windows path: #I @"C:\Program Files\Microsoft XNA\XNA Game Studio Express\v1.0\References\Windows\x86" To the following lines, which conditionally use the correct path, depending upon whether we're compiling for Windows or for Xbox 360: #if XBOX360 #I @"C:\Program Files\Microsoft XNA\XNA Game Studio Express\v1.0\References\Xbox360" #else #I @"C:\Program Files\Microsoft XNA\XNA Game Studio Express\v1.0\References\Windows\x86" #endif Step 2: Compile the F# DLL as a standalone DLL:
"C:\Program Files\FSharp-1.1.13.8\bin\fsc.exe" -a -g --standalone --define XBOX360 -o game360.dll game.fs Step 3: Create an Xbox 360 Game XNA GSE project:
Step 4: Add your F# DLL to the Xbox 360 Game XNA GSE project
Step 5: Write some C# code to call your F# game
Step 6: Compile and run your game on the Xbox 360
That's all there is to it! I hope you've enjoyed these posts. If you're interested in the F# language, a good resource is hubFS: THE place for F# FAQQ: Can I use this call-a-DLL approach to write Xbox 360 XNA Game Studio Express games for other non-C# CLR languages like Iron Python or Visual Basic? A: Unfortunately no, not for those two specific languages. (Sorry!) The reason is that the Xbox 360 version of the XNA GSE CLR is based on the .NET Compact Framework 2.0. This is a problem for Iron Python and Visual Basic because those particular languages rely on CLR features that are not present in the .NET Compact Framework 2.0. Therefore you will get a runtime error when you try and run your Iron Python or Visual Basic code on the 360. It's possible that future versions of either the languages or the Xbox 360 GSE runtime will fix this problem. (But don't hold your breath -- nobody has promised anything in these areas. Only C# is officially supported for XNA GSE games.) Note that this limitation to run on top of the .NET Compact Framework only applies to the Xbox 360 version of your game. Although I have not tried it, I believe that it should be possible to use a variation of the techniques in Part 2 to run Iron Python and/or Visual Basic XNA GSE games on Windows. Alan Phipps has written set of tutorials on Using Visual Basic with XNA GSE on Windows Q: Have you written an Xbox 360 game in F#? A: Yes, a small game "Dandy Dungeon". I haven't had time to clean up the sources for publication yet. You can find the sources to an early non-XNA version of this game on hubFS. Q: Why are you messing around with F# anyway? Isn't C# cool enough for you? A: I love C# (and I do most of my day-job programming in either C# or C++), but I'm attracted to F# for it's brevity and its neat-o functional programming language features. It's also a lot of fun to watch the language evolve and improve. How to Write XNA Game Studio Express Games with F# - Part 2 Using F# with Visual C# ExpressIn Part 1 we saw how to create a simple stand-alone F# game based on XNA GSE. But the stand-along game had two limitations:
The reason for both of these limitations is that the approach we took avoided using Visual C# Express. In order to get around the limitations, we have to bring Visual C# Express into the picture. Unfortunately, we can't just create an F# project in Visual C# Express. For one reason or another, Visual C# Express only supports compiling C# source files. However, there is an escape hatch: Visual C# Express allows you to reference any number of DLLs, and those DLLs can be written in any language. Even better, the Visual C# debugger works fine with DLLs written in any .NET language. So our strategy is:
That's all there is to it! Let's go through the process step by step in more detail: Step 1: Configure Visual C# Express to expose advanced features:
Step 2: Write our F# code. Use the text editor of your choice to write the following F# code. NOTE: This version of game.fs is slightly different than the game.fs file in the previous post. The difference is that we do not call the main() function at the end of the file. (Instead we will call it from the C# code in a C# project that we create in a later step.)
Step 3: Save the F# file as "game.fs", and then open a cmd.exe shell window and compile the game as a DLL using the F# compiler:
The -a flag means "create an assembly", which is the CLR name for a DLL. The -g flag means "add debugging information", which lets you step through your F# code in the debugger. Step 4: Create a Visual C# XNA Game Studio Express project
Step 5: Add your F# DLL to the XNA GSE project
Step 6: Write some C# code to call your F# game
Step 7: Compile and run your game
That's all there is to it! The benefits of this round-about approach are
Coming in part 3: Changes needed to support Xbox 360 development. How to Write XNA Game Studio Express Games with F# - Part 1 Getting StartedThis blog entry explains how to write XNA Game Studio Express games in the F# programming language. To begin, let me explain what "XNA GSE" and "F#" are:
In this series of articles, I'm going to show how to:
Let's get started with creating a trivial F# XNA game that runs on Windows. (And by trivial I mean really trivial: the game just draws a blank green screen.) Step 1: Download and install Visual C# Express: Visual C# Express Home Page Step 2: Download and install XNA Game Studio Express: XNA Game Studio Express Home Page Step 3: Download and install F#: F# Home Page
Step 4: Create an F# source file using your favorite text editor:
Step 5: Save the F# file as "game.fs", and then open a cmd.exe shell window and compile the game using the F# compiler:
Step 6: Run the game by double-clicking on the "game.exe" or by typing "game.exe" at the command line. That's all there is to it! However, is are some drawbacks to this approach. By bypassing Visual C# Express:
In the Part 2 of this article I will explain how to work around these problems. 11/24/2006 Free content creation tools to use with XNA Game Studio ExpressXNA Game Studio Express enables you to write 2D and 3D games for your PC and/or Xbox 360. Here are some good free content creation tools you can use to create content to use in your games:
Audacity a sound editor.
Paint .NET an image editing program.
MetasequoiaLE a 3D drawing program. |
|
|