September 2006 - Posts
An new project has been Started on CodePlex called XGameInput, this component is a small component the uses all of the main input functions for XNA and drops them into one common component. Here is the link to the CodePlex Project page.
"What is it ?
XGameInput is a GameComponent for the XNA framework that provides the programmer with
a single point of access to user control input via a XBox 360 gamepad, keyboard or mouse.
How does it work ?
The component is partially based on the gamepad helper files provided by Microsoft as
part of the SpaceWars starter kit but with the addition of mouse and keyboard support.
The component allows the user to create named control inputs and assign these named
inputs to a control source."
For more information drop over to the CodePlex page and check it out.
Cross Post from
Virtual Realm - Mykre's Space
A couple of community Members have started an XNA Wiki Project and have asked for community support and content to help the resource grow. Here is the link to the request on the MSDN XNA Forums Site.
"Me and a few friends have started a XNA Wiki project for the community...please stop by and contribute any expertise you can lend to make this a good source for the community for quick reference to everything from theories, to simple and easy to understand documentation on XNA. We're hard at work this week expanding the XNA section. If you have a XNA tutorial or community website, please be sure to drop a link off on the page too!"
For those who are interested here is the link to the New Wiki Site.
Cross Post from
Virtual Realm - Mykre's Space
Looking over the posts and samples for the XNA System, it seems to be that everyone is doing a version of Pong... So I thought that I would give it a go.

At the moment the code is ruff and only the base fuctions are there, bt it does work and it is complete. Over the next few days I will try to fix it up and add some of my own thoughts to the program. For the moment all I leave you with is the screen shot and some of the things I am going to add.
Todo
- Add the ability for the user to use the Keyboard and Controllers
- Change the graphics...
- Add game states so that you have a start, playing, and end states... maybe more.
- Add sound.
Cross Post from
Virtual Realm - Mykre's Space
"The MDX 2.0 beta libraries will cease to function after October 5th, 2006. That's 15 days from now.", David Weller...
David Weller has made a post today which details the furtue of Managed DirectX 2.0. Thos who are currently using the system and have products that they plan to release that use the MDX2 system really need to read this post. Note that the Managed DirectX 2.0 system is and allways has been only a beta release and should not be used for systems or applications that are planned for production.
Options Moving Forward... from Davids Blog post,
- Revert your MDX 2.0 dependencies back to MDX 1.1. This is by-far the easiest approach, and the MDX 1.1 libraries aren't going to "disappear" for a long time. In addition, they work just fine with the .NET 2.0 runtime (many people thought that you needed to migrate to MDX 2.0 in order to run in the .NET 2.0 runtime, but that was nowhere near the truth).
- Migrate your application to the XNA Framework, using the handy migration guide published by Rick Hoskinson (Caveat: It's aimed at MDX 1.1, so there's some jiggling you have to do)
For those that are going to start converting their code please remember that you can always ask questions in the XNA Forums on the MSDN Site, The guys there are more then willing to help.
Cross Post from
Virtual Realm - Mykre's Space
This being friday evening with the wife out and the kids in Bed I have had a small ammount of time to play some more with the XNA Systems. With some of the projects that I am moving with I needed to have a basic UI System, so I have started to put one together. The first part was to get a mouse interface running. I know that in the furture if I did want to migrate my code for the Xbox 360 I would not be able to use the mouse. But for the moment this interface gives me the choice of developing on my Laptop when I can, and with the use of the component system I should then just be able to swap it out for the Controller Interface (Comming soon).
Now the code I have is pretty simple but I will be expanding on it, if others have some more ideas on it please post so that I can grow the interface component.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
using System; using System.Collections.Generic; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Audio; using Microsoft.Xna.Framework.Components; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; using Microsoft.Xna.Framework.Storage;
namespace MouseTest { public partial class MouseInterface : Microsoft.Xna.Framework.GameComponent { public MouseInterface() { InitializeComponent(); }
private Texture2D mousePointerTexture; private SpriteBatch uiSpriteBatch;
private Vector2 mousePosition;
public Vector2 MousePosition { get { return mousePosition; } set { mousePosition = value; } }
private string mousePointer;
public string MousePointer { get { return mousePointer; } set { mousePointer = value; } }
private ButtonState middleButton;
public ButtonState MiddleButton { get { return middleButton; } set { middleButton = value; } }
private ButtonState leftButton;
public ButtonState LeftButton { get { return leftButton; } set { leftButton = value; } }
private ButtonState rightButton;
public ButtonState RightButton { get { return rightButton; } set { rightButton = value; } } public override void Start() { // TODO: Add your start up code here this.LoadResources(); }
public override void Update() { // TODO: Add your update code here MouseState ms = Mouse.GetState(); this.mousePosition = new Vector2(ms.X, ms.Y);
this.leftButton = ms.LeftButton; this.rightButton = ms.RightButton; this.middleButton = ms.MiddleButton; }
public override void Draw() { // TODO: Add your drawing code here // Draw the UI Components. this.uiSpriteBatch.Begin(SpriteBlendMode.AlphaBlend); this.uiSpriteBatch.Draw(this.mousePointerTexture, this.mousePosition, Color.White); this.uiSpriteBatch.End();
}
protected virtual void LoadResources() { this.mousePointerTexture = Texture2D.FromFile(((GraphicsComponent)Game.GameComponents[0]).GraphicsDevice, this.mousePointer); this.uiSpriteBatch = new SpriteBatch(((GraphicsComponent)Game.GameComponents[0]).GraphicsDevice); }
} } |
For those using it you should see how it works... Just drop it on assign the filename to the Mouse pointer in the component, and you are off.
Cross Post from
Virtual Realm - Mykre's Space
I remember sitting down in front of my Commodore 64 waiting for the tape to load.... watching those flashing lines going up and down the screen while it loads. Over the last week it sort of felt like that again, but it's here.
"Scramble" has been released on the Xbox Live Arcade for 400 points.
Cross Post from
Virtual Realm - Mykre's Space
With the release of Lego Star Wars II in the next few days (Should get mine tommorrow), I can across this post. It talks about Downloadable Content from the Marketplace, I wonder how lng it will take to be made availible.
"Xbox 360 gamers will be able to download Star Wars prequel characters from Xbox Live Marketplace to feature in their Lego Star Wars II game when it is released in September."
Cross Post from
Virtual Realm - Mykre's Space
For those of you like me that were un able to make it to Gamefest this year, the Gamefest contant is now availible on the Microsoft Site. When downloading it please note that some of the files are large (@500mb) so I would watch you download limits and such.
For more information on the content have a look at this post on Lets Kill Dave.
Here are some of the Streams that I am interested in is...
Gamefest 2006: Casual Games Track
- Developing Games for Xbox Live Arcade
- Developing Web-Based Games for MSN Games
- Preparing Casual Games for Windows Vista
- Developing Casual Games for MSN Messenger
- Future Platforms and Opportunities for Casual Games
|
Gamefest 2006: Developer Tools: XNA and Visual Studio Track
- Working Smarter and Building Faster with Visual C++ 2005
- Managing Content Builds with XNA Build
- An Introduction to Agile Development
- Creating Games with the XNA Framework
- A Closer Look at the XNA Framework Content Pipeline
- Managing Content Builds with XNA Build
|
Cross Post from
Virtual Realm - Mykre's Space
I know that there is still a lot of buzz about the XNA Framework, but I was asked a small question on how to rotate a simple mesh with the Sample Framework that is included with the Managed DirectX System, so instead of just concentrating on XNA I thought I would post this.
The first step is to make sure that you have the empty project running from the latest SDK. Once this is done and working open the emptyproject.cs and add the following few lines of code directly after it.
// HUD Ui Control constants
private const int ToggleFullscreen = 1;
private const int ToggleReference = 3;
private const int ChangeDevice = 4;
Add this Code...
// Teapot Mesh
private Mesh teapotMesh = null;
private Material teapotMaterial;
Next you will need to ad the following few lines of code to the OnCreateDevice call, make sure you add the code to the end of the function.
// Create the teapot mesh
this.teapotMesh = Mesh.Teapot(e.Device);
this.teapotMaterial = new Material();
this.teapotMaterial.DiffuseColor = new ColorValue(1.0f, 1.0f, 1.0f, 1.0f);
To make sure that you can see the mesh we will need to add some light to the application. Add the following code block to the end of the OnResetDevice function.
// Setup Lights
e.Device.Lights[0].DiffuseColor = new ColorValue(1.0f, 1.0f, 1.0f, 1.0f);
e.Device.Lights[0].Direction = new Vector3(0, -1, 0);
e.Device.Lights[0].LightType = LightType.Directional;
e.Device.Lights[0].Enabled = true;
The last step is to actually render the Mesh to the Graphics Device, add the following code block to the OnFrameRender Call directly after the BeginSceneCalled=true is called.
device.Transform.View = camera.ViewMatrix;
device.Transform.Projection = camera.ProjectionMatrix;
device.Transform.World = Matrix.RotationX((float)appTime);
device.Material = this.teapotMaterial;
this.teapotMesh.DrawSubset(0);
If every thing has been done correctly you should now see a rotating Teapot in the centre of the screen. Also as we are using the Sample Framework you should also be able to use the built in movement functions of the model viewer camera that the empty project uses to move the camera around the scene. To do this hold the right mouse button down and move the mouse... You can also use the wheel of the mouse to move the camera back and forth.
Hope this helps...
Cross Post from
Virtual Realm - Mykre's Space
Starting on the 19th of Sep there is going to be a new program on ABC2 (Digital Only) and also available online, a program for Gaming that is based in Australia. The good thing about this is that it is actually on at a good time and not on at Midnight.
"Good Game will be jam-packed with the latest gaming news and events, top gaming tips, reviews, techniques to pimp and boost your machine, and interviews with game developers and the people behind the scenes.
Hosted by Junglist and Kapowski, Good Game is filmed in the Den of Gaming (DOG); a gamers' paradise fitted out with just about every gaming device ever invented. Junglist and Kapowski are supported each week by Dr Daneel, Good Game's technical wizard, and P_Nutz, the computer-hacking ape.
If you miss Good Game on ABC2, you'll find the show online as video on demand here at abc.net.au/goodgame.
Good Game is dedicated to giving gamers an intelligent and entertaining analysis of the game scene in Australia and around the world.
GOOD GAME Every Tuesday from 19 September at 8.30pm on ABC2. Repeated on Wednesday at 10.30pm and Friday at 1am
ABC2 is the ABC's digital-only, free-to-air channel."
Cross Post from
Virtual Realm - Mykre's Space
A lot of people were expecting to see Scamble on XBox Live this week. But as this post on GamerScoreBlog, and this on Major Nelson say, there have been some concerns and the release has been pushed back a week.
"A bit of bad news to report... Despite our best efforts, looks like we're going to miss shipping Scramble tomorrow as promised. During the final testing and certification of the title, we discovered some minor issues that should be addressed, so we're going to take an extra week and fix these items to ensure a high quality game experience for you when the title launches next Wednesday, September 13.", GamerScoreBlog.
I remember loading the tape into my Commodore 64 and waiting for this to load, I guess I can wait another week for the release....
Cross Post from
Virtual Realm - Mykre's Space
There is now a new deck for UNO on XBox Live arcade, this content is available in all regions for 100 points
Here is the original Post from Major Nelson.
Cross Post from
Virtual Realm - Mykre's Space
Doing my normal scan of the different Blog sites I visit I came across this little example. (Direct Link)
" Last week Microsoft released the first Beta of their XNA Game Studio, XNA Invaders is the result of around 5 hours of me mucking around with the code supplied in the help.
It’s a very basic example of a 2D looking 3D game using only line primitives in XNA, it’s got no sound because you need to down load another 300 odd meg of DirectX SDK to bring a wave file in and I figured not everyone would want to do that."

Cross Post from
Virtual Realm - Mykre's Space
For those starting out in the XNA and Audio systems there is a good basic tutorial that will get you started over at www.xbox360homebrew.com that will help you get started.
Here is the Direct Link to the Tutorial.
Cross Post from
Virtual Realm - Mykre's Space
Well I finally got to sit down and play with XNA. One of the things I have been doing a lot with MDX is playing around with 2D, so I thought a good start would be to play and convert the code that I already have. The first thing I needed to make the transfer was the ability to draw a static background for my Applications (In the future I will make it animated, but lets move in small steps).
For starters I started with the XNA Documentation and the First Game Example, this is just a simple bouncing sprite on a plain background. Next I wanted to use the features of the components as this background object would be used in more then one of my applications. To start with this I started to look at all of the code that was popping up all over the place and breaking down what was being done. For those who are interested if you drop over to the XNA Game Studio Express groups you will find lots of different small games being announced every day.
To get started with designing components I would suggest dropping over to the XNA Team Blog and download the Video that Mitch Walker has done on the Game Components. After watching this i thought I would finally give it a go, there is a good example of a spinner control in the video. So here is my code, it is a little ruff but I am going to tidy it up and present it properly later (I will be writing up a full Tutorial on what I am doing, and posting it on a new project we are working on)
Code Attached...
When working on this example though I did find a small problem with the component system. What I found is that there is no way to determine the order that the components are rendered onto the device/display. The only way you can control the order is to make sure that you add the controls in the order that you want them displayed. I found this out as I was going and following the examples, when you do follow the examples and start your application off by using the wizard you are presented with a draw call like the following...
protected override void Draw()
{
// Make sure we have a valid device
if (!graphics.EnsureDevice())
return;
graphics.GraphicsDevice.Clear(Color.CornflowerBlue);
graphics.GraphicsDevice.BeginScene();
// TODO: Add your drawing code here
// Let the Game Components draw
Draw Components();
graphics.GraphicsDevice.EndScene();
graphics.GraphicsDevice.Present();
}
The problem is that the section where you are advised to draw your objects happens before you render the components. In my example and code doing it this way would mean that my sprites are drawn first then the background is drawn over the top. For the moment to fix this I have swapped this around so that the draw components happens first and my custom drawing is done next. All I have to remember with this example is that I need to add my components in order and I should be right.
Over the next few days I will be working on a small post that will go through changing the base template so that these lines are swapped around, But for now I have posted this find in the feedback section for the XNA System.
** I need to remind every one that if you do find problems/bugs or have suggestions for the XN System and Game Studio Express you should post your comments to the feedback centre so that the XNA Teams can follow there progress. **

Cross Post from
Virtual Realm - Mykre's Space
The Guys over at XNA Spot have released another Tutorial for the XNA Framework and the Game Studio Express. From what I can see this is the first sort of complete game tutorial to be released. The tutorial is on the classic game of Pong.
XNA Spot Tutorial on Pong for XNA Framework and Game Studio Express
Cross Post from
Virtual Realm - Mykre's Space