XNA, Managed DirectX and Game Programming

December 2006 - Posts

Glen Moyes - To Those Learning 3D

I was going through some of the Blender Beginners Tutorials trying to gather a list for those getting started in Blender, What I did find was this really good article.

Link to Glen Moyes - Articles - To Those Learning 3D

The article is a good starting point for anyone who wants to get into 3d design, wether it be for game development or just 3d art. I would suggest this article as a good read to any just starting out.

Go and have a read and let me know what you think.

Cross Post from Virtual Realm - Mykre's Space
XNA Resources - On Screen Keyboard

Over the last few weeks the guys over at XNA Resources have been working on an on screen text input component. This Keyboard simulates that one that is available on the 360, now you can use it in both your windows and 360 games/applications. The component also detects what video mode you are in and loads the required resources... 

Link to XNA Resources - XNA Tutorials, GSE Tutorials, XNA News, Game Studio Express News

Available in the download is the full source for the component. Great work guys keep it up....

Cross Post from Virtual Realm - Mykre's Space
Posted: Sat, Dec 30 2006 8:23 by Glenn Wilson | with no comments
Filed under: ,
Test from Word 2007

I have been setting up my machines to run Windows Vista so I thought it was time that I configured Word.

Cross Post from Virtual Realm - Mykre's Space
Posted: Sun, Dec 24 2006 8:29 by Glenn Wilson | with no comments
Filed under:
Tutorial 02 - Turning Your XNA App into a Starter Kit

One of features of the Visual Studio 2005 range is the ability to use Starter kits. With Starter kits you are able to load up a complete project or application and use it as a base for another application. It is also a good way to publish base projects that are shipped with SDKs or complete SDK Systems. At the moment several systems are using this method, for example the Dot Net Nuke portal system ships the base site as a Starter kit which you can customize and publish to your own site. In relation to game programming the XNA System Ships with one Starter kit “Space war”, and the Torque X Game Engine from Garage Games ships with several base applications in Starter kit form, we have also been told that more Starter kits will start to roll from Microsoft.

One of my hopes is that over the next few months we will start to see community based starter kits being published on various sites. But one of the problems I do see is that the documentation to create these Starter kits is a little hard to find. You can find all that you need for the task inside the MSDN Documentation but you have to dig a little deep to do this. So what I am going to do is use the previous Tutorial that I have put together and convert the Base Application into a simple Starter kit.

At present there is no real GUI way to do this, you will need to create some XML documents as well as perform some simple file operations to complete the task, note that none of the tasks are hard to do and anyone should be able to complete the tasks with the base tools shipped with Windows XP/Vista and the Game Studio Express.

The first Step is to get you base application complete, for those who are new at this you could have a look at my First Tutorial. Once you have the application complete and compiling without any problems you will now need to export the project as a template.

To export the project as a template select the Export Template option under the file menu. When going through this menu you will be presented with some options, first make sure that you select a project template and not an object. When you select a project it will export the complete project including all of the content. If you select the object you will be given the option to export single classes of forms from inside your project.

During the export process you are presented with several configuration options for the project, these include the Template name and description, as well as what to do with the template. It is up to you weather you import the template when finished (I don’t import it). But it will ask you about opening an explorer window to the template, do this…

When the template has been exported make sure that you take note of the Template name. Also I normally move the file to a temp directory so that I can work on the Starter kit files and not interfere with the Template systems. For the purpose of this example I have used the following settings for the names, this will allow you to see where they fall into place when the Starter Kit is finished.

Template Name: BaseXNAApplication
Template Description: Base Windows XNA Application

After you have finished the export you will have a file called BaseXNAApplication.zip, copy this file to a temp location so that we can work on it.

The next step is to create and edit an XML File so that we can use it as a configuration file for the Starter kit. What I have done is create a base configuration file which I customize each time I use it. Here is the Base File…

<VSContent xmlns="http://schemas.microsoft.com/developer/vscontent/2005">
<Content>
<FileName>LibraryApp Starter Kit.zip</FileName>
<DisplayName>Library Application Starter Kit</DisplayName>
<Description>VSTemplate for VB project</Description>
<FileContentType>VSTemplate</FileContentType>
<ContentVersion>1.0</ContentVersion>
<Attributes>
<Attribute name="TemplateType" value="Project"></Attribute>
<Attribute name="ProjectType" value="Visual Basic"></Attribute>
<Attribute name="ProjectSubType" value=""></Attribute>
</Attributes>
</Content>
</VSContent>

We need to save this file as a *.vscontent file, so for this project we would save it as BaseXNAApplication.vscontent.

Now that we have the base vscontent file we will need to change it to reflect our project, change the vscontent file that we just created so that it matches the one below.

<VSContent xmlns="http://schemas.microsoft.com/developer/vscontent/2005">
<Content>
<FileName>BaseXNAApplication.zip</FileName>
<DisplayName>Base Windows XNA Application</DisplayName>
<Description>Base Windows XNA Application that can be used to create new Projects</Description>
<FileContentType>VSTemplate</FileContentType>
<ContentVersion>1.0</ContentVersion>
<Attributes>
<Attribute name="TemplateType" value="Project"></Attribute>
<Attribute name="ProjectType" value="Visual C#"></Attribute>
<Attribute name="ProjectSubType" value=""></Attribute>
</Attributes>
</Content>
</VSContent>

With the files that we now have (BaseXNAApplication.zip and BaseXNAApplication.vscontent) we can now put together the Kit. The first step is to create an empty archive/Zip file. In windows XP just right click in the working folder and select new->compressed folder and call it “temp.zip”. Next add the two files that we have created to this compressed file. We need to make sure that the files we add are at the root folder inside the compressed file; if not the starter kit will fail and not work like we want it to. With the files inside the compressed file we now need to rename the compressed file so it is the same as the template file stored inside, rename it to “BaseXNAApplication.zip”.

Almost Done, The last step is to rename the zip file that we have just created and call it “BaseXNAApplication.vsi”…. If all has been done right we should now be able to double click on the vsi file and the Visual Studio Installer will take over and install the Starter Kit.

Cross Post from Virtual Realm - Mykre's Space
Posted: Sat, Dec 23 2006 15:51 by Glenn Wilson | with no comments
Filed under: ,
xna3way

I do not know how this one slipped under..... but after a small post on Jason's Blog about an animation framework for XNA I was lead to this.

Here is one of the Introduction Quotes from Jason's Blog:

"A few months ago, 3ofus got together and decided to form a team of game developers. Each of us bringing our own specific talents to create something greater than the sum of its parts. We're like a superteam of game developer friends... the superfriends of XNA, if you will."

This site looks like it could lead to a really good resource for tools and information on XNA, one of the projects that the site will include is Paradox.

"The really great part is that we've been working on some truly amazing stuff. One of those amazing things is Paradox.

Paradox (par·a·dox) -noun:
1. an apparently true statement or group of statements that leads to a contradiction or a situation which defies intuition.
2. A truly badass RPG built by the aforementioned superfriends using XNA, Game Studio Express & C#.
3. All of the above. "

Go and have a look and give the guys all the support they need.

Link to xna3way

Cross Post from Virtual Realm - Mykre's Space
Tutorial 01 - XNA Your First Windows Game

Getting Started with the Base Application

Getting Started with XNA and your first Windows Game is really easy; the first stage is to download the Visual Studio C# Express IDE, XNA Game Studio Express, and any service pack releases. Once this has been done and installed you are ready to roll.

XNA Development Center on MSDN

XNA Game Studio Express Home Page

Visual Studio C# Express Download Page

With most programming languages and Systems you generally have to start at the beginning, well it is the same with XNA and Game Studio Express. In the case of XNA your first application is just a Base Windows Game that runs and displays a cornflower blue screen.

Start your project by opening up the Game Studio Express IDE system and select the windows Game Project. Make sure that when you do this that you change the path to a location where you would store your projects, as well as changing the name of the project to something that relates to the project at hand. For the purpose of this article and the next few call the project BaseWindowsGame.

When the IDE has finished working you will be presented with the Base Application Framework that you will use for all of your projects moving forward. To execute, compile or run the project you can either press the Green play button from the main toolbar, press the F5 key or select Start Debugging from the Debug menu. Doing this will compile your application into Debug mode, if you have finished debugging and want to release the project you should make sure that you compile or build your application in release mode.

At this point the Application is finished, but what I will do now is go through some of the basic changes that can be made to this base application.

Changing the Windows Title

When the default application starts the Windows Title for the form is automatically set to the Programs Name. To change this add the following line of code to the Constructor for the main game class.

this.Window.Title = "Application Title";

Turning the Mouse on

The base or Default behavier for the mouse in an XNA Game Studio Express Application is to have the default mouse cursor invisable. To turn the mouse on and make the cursor visable you need to add the following line of code to the game constructor.

this.IsMouseVisible = true;

Creating a Way Out

When you install and configure the Base Application, the system is configured to allow the game to exit by pressing the Back key on the Xbox 360 Controller. But what if you do not have a controller?

Here are some simple instructions on how to add some basic Keyboard support and have the Application exit when the Escape Key is pressed. I have also left the Controller code in so that the system can be used with both interfaces.

Note that some the information here has been adapted from the XNA Documentation that is included with the Game Studio Express Install.

To get started add the following line just after the creation of the Content and Graphics Device Managers.

KeyboardState oldState;

The next stage is to set up the initial state of the Keyboard, do this by adding the following line of code the games constructor.

oldState = Keyboard.GetState();

The Last step is to change the update code so that we can detect the Escape Key pressed and exit the application. Change the Update call in the application so that it now has the following code instead of the normal call to the Controller State.

KeyboardState newState = Keyboard.GetState();

// Allows the default game to exit on Xbox 360 and Windows

if ((GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed) || (newState.IsKeyDown(Keys.Escape)))

{

this.Exit();

}

oldState = newState;

Any way that is it for now. I will be trying to post more over the next few days, hope this helps someone….

Cross Post from Virtual Realm - Mykre's Space
Posted: Fri, Dec 22 2006 8:57 by Glenn Wilson | with no comments
Filed under: ,
Royalty Free Audio and Images

For the Game developers out there who are looking for some royalty free audio and images have a look at the following links... These will get you started...

Cross Post from Virtual Realm - Mykre's Space
Posted: Sun, Dec 17 2006 10:34 by Glenn Wilson | with no comments
Filed under: ,
Blender 3D videos - From DME

Here is a link to some Blender basics Videos, this will help new starters to get used to the Interface and how to use the basic functions.

Link to DME Program Lectures & Resources - Blender 3D videos

Direct Link to the Video Tutorials, there are also some more tutorials on other Media Products.

Cross Post from Virtual Realm - Mykre's Space
Posted: Sun, Dec 17 2006 10:23 by Glenn Wilson | with no comments
Filed under:
Using Blender with XNA

Over the last few years I have been playing with several diferent 3d packages, these have included 3D Studio Max, Lightwave, Maya, and Blender. The bad thing is that with my change of job I no longer have access to the commercial Packages and need to resort to Blender... Note that I do not think that this is the second choice and that I am making do with the free App... I Actually like using the package.

One thing that you will find with Blender is that the interface is a bit hard to get used to, so over the next few weeks to months I will also be starting to post content on Blender includng Tutorials, News, Tips and any other news I come across. What I am going to ask is if anyone has any links that they think are interesting please pass them on.

Cross Post from Virtual Realm - Mykre's Space
Posted: Sun, Dec 17 2006 9:38 by Glenn Wilson | with no comments
Filed under:
XNA Tutorials: Riemers Series 2 Updated

 Riemer has finished converting his second series of tutorials over to the final release code, this series is on a simple flight sim.

"Welcome to this second series of XNA for C# Tutorials! In the first series, you learned some basic features of XNA. This list of features will be further expanded in this series, so after completing this series you'll have created your own 3D game!!
In this second series of XNA for C# Tutorials, you'll learn how to create a complete flight simulator. This will include flying your aircraft in a true 3D city and firing bullets at objects!
Again, the main goal of this series is to cover XNA features. This means the physical flight model will not contain gravity influences, it just let's you manoeuvre your aircraft."

Link to XNA Tutorial using C# > Series 2: Flightsim

Cross Post from Virtual Realm - Mykre's Space
Posted: Thu, Dec 14 2006 8:25 by Glenn Wilson | with no comments
Filed under: ,
XBLA: Arcade: Assault Heroes

Assault Hero's Released on Live Arcade, I'm Off to Download....

"Name: Assault Heroes
Price: 800 points
Available in: All Xbox Live regions
Dash Details: Single Player, Xbox Live Multiplayer 1-2, 5.1 Surround Sound, HD (High Definition). Buy Assault Heroes - the ultimate arcade shooter! Destroy an underground lab filled with deadly contents. Blast your way through enemy-infested territory. Take out choppers, boats, tanks, and monstrous weapons of doom with your heavily armed 4x4 and speedboat. Battle alone or with a comrade in online co-op. Buy the full game now and unlock guaranteed nonstop action!"

http://www.assaultheroesgame.com/

Link to Xbox Live's Major Nelson : Arcade: Assault Heroes

Cross Post from Virtual Realm - Mykre's Space
Coding4Fun - Converting Tiny Tennis to XNA

In this new Article on Coding4Fun The Zman takes us through converting the Tiny Tennis Application to XNA. In this first Part you go through getting the basic system to run on the PC, in future parts The Zman will go through getting it to run on the Xbox 360 as well as adding more Detail.

Link to: Building Tiny Tennis Using XNA

Cross Post from Virtual Realm - Mykre's Space
GarageGames Releases TorqueX Open Beta

With the Release of the XNA Game Studio Express, Garage Games have also opened up the TorqueX Engine to the Public...

"We are calling this our "Open Beta" of Torque X. One reason we're doing this is we want a bit more time to bang on the engine and improve the functionality between the TGB editors and Torque X before we officially call it 1.0. So, feel free to give us feedback in the Torque X open forums. On the other hand, what we have now is pretty cool, and we didn't want to just sit on it since XNA is launched today. So, currently the TGB Editors and Torque X features only support 2D games. 3D support is in the works, but is not available with this release. Also, we are not quite ready to release the source to the engine, so Torque X Pro is not yet available for purchase.", GarageGames

Link to Products : Torque : X :. GarageGames

Cross Post from Virtual Realm - Mykre's Space
Posted: Tue, Dec 12 2006 22:35 by Glenn Wilson | with no comments
Filed under: ,
Assault Heroes for Xbox Live Arcade

Reading through the normal Blogs this evening I came across a post on Duncan's Blog.... I was surprised that Major hadn't posted about this (Or did I miss it).

This is more then likely going to be my Next Xbox Live Arcade purchase... Looks Like Fun. http://www.assaultheroesgame.com/

Link to Assault Heroes for Xbox Live Arcade | Duncan Mackenzie .Net

Cross Post from Virtual Realm - Mykre's Space
Posted: Tue, Dec 12 2006 21:59 by Glenn Wilson | with no comments
Filed under:
Microsoft XNA Game Studio Express 1.0 Released

XNA Game Studio Express has Finally been released to the public.... Now I know that I am probably early... :)

"XNA Game Studio Express enables hobbyists, academics, and small, independent game developers to easily create video games for Windows and the Xbox 360 console using new, optimized cross-platform gaming libraries based on .NET. This official release enables the creation of games for Windows XP SP2-based PCs. Combined with an active membership in the XNA Creators Club (available from Xbox Live Marketplace), you can also create, debug, and play games on your Xbox 360 console."

Link to Download details: Microsoft XNA Game Studio Express 1.0

Remember to post your questions on the Game Studio Express system Here, If you have any general questions on the XNA Framework you should post them Here.

When installing the product please make sure that you remove any previous versions of the XNA Framework or Game Studio Express.

XNA Framework Redistributable also available.

"The XNA Framework redistributable provides the necessary runtime components to execute a game on Windows that was developed using Microsoft XNA Game Studio Express 1.0. Installation of this runtime is not necessary on systems that already have Microsoft XNA Game Studio Express 1.0 installed.
The End User License Agreement (EULA) for Microsoft XNA Game Studio Express 1.0 covers the terms under which developers may use the Redistributable. For full details, please review the Microsoft XNA Game Studio Express 1.0 EULA.
The runtime components in the XNA Framework Redistributable require .NET Framework 2.0 and the latest version of the DirectX 9 runtime."

Cross Post from Virtual Realm - Mykre's Space
Posted: Mon, Dec 11 2006 22:28 by Glenn Wilson | with no comments
Filed under: ,
XNA Game Development Tutorials :: The Ramblings of a Hazy Mind

Michael Schuld has been working with the Managed DirectX Scene for a while, developing a 3d engine and documenting how he was doing it. Now he has also started to work with XNA doing the same thing. At the moment there are articles on the normal getting started as well as Skyboxes and displaying models on the screen. 

Link to XNA Game Development Tutorials :: The Ramblings of a Hazy Mind

Cross Post from Virtual Realm - Mykre's Space
XNA Podcast: XNA Strands Episode One

The first XNA Podcast has been released by Daniel Crenna. The first Ep is just a small introduction to Sprites, Scalars and Vectors.

Link to More Than I Can Chew: Episode One: Scalars, Vectors, and Sprites

Here is a link to the transcript of the Podcast, and here is some supporting material.

Cross Post from Virtual Realm - Mykre's Space
Comming Soon XNA

It is only a day before the first release of the XNA Framework and Game Studio Express, but for the time being you can cathch up on the final release of the Documentation on MSDN.

Remember to keep your readers targeted on the XNA Teams Blog for More news on the Release.

Link to Michael Klucher's XNA Blog : Big Weekend for Me

Cross Post from Virtual Realm - Mykre's Space
Custom Mouse Pointer in XNA

One of my early game components was a Mouse input system that used a custom mouse pointer, I have now converted the code to use the beta 2 system. What I thought I would do is go through the process here in a small tutorial.

To start the project just fire up the GSE (Game Studio Express) System and start a new Windows Game Project. Before we go on I just wanted to mention that this will only work on a windows based system as the XBox 360 does not have support for a mouse...

With the application started and running the first step is to add the variables that the rest of the application will be using.

        private Texture2D mousePointer;
        private SpriteBatch mainSpriteBatch;

        private Vector2 mousePosition;
        private MouseState mouseState;

Add the above code to the game1.cs file just under the declaration of the Device and Content manager. Next we need to load the content that the application will be using, as well as setting up the Sprite Batch.

        // Set up the main Sprite Batch for the Application
        this.mainSpriteBatch = new SpriteBatch(this.graphics.GraphicsDevice);
        // Load the pointer into the application
        this.mousePointer = content.Load<Texture2D>("content\\Arrow");

You will also need to make sure that at this moment you have added the content/Sprite that you would like to use for your Mouse Pointer. With the content now loaded we first need to update the mouse pointer so that it knows the correct position and such, Add the following lines to the Update call in your application.

       // Update the Mouse
       // Note that the Mouse can only be used in the windows System, it
       // will not work when the application is compiled for the Xbox.
       this.UpdateMouse();

 Here is the function that Updates the Mouse Information.

        private void UpdateMouse()
        {
            this.mouseState = Mouse.GetState();
            this.mousePosition.X = this.mouseState.X;
            this.mousePosition.Y = this.mouseState.Y;

            // Restrict the Mouse so that it stays inside the current display
            if (this.mousePosition.X < 0)
                this.mousePosition.X = 0;
            if (this.mousePosition.X > this.Window.ClientBounds.Width)
                this.mousePosition.X = this.Window.ClientBounds.Width;
            if (this.mousePosition.Y < 0)
                this.mousePosition.Y = 0;
            if (this.mousePosition.Y > this.Window.ClientBounds.Height)
                this.mousePosition.Y = this.Window.ClientBounds.Height;
        }

Add the above code to the end of the application. The last step that we need to do is to actually draw the pointer on the device/screen. Add the following section of code to the draw code in your application.

       // TODO: Add your drawing code here
       this.mainSpriteBatch.Begin(SpriteBlendMode.AlphaBlend);
       this.mainSpriteBatch.Draw(this.mousePointer, this.mousePosition, Color.White);
       this.mainSpriteBatch.End();

Now you should have a simple Custom Mouse Pointer that can be used in your applications, for those who are interested I will post the complete solution in the files section of www.virtualrealm.com.au over the next few days.

Cross Post from Virtual Realm - Mykre's Space
Posted: Mon, Dec 4 2006 14:42 by Glenn Wilson | with 1 comment(s)
Filed under: ,
Getting Started with PowerShell
With the release of the new 2007 products (Exchange and Share Point) we were also given PowerShell.

Windows PowerShell is a new Windows command-line shell designed especially for system administrators. The shell includes an interactive prompt and a scripting environment that can be used independently or in Combination.

From the Windows PowerShell Getting Started Guide.

So over the weekend while I was playing with Vista, I also started to look at the PowerShell and what I could do with it. The first step was to download the product and install it, this when without a hitch, next was to print out the documentation and have a read. When starting I was getting the hang of using the command line scripts and what they could be used for... Note that you should get used to the Help commands, "Get-Help", they can get you out of trouble.

But what I really wanted to work out was how to run the scripts that I had collected over the weekend. One thing that I did find out is that the scripting system is basically turned off by default and you need to turn it on. To turn it on you need to change the "Signing and Execution Policies" (You can find information about this by running the "Get-Help About_Signing" command from the PowerShell Prompt.

Use the following command to change the Policy so that you can run scripts, "Set-ExecutionPolicy RemoteSigned" from the PowerShell prompt. Note that I have only done this on my local machine for testing, I have not looked into the full security of the command so I do not know what it will open up. When I find out more I will post.

The next thing that I wanted to do was to add my scripts path to my machines path. In power shell this can be done in several ways, after searching the newsgroups I found 2 methods and each has it's own benefits.

The first command - $env:path += "c:\PowerShell\scripts", will add the path to the current session of the console. Once the console is closed the path will be lost, this can be set in your PowerShell profile so that it will be added each time you start the profile.

The second command - [environment]::SetEnvironmentVariable('path',"$env:Path;c:\PowerShell\scripts",'Machine'), will add the path to the machine and make it permanent.

Anyway that's it for the moment, I will be posting more on my PowerShell travels as I move forward and learn, but for now here are some of the links and resources that I have been using as references.

PowerShell Links and Resources

I will continue to add to the list as I find more, if anyone has any other links or resources for PowerShell please pass them on.

Cross Post from Virtual Realm - Mykre's Space
More Posts Next page »