Sunday, July 1, 2007

Going Beyond : Building Your Own Video Games

Introducing Microsoft's XNA Game Studio Express

Most people know about Microsoft's X-Box gaming console, and millions own one, including me, and several of my brothers and cousins. What may be news to many people is that you can build your own games to run on X-Box and you don't have to be a mathematical genius to do so.

This is done using Microsoft's XNA Game Studio Express, a free download from Microsoft.

Find out how to download this free program and get started building your own fun video games for your X-Box or your Windows PC today by clicking here: http://msdn2.microsoft.com/en-us/xna/default.aspx

I experimented with some of the excellent tutorial materials that ship with the help files tonight while on the phone with a friend of mine who also went through the tutorial as well.

Before dropping some screenshots and showing a video of our initial creation, you may want to get some background about exactly what XNA is and how it is bringing great opportunity to aspiring video game developers. Check out these videos from my YouTube playlists:

Today's Experiment Revealed

Here is the finished product, a seven-second video clip that shows a spaceship zooming around on an axis. I have no doubt that this spaceship has high aspirations of becoming a vicious fighter plane in subsequent tutorials.

Do It Yourself

To accomplish what we did is very easy to repeat.

  • First, go to http://creators.xna.com and follow the instructions for downloading and installing the software.
  • Second, watch the Video: Getting Started with XNA Creators Club from the Education / Getting Started page.
  • Third, watch and follow along with Charles Cox as he narrates Video Tutorial 1: Displaying a 3D Model on the Screen.

image

 The entire contents of the tutorial are available within the help system of Visual Studio, so it's extremely easy to follow along with the narration.

image

My Next Steps

The second tutorial uses the X-Box 360 Controller, and since I don't have a cable to connect it to my PC, I will buy the X-Box 360 Play & Charge Kit to hook it up to my computer through the USB port.

http://www.xbox.com/en-US/hardware/x/xbox360playchargekit/

image

Applying Video Game Technology to Preserve Family History

My plan in learning how to do this is not really to create many video games, though I will have a go at upgrading my ages old VB experiment in Winsock programming, a dice game called SkookZee, http://www.ultravioletconsulting.com/portfolio04/data/skookzee/index.html?print=y, into a 3D X-Box game, one that will work with network support when run on Windows I hope.

Ultimately, however, my long-term goal for the technology is to use it to create a stand-alone version of the Carola L. Gough Art Gallery. Currently, I have this inside of Second Life. But, I want to create a more sophisticated and interactive project, and one that does not depend upon the whims of the Second Life grid. I want to learn how to create 3D models and then recreate some of Carola's paintings using those models. This would make the experience completely immersive. I am going to visit her this August to interview her about her paintings and life and will be able to include the audio and video content within the "game" when it is finished, making it a completely interactive "time capsule" and permanent testament to her life's work.

 

Aside: The Carola L. Gough Art Gallery

Below is a video clip of the first version of the gallery, with an accompanying track from The Crystal Method, with the lyrics:

This transmission is coming to you
This transmission is coming to you
You got it
This transmission is coming to you
This transmission is coming to you
You got it
You got it
You got it
Apollo 8 you are go
You got it
Apollo 8 you are go
Apollo 8 you are go
Uh we see the uh earth
You got it
Uh we see the uh earth now uh
You got it
Roger
Roger
Roger
Roger
You got it
You got it
You got it
You got it
Roger
You got it
Roger
You got it
Roger
You got it
This transmission is coming to you
This transmission is coming to you
You got it
This transmission is coming to you
This transmission is coming to you
You got it
You got it
You got it
Apollo 8 you are go
You got it
Apollo 8 you are go
You got it
Apollo 8 you are go
You got it
 

I chose this song because her artwork gives you a sense that you are seeing the Earth from above or from a vantage point that always shows beauty.

 

Here is a photograph from the Apollo 8 mission, referenced on http://en.wikipedia.org/wiki/Apollo_8:

 I may be in luck with finding some tips from qualified people to give me tips for learning how to do just that. I started work on a web-based guestbook application for Second Life that is currently a working prototype within the gallery. A visitor to the gallery left his calling card recently.

image

It turns out that http://www.StarChronicles.com is the web site of Charlie Case, a renowned 3D visual artist from Atlanta, GA.

image

I highly recommend you check out his work!

You can visit his YouTube channel at this URL to see both of the following videos and many more stunningly beautiful 3D animations with instrumental music.

http://www.youtube.com/profile_videos?user=starchronicles&p=r

Sample Code from the XNA Tutorial

This gives you an idea of what the code looks like. Again, this code is all specified in the help file. Actually, we had to add the aspectRatio code because it appeared in the video, but was not in the help file, just a typo.

// Set the position of the camera in world space, for our view matrix.
Vector3 cameraPosition = new Vector3(0.0f, 50.0f, 5000.0f);

//Aspect ratio to use for the projection matrix
float aspectRatio = 640.0f / 480.0f;

protected override void Draw(GameTime gameTime)
{
    graphics.GraphicsDevice.Clear(Color.CornflowerBlue);

    // Copy any parent transforms.
    Matrix[] transforms = new Matrix[myModel.Bones.Count];
    myModel.CopyAbsoluteBoneTransformsTo(transforms);

    // Draw the model. A model can have multiple meshes, so loop.
    foreach (ModelMesh mesh in myModel.Meshes)
    {
        // This is where the mesh orientation is set, as well as our camera and projection.
        foreach (BasicEffect effect in mesh.Effects)
        {
            effect.EnableDefaultLighting();
            effect.World = transforms[mesh.ParentBone.Index] * Matrix.CreateRotationY(modelRotation)
                * Matrix.CreateTranslation(modelPosition);
            effect.View = Matrix.CreateLookAt(cameraPosition, Vector3.Zero, Vector3.Up);
            effect.Projection = Matrix.CreatePerspectiveFieldOfView(MathHelper.ToRadians(45.0f),
                aspectRatio, 1.0f, 10000.0f);
        }
        // Draw the mesh, using the effects set above.
        mesh.Draw();
    }
}

 

 

No comments: