XNA, Managed DirectX and Game Programming

July 2007 - Posts

XNA Version of Frogger

I came across a small game of Frogger that has been developed using XNA. The author has posted the Compiled code, maybe we can talk him into posting the source code.

 

Here is the Direct Link to the Post.

 

Cross Post from www.virtualrealm.com.au
Posted: Sun, Jul 29 2007 6:45 by Glenn Wilson | with no comments
Filed under: ,
DirectX SDK - New Release Schedule

When going through the SDK Readme you will now find that the DirectX SDK now has a new Release Schedule.

Starting after the August 2007 release of the DirectX SDK, Microsoft will deliver future updates four times per year. The next five releases now planned for delivery are:

  • August 2007
  • November 2007 (instead of October and December)
  • March 2008 (instead of February and April)
  • June 2008
  • August 2008

This delivery schedule will continue our strong track record of regularly releasing new features and tools, while allowing for longer technology development cycles.

Cross Post from www.virtualrealm.com.au
Posted: Sat, Jul 28 2007 17:22 by Glenn Wilson | with no comments
Filed under:
DirectX SDK - August 2007 released

The Microsoft DirectX SDK August 2007 Release has been uploaded to the Microsoft Downloads site, and it is early.

From the Readme...

Direct3D 10.1 Tech Preview

Direct3D 10.1 is an incremental, side-by-side update to Direct3D 10.0 that provides a series of new rendering features that will be available in an upcoming generation of graphics hardware.

  • TextureCube Arrays which are dynamically indexable in shader code.
  • An updated shader model (shader model 4.1).
  • The ability to select the MSAA sample pattern for a resource from a palette of patterns, and retrieve the corresponding sample positions.
  • The ability to render to block-compressed textures.
  • More flexibility with respect to copying of resources.
  • Support for blending on all unorm and snorm formats.

This tech preview provides an early look at these features and the handful of new APIs that support them. The August 2007 Direct3D 10.1 Tech Preview requires the Windows Vista SP1 Beta which will be available to MSDN subscribers once it is publicly released.

XAudio2 Beta: New Cross-Platform Audio API

The August release includes Beta 1 of XAudio2. XAudio2 is a new cross-platform audio API (Windows and Xbox 360) that is based on the Xbox 360 XAudio API. XAudio2 is a low-level audio signal processing library for Windows XP and Windows Vista providing a fully modern audio pipeline, including:

  • Multi-channel and surround-sound support with full per-channel volume and mapping control.
  • Programmable, cross-platform DSP effects framework.
  • Per-voice filtering, arbitrary submixing, and multi-rate processing.
  • Multicore optimized, non-blocking API design.
  • Pluggable and generalized 3D spatialization support, with a full-featured implementation provided by the independent X3DAudio math library.

XAudio2 is designed to be the game-audio API that will replace DirectSound.

Please visit the Microsoft Connect XAudio2 Beta website for feedback, bug reporting, links to discussion forums, and an audio feedback survey.

XACT Session Windows

The XACT UI has a new feature, Session windows. Session windows allow a sound designer to create multiple virtual mixing consoles that are comprised of sounds and categories. By using a Session window, a sound designer can easily access volume controls for multiple sounds or categories with the look and feel of a multi-track mixing console. Sounds can be individually auditioned from the Session window. They can also display basic sound status, such as whether a sound is actively playing, or the number of instances of the sound. As part of the Session window functionality, auditioning Mute and Solo are now supported for categories, which allows sound designers to more easily mix sounds in their games.

GDFTrace Tool

GDFTrace.exe is a new command-line tool that displays Game Explorer metadata contained in a binary and highlights any warnings.

New and Updated Articles

This release has both new and updated articles.

  • Games for Windows Technical Requirements and Games for Windows Test Requirements have both been updated for the August 2007 release with some minor requirements changes, significant clarifications, and additional supporting material.
  • The article, Debugging with Symbols, provides a high level overview of how to best use symbols in your debugging process. It explains how to use the Microsoft symbol server, and also how to set up and use your own private symbol server. These best practices can help increase your effectiveness and ability to debug issues, even in cases where all the symbols and executable files that are related to a problem are not located on your computer.

New and Updated Samples

This release has both new and updated samples.

  • The XAudio2BasicSound sample demonstrates how to initialize the XAudio2 library and play a variety of sound files.
  • The ContentStreaming sample was rewritten to better demonstrate streaming content in the background. This is useful for applications that need to display more data than can fit in video or system RAM at any given time.
Cross Post from www.virtualrealm.com.au
Posted: Sat, Jul 28 2007 17:18 by Glenn Wilson | with no comments
Filed under:
Getting Started with Blender 3D and XNA

Installing Blender

The first thing that you need to do is install the Blender system and get it running, to download the latest version of Blender go to www.blender.org and go to the main downloads page. At the time of this article the current version is Blender 2.44. When you do download the package you do have the choice of downloading the Installer Package for most operating systems for my work I will be focusing all of my work using the Windows Operating System.

Download and install the application, but what you might want to do is to also download the Zip of the package. In the past I have used this to recover script files that I have changed. The install process for Blender is pretty painless, during the process you are asked a couple of questions but normally I just select the default options. In summary the main option you are asked is the location of the working files for the application, you can change this later but for the leave the settings as default.

The last thing that you need to do to complete the install is to install the python system. You do not have to do this step but if you do want to use any plug-ins that are not shipped with the product, or customize the ones that are you will need it.

Setting up Python for use with Blender

You will not be able to download the python system from the Blender Site, you will have to go to http://www.python.org/ and download the package from there. Download the Python 2.5.1 system from here. Once you have finished installing Python you will need to restart your machine.
Final Steps

Ok now you should be able to start Blender and start working. One thing that I do like to do is to change the file locations for some of the data I use. To do this you will have to open the settings window and configure the paths. To do this use your mouse and move it just below the main toolbar. From there you should be able to drag down the toolbar to revel the main settings for the application. I will leave the file locations up to you, but normally change the temp locations and move them to another drive.

Exporting Your First Model from Blender

With Blender now fully up and running we will need to have a model and export it so that we can use XNA to display the model. With this article I do not want to show you how to model (That will come Later) all I would like to do is to show you how simple it is to export a model and display it on the screen using XNA.

When you first start Blender you are presented with a small Cube in the centre of the screen, this is the model that we are going to use. The first step is to make sure we are in “Object  Mode”. In object mode you are able to select and manipulate complete objects. You can make sure you are in Object mode by Pressing Tab, and looking at the mode selector on the toolbar for the main design window.

Note: For a list of the Different Keyboard shortcuts used in Blender have a look here.

To start make sure that the cube is selected, you tell that an object is selected because the object will be highlighted with a pick outline. Next select the File -> Export menu item and select “Autodesk FBX” as the export type. This will bring up a dialog that will ask you to select a file location and name. Make sure that you put the files in a place where you will be able to find them later.
That’s it for the Blender part, open up Game Studio Express and create a new Windows Game Project called “BasicModel”, this will be the small example program we will create that will display and rotate our model that we have just exported.

Displaying the Model Using XNA

Start the application by Adding a new Folder called “Content” and then adding another one underneath that called “Models”, now add an existing item and add your Exported model to the Application.

With the content Added here is the Game1 class that I use for the sample.

[code language="C#"]

#region Using Statements
using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Storage;
#endregion

namespace BasicModel
{
    /// <summary>
    /// This is the main type for your game
    /// </summary>
    public class Game1 : Microsoft.Xna.Framework.Game
    {
        GraphicsDeviceManager graphics;
        ContentManager content;

        // Set the position of the model in world space, and set the rotation.
        Vector3 modelPosition = Vector3.Zero;
        float modelRotation = 0.0f;

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

        // Set the 3D model to draw.
        Model myModel;

        // The aspect ratio determines how to scale 3d to 2d projection.
        float aspectRatio;

        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);
            content = new ContentManager(Services);
            aspectRatio = (float)GraphicsDeviceManager.DefaultBackBufferWidth /
                (float)GraphicsDeviceManager.DefaultBackBufferHeight;
        }

        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            // TODO: Add your initialization logic here
            projectionMatrix = Matrix.CreatePerspectiveFieldOfView( MathHelper.ToRadians(45.0f), aspectRatio,
                1.0f, 200.0f);

            viewMatrix = Matrix.CreateLookAt(cameraPosition, Vector3.Zero, Vector3.Up);
            base.Initialize();
        }


        /// <summary>
        /// Load your graphics content.  If loadAllContent is true, you should
        /// load content from both ResourceManagementMode pools.  Otherwise, just
        /// load ResourceManagementMode.Manual content.
        /// </summary>
        /// <param name="loadAllContent">Which type of content to load.</param>
        protected override void LoadGraphicsContent(bool loadAllContent)
        {
            if (loadAllContent)
            {
                // TODO: Load any ResourceManagementMode.Automatic content
                myModel = content.Load<Model>(@"Content\Models\Test");
            }

            // TODO: Load any ResourceManagementMode.Manual content
        }


        /// <summary>
        /// Unload your graphics content.  If unloadAllContent is true, you should
        /// unload content from both ResourceManagementMode pools.  Otherwise, just
        /// unload ResourceManagementMode.Manual content.  Manual content will get
        /// Disposed by the GraphicsDevice during a Reset.
        /// </summary>
        /// <param name="unloadAllContent">Which type of content to unload.</param>
        protected override void UnloadGraphicsContent(bool unloadAllContent)
        {
            if (unloadAllContent)
            {
                // TODO: Unload any ResourceManagementMode.Automatic content
                content.Unload();
            }

            // TODO: Unload any ResourceManagementMode.Manual content
        }

        /// <summary>
        /// Allows the game to run logic such as updating the world,
        /// checking for collisions, gathering input and playing audio.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Update(GameTime gameTime)
        {
            // Allows the game to exit
            if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)
                this.Exit();

            // TODO: Add your update logic here
            modelRotation += (float)gameTime.ElapsedGameTime.TotalMilliseconds * MathHelper.ToRadians(0.1f);

            base.Update(gameTime);
        }


        /// <summary>
        /// This is called when the game should draw itself.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Draw(GameTime gameTime)
        {
            graphics.GraphicsDevice.Clear(Color.CornflowerBlue);

            // TODO: Add your drawing code here
            // 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.CreateRotationX(modelRotation) *
                        //Matrix.CreateRotationY(modelRotation) *
                        Matrix.CreateRotationZ(modelRotation) *
                        Matrix.CreateTranslation(modelPosition);
                    effect.View = this.viewMatrix;
                    effect.Projection = this.projectionMatrix;
                }
                // Draw the mesh, using the effects set above.
                mesh.Draw();

                base.Draw(gameTime);
            }
        }
    }
}

[/code]

Cross Post from www.virtualrealm.com.au
Free Printable Keyboard Shortcut sheets for Art and Design

I came across this post this morning and thought I would post it on.

When using most of the modern design applications or even programming IDEs I always find myself resorting back to the Keyboard shortcuts for most functions, generally I can remember them but more then often I find myself looking the net to try and find shortcut shhets for the applications in question. So today I found this link which has keyboard shortcut sheets for Photoshop, InDesign and Illustrator CS, Macromedia Freehand, Cinema 4D and 3D Studio Max.

I hope you find them handy.

Here is the link to the original Post and the source.

Cross Post from www.virtualrealm.com.au
Silverlight - Resources, Articles and Tutorials

I had some more time today to play some more with SilverLight. While I was doing some searches I came across the following post.

In the post the author supplies us with a really good list of different resources for SilverLight Development, included in the list are tutorials and Community Blogs.

"Silverlight is a proprietary runtime for browser-based Rich Internet Applications, providing a subset of the animation, vector graphics, and video playback capabilities of Windows Presentation Foundation. Version 1.1 also includes a complete version of the .NET Common Language Runtime, so that Silverlight applications can be written in any .NET language. Silverlight aims to compete with Adobe Flash and the presentation components of Ajax. It also competes with Sun Microsystems' JavaFX, which was launched a few days after Silverlight"

"I have collected number of resources on Silverlight which are listed below. I hope it will save your time and money. List will be updated continuesly when i find new resources."

Here is a link to the original Post, as well as a link to a post I made earlier that lists 50 Sample SilverLight Examples for you to try...

Cross Post from www.virtualrealm.com.au
Xbox 360 Premium recall at EB Games Australia

I am a little late with this one, but it looks like EB Games Australia is recalling all Xbox 360 Premium packs.

"The recall, which affects the premium and not the core Xbox 360 consoles, is assumed to be related to a faulty batch of HDDs rather than to the widely-reported "red rings" issue. New premium consoles will apparently be back in the market channels by Wednesday."

At least this recall looks to be a problem with the Hard Drive Units and not the Red Rings :)

"Sources within the company have confirmed that two weeks ago (approx June 29) store managers were first asked by Head Office to test every unit in-stock for errors, but were then ordered last week to return their entire inventories of the console, as well as remove all 360 promotional material and dummy boxes from their stores. The recall is believed to be due to a faulty batch of HDDs, as it did not include Core units."

Here is the link to the original Kotaku post, and a post on gameindustry.biz.

Cross Post from www.virtualrealm.com.au
Posted: Mon, Jul 16 2007 18:39 by Glenn Wilson | with no comments
Filed under:
XNA Example - Controller Pointer

 When developing the Mouse Component I new that it was only going to be for the Windows System, but as time goes by I new that I would need a simular system that would work on the Xbox 360. So what I have come up with is the following small example, I will be building on this and trying to make it better.

 

"This is a small example that allows you to use the controller as a pointer in the same way you would a Mouse. The Controller Pointer has been set up as a Drawable Game Component that will draw the pointer and react to the actions of the controller. This example will allow you to move the pointer with the left thumbstick, and have the pointer change color in resonce to the Buttons pressed on the Controller."

Here is the direct Link to the file Download. Virtual Realm - Controller Pointer

Cross Post from www.virtualrealm.com.au
Posted: Sun, Jul 15 2007 5:35 by Glenn Wilson | with no comments
Filed under: , ,
XNA Example - Clickable Sprite

I have just completed another small example, this time it's a Clickable Sprite Example.

In this Example I show you a simple method to use the Mouse (Using my Custom Mouse Pointer Game Component) to click on a Sprite. This example also uses a Per Pixel Method that will make sure that you can only click on the full sprite and not on a Transperant area.

 

Download the Virtual Realm - Clickable Sprite.

Cross Post from www.virtualrealm.com.au
Posted: Sun, Jul 15 2007 0:46 by Glenn Wilson | with no comments
Filed under: , ,
On my way to TechEd 2007 and Ready to talk XNA

Well I have just finished all the booking and finalizing the details, it's official I am on my way to TechEd. I have been going over the session details tonight and having a quick look at what is going on, and with no surprise there is nothing happing with XNA... :) do not get me wrong there are lots of sessions that I would like to drop in on, for example the Powershell, exchange and SQL Server sessions.

But as I am going to be there if anyone would like to site down and talk about XNA or any game Development, drop me a line and we can set it up.

Just a reminder guys if you are thinking of going, it is selling out quick, and here are the top 10 reasons why you should be going...

Cross Post from www.virtualrealm.com.au
Posted: Fri, Jul 13 2007 9:07 by Glenn Wilson | with no comments
Filed under: ,
XNA Game Studio Sessions at Gamefest 2007, are we getting Networking

And again I will not be able to make it to Gamefest this Year, but it looks like there are going to be some interesting topics and some news for those who are going.

As Zman says in his latest post, XNA 2.0 which should be released this Holiday may include Networking, have a look at the abstracts and see what you can find.

GameFest 2007 XNA Game Studio

  • Extending the XNA Framework Content Pipeline
  • Creating Content the Softimage|XSI Way for XNA Game Studio
  • Understanding XNA Framework Performance
  • The Costs of Managed Code: The Avoidable and the Unavoidable
  • Pre-Mortem: Torpex Games' Schizoid
  • Developing 3D Games on the XNA Framework Using TorqueX
  • What’s New in XNA Game Studio 2.0
  • Networking with the XNA Framework
  • XNA Game Studio for Fun and Profit
  • Advanced Debugging in Managed Code
Cross Post from www.virtualrealm.com.au
Posted: Fri, Jul 13 2007 5:06 by Glenn Wilson | with no comments
Filed under: , ,
XNA Mini Game Release - Vector Rumble

The XNA Team have released another XNA Mini Game to the Creators Site.

Vector Rumble

"Vector Rumble is a two-dimensional shooter, pitting up to four players against one another in a death match arena filled with asteroids and power-ups."

Drop on over to the Creators site and Download the Source...

Cross Post from www.virtualrealm.com.au
Posted: Fri, Jul 13 2007 4:53 by Glenn Wilson | with no comments
Filed under: ,
50 Silverlight Examples from A to Z

Over the next few weeks I am going to start looking at Silverlight.

But for starters I cam across the following post that gives us 50 examples of different silverlight examples.

http://blogs.msdn.com/tims/archive/2007/07/07/from-a-to-z-50-silverlight-applications.aspx

"If you've just installed Silverlight on your machine and want to see it "do" something, click around the fifty links below to explore. Some of these samples require the Silverlight 1.1 alpha release (Windows install / Mac install), so if you get an error, try installing the 1.1 release. (Incidentally, the 1.1 alpha release contains the 1.0 beta bits, so you just need to install from the link above and you're good to go.)"

Cross Post from www.virtualrealm.com.au
Xbox 360 - Rumors of new internals code named "Falcon"

Posts are starting to arrise that indicate that there is a new set of internals comming for the Xbox 360, codenamed "Falcon".

"Falcon is the name for the latest internal electronics in the Xbox 360. It will have an IBM microprocessor and an AMD/ATI graphics chip that are manufactured in a 65-nanometer production process. These are cost-reduced chips that do the same thing as their 90-nanometer predecessors, but they’re smaller." Mercury News..

None of this has been confirmed, but I am looking. following are the sources for the moment, as I find more I will post.

 

Cross Post from www.virtualrealm.com.au
Bungie Day - Get ready for it and the freebies

Looks like we are in for some more free stuff from Bungie, but be warned we only have 24 hours to claim, and no it won't be some keys to a secret beta for Halo 3...

"July 7th has come to be known as "Bungie Day" amongst our fan community and this year is extra special on account of it actually falling in a year ending with 7. If you're new to our fan community, do some digging to find out the rich history of Bungie and the number 7 and you'll see why 7/7/07 has special meaning within our family.

Lukems and the Bungie.net team have some cool things lined up for the site tomorrow but we also managed to pull a few strings to make some extra special content available on Xbox 360 Marketplace. I won't spoil the fun and tell you exactly what it is (don't get too excited, it's not Halo 3 - think something of a more decorative nature) but I did want to give you a heads-up that these commemorative goodies are ONLY available on 7/7/07 and then they are gone forever.

Log on to Marketplace any time starting at 12:01 AM PDT on July 7th and get it while you can. Once the clock strikes midnight on Saturday, this content is gone forever. Don't say we didn't warn you.

Spread the word throughout the Bungie community and join us on Marketplace and Bungie.net tomorrow for good times.  And we wouldn't have a "Bungie Day" without our loyal fans who have stuck by us for so long.  Thanks for all of your support and here's to 2007 - the best year yet in the history of Bungie Studios and our fan community!"

Direct Link to the post on Bungie.net, as well as Kotaku.

Cross Post from www.virtualrealm.com.au
Posted: Fri, Jul 6 2007 17:49 by Glenn Wilson | with no comments
Filed under:
XNA UK User Group Comp roundup

Paul Foster, one of the judges on the XNA UK User groups competition gives us a quick roundup on the game entries as well as introduces us to the other judges.

For those who have not found them yet, the UK User group has posted the games on their site for all to enjoy, I personally liked the Pirate Sea Battle one as well.

Direct Link to the game Downloads, and to my favorite.

Cross Post from www.virtualrealm.com.au
Posted: Fri, Jul 6 2007 17:26 by Glenn Wilson | with no comments
Filed under: ,
What is your Cartouche

I am a really big Stargate Fan and going through one of the forums I found this link and thought some of you might find it interesting.

"A cartouche is a kind of nameplate. Ancient Egyptians used cartouches for kings, queens, and other high-ranking people in the kingdom. A cartouche consists of a number of different hieroglyphic symbols enclosed in a loop."

Here's Mine

Cross Post from www.virtualrealm.com.au
Posted: Fri, Jul 6 2007 9:28 by Glenn Wilson | with no comments
Filed under:
Xbox 360 - Unreal Tournament 3 could have 3 to 4 dozen maps

Details are starting to surface that Unreal Tournament 3 is going to have 3 to 4 dozen multiplayer maps in the retail version of the game. I just hop that when playing the game online users can selelct more then the usual 1 or 2 maps, I find that generally when playing these sorts of games the players always seem to find one or two maps which they like and stay with those. Having 3 to 4 dozen will give them plenty of choice.

"Aside from the gameplay shown in the video, it offered a few details about the game. It was said that the original idea was to make gigantic maps utilizing UE3's streaming technology for up to 64 players at once. They decided that it didn't feel like a UT game and went back to improving the original formula. Each map starts out as a basic BSP layout and is play tested until they think it is fun and then it is handed over to have static meshes and the rest of the artistic assets created. There will be 3 to 4 dozen multiplayer maps in the retail version of the game. The single player portion will have even more maps than multiplayer.", From BeyondUnreal...

Information Sourced from TalkXbox.

Cross Post from www.virtualrealm.com.au
Posted: Fri, Jul 6 2007 1:17 by Glenn Wilson | with no comments
Filed under: ,
Xbox 360 - BlackSite Area 51 Trailer

Midway is giving us something early, apparently this is the new BlackSite Area 51 Trailer that is to be shown at this years E3 expo.


Online Videos by Veoh.com

 

Looks good, lets just hope the game play is good.

Here is the direct Link to the Video and original Post Unscripted 360.

Cross Post from www.virtualrealm.com.au
Posted: Fri, Jul 6 2007 0:55 by Glenn Wilson | with no comments
Filed under: ,
Xbox 360 - First Turok Gameplay Video

The guys over at IGN have had a Preview of the New Turok game coming to Xbox 360, go on over and have a read, this game looks good.

Also on http://www.videogamesblogger.com/ they have posted the video interview with the IGN Team and the Developers of Turok. In this video they talk about the game play as well as some of the reasons why they have done things in the game.

 

Cross Post from www.virtualrealm.com.au
More Posts Next page »