Archive

Archive for the ‘XNA’ Category

The impact of Xbox LIVE community games

February 22, 2008 1 comment

Revolutiooooon! Microsoft announced the great plan in GDC. In the near future, we will be able to share games that are developed in XNA through XBOX live that is a kind of social networks. Developers of creators club register their games. And, other creators check those games and report bugs and issues. After then, games are downloadable for the world. Users can download games and reviews those, like YouTube. I don’t like Microsoft, but I pay due respect for their achievements at games.

I have to thank my parents. If I am younger and meet XBOX + XNA at school days, I might be engrossed in programing without going school.

Microsoft does really great works. They will change life of many many people. That’s “revolution” and dawn of a new era. Many net developers had felt new era by 2.0 at once. We’re feeling new era now! I can understand “2.0″. That’s exciting!

(However, please buy also PS3, because I belong to PS3 title development. PS3 is not open for game development, but “sexy” console very much!)

I’ll release the Script Engine as open source license in the near future. If XNA creators use my library as middleware, I’ll be glad.

Categories: XNA

Namespace List of XBOX .Net compact framework

February 11, 2008 Leave a comment

The following is namespace list of .NET compact framework that we can use in XBOX. The list is not on the help for some reason.

  • System
  • System.CodeDom.Compiler
  • System.Collections
  • System.Collections.Generic
  • System.Collections.ObjectModel
  • System.Collections.Specialized
  • System.ComponentModel
  • System.Configuration.Assemblies
  • System.Diagnostics
  • System.Diagnostics.CodeAnalysis
  • System.Globalization
  • System.IO
  • System.Net
  • System.Reflection
  • System.Resources
  • System.Runtime.CompilerServices
  • System.Runtime.InteropServices
  • System.Runtime.Serialization
  • System.Security
  • System.Security.Permissions
  • System.Security.Policy
  • System.Text
  • System.Text.RegularExpressions
  • System.Threading
  • System.Xml
  • System.Xml.Schema
  • System.Xml.Serialization
  • System.Xml.XPath
  • System.Xml.Xsl

System.Runtime.Serialization is available, so we can use memory alignment. :)

BTW, I found the list in MSDN, but it is bad page because MSDN show two panes for Japan users. Do you know that MSDN shows a bad page like this to a part of users?

MSDN supplies excellent documents, but that’s bad looks and tricky to use. The left window shows an original content written in English. The right window shows translated content by machine for Japanese. Of course, translated contents are poor quality because a machine translation is used. And, that’s slow! It takes twice time to translate contents.

It’s sure that I am not good at English, but I don’t want to see such a bad page. :(

Categories: XNA

Is XNA heavy?

February 5, 2008 Leave a comment

XNA may be more heavy than ManagedDirectX. It seems that XNA is too heavy on especially XBOX360 that is one of the best features of XNA. I went to Microsoft Gamefest Japan 2007 last year. In the XNA session, the speaker explained problems of JIT compiler and how to optimize code. I was surprised that those Tips were like old time of C. You may read the details of the session from somewhere. Anyway, the current JIT compiler is not good, so Microsoft keeps their efforts to improve the compiler.

Microsoft imagines the future that developers write programs in C# and inline C/C++. The speaker of Microsoft said: old days, we wrote all programs in assembly. Next, we wrote it in C/C++ and inline assembly. And now, we don’t use assembly.

However, the reason why we don’t use assembly now is that the CPU pipeline of PLAYSTATION3 and XBOX360 is too long, so it’s impossible to optimize code in assembly. In a word, the cause is the hardware architecture. So even if we don’t use assembly now, we will not always stop using C.

Microsoft admitted that it’s impossible to develop retail titles on XBOX360 with C#, because such a title can not pass Microsoft’s quality check. We are still on such a stage.

Categories: XNA

The Embedded Script Language for XNA

January 29, 2008 3 comments

I’ve been developing an Embedded Script Language for XNA these days. XNA provides easy video game development environment for our freetime projects, but there are few libraries for C# game development. Especially, I wanted an embeded script language like Lua and other improved languages. If we are in .NET framework, many script languages are available for C#, but I need ‘embedded’ script language in .NET ‘compact’ framework of XNA. The language has to be executable on the Xbox360 edition of XNA. In a word, I had to develop it myself.

The VM of the embedded script language executes byte-code compiled on Contents-Pipeline and delegates a garbage collection feature to the .NET compact framework. The following is the specs that I think the language should implement:

  • Calls the script functions from C#.
  • Calls the C# methods from the script.
  • Uses virtual threads.
  • Supports STATE for FSM.
  • Compiles source to BYTE-CODE on CONTETNT-PIPELINE.

I’ve finished the basic part of my script language as the prototype. And, I sent the prototype to my friend. At the beginning, I didn’t wish to delegate the garbage collection feature of my VM to .NET, but I decided that it’s nonsense to develop independent memory allocator for independent garbage collection on .NET, because all of collected garbages is not deleted immediately. That’s just double action.

Categories: XNA

Power of Two Games; Is that XNA company?

April 13, 2007 Leave a comment

The author in “Games from within” has started new company “Power of Two Games“. I’m surprised at his comapny. His company staff number is only two! And, why do they work in such narrow space…??

But, this is interesting news for us. He said about his dream before. Perhaps he and his co-worker try to develop games by XNA. He has tried to introduce Test-Driven-Development & Refactoring. On those categories, C# is excellent than C++. He said the same thing in fact in that entry.

Categories: XNA

XNA like C++ wrapper

April 11, 2007 Leave a comment

 

I has developed Buddha which is C# simple scene graph library for a long time. But, since XNA was released, I have to change this project for XNA. I already have rewritten many code…

And now, I’m challenging to develop C++ wrapper for XNA users. That’s BuddhaCpp. But, perhaps, Microsoft is developing the same library as BuddhaCpp’s concept…

Buddha series is BSD licence and is development on sourceforge.jp. I don’t have stored BuddhaXNA code on sourceforge, yet. But, BuddhaCpp is still first status, and is stored on sourceforge.

It will be possible to program with XNA feeling. For example;

 

VertexBuffer* pVB = NULL;
pVB = new VertexBuffer(mGraphic->GetGraphicDevice(),
3 * sizeof(CUSTOMVERTEX),
D3DFVF_CUSTOMVERTEX,
ResourceUsage::None,
ResourceManagementMode::Automatic);

pVB->SetData(Vertices, sizeof(Vertices));

Drawing case:

void YourGame::Draw(GameTime gameTime)
{
….
mGraphic->GetGraphicDevice()->DrawPrimitive(
PrimitiveType::TriangleList, 0, 1);
….
}

Wow, XNA like….!? :D

 

Well, I hope to move Buddha project to sourceforge.net or CodePlex. But, Buddha is religious name. Because, we, Japanese people are irreligionist. We live by animism. Therefore, we feel the great spec from “Buddha” which is the great existence of Buddhism. But, Buddha is the avatar of Vishnu. This name should not be used to a name of software. I have to think a new name before I move the project to the international world.

Categories: Game Engine, XNA Tags:

Scamped shader for Terrain

April 6, 2007 Leave a comment

This scamped shader doesn’t work well for a terrain having steep grades. But, because the shader works in only shader, it’s possible to use for a model which XNA doesn’t allow to access vertex buffers. (It’s impossible to access buffers with the GetData method, because buffers of auto managed models are readonly)

1) Prepares your terrain model having no steep grades.

2) Prepares the shade which takes POSITION.xz for TEXCOORD0.uv. The most simply example;

VS_OUTPUT Transform(
  float4 vPos : POSITION,
  float2 vTexCoord0 : TEXCOORD0 )
  {
    VS_OUTPUT Output; 
    
    Output.Position = mul(vPos, WorldViewProj);
    Output.TextureUV = vPos.xz * TexScale;
    
    return Output;
  }

You may add your effects to this.

You may change a effect of a model on your program directy, if you don’t want to make the special custom pipe-line.

This shader is helpful for prototype. Download sample.

Categories: XNA

Simple Components

March 24, 2007 Leave a comment

XNA Framework provides the simple task mechanism whose name is “GameComponent”. I did not understand the concept of this class at first. GameComponent is very simple and is not better than various task systems that I have seen. I thought that this class is just utility class for beginners.

But, now, I understand the merit of this class design a little.

The GameComponent has only minimum methods — Initialize, LoadResouce, UnloadResouce, Update, Draw, Dispose and some events… These methods are fundamental process that all classes need. So, sub-classes of GameComponent are always exportable for other projects.

When a developer defines exchangable components, he tries to write helpful mechanism for rapid development. But, a class having many methods needs discussions, because it has extra features which are not must to exchange.

A class which is pure for its goal does not have extra methods, even if it looks poor.

Categories: XNA

Blender Plug-in Patch for XNA Animation Component Library

March 23, 2007 14 comments

I noticed that Blender DirectX Exporter is impossible to export models correctly in some cases. And so, I patched the default Blender exporter plugin quickly. Download from here.

The default exporter doesn’t handle the plural root frames. So if a model has IK bones which don’t have a parent, the exporter chooses the last object of the armature as the root frame. By that, important bones having actual vertexes are not exported in some cases. These cases raise Exception Error in the ModelAnimator constructor, because the model doesn’t have bones which are specified by skinmesh tags.

I patched two points to use exported model in XNA quickly.

  • This script names AnimationSet “AnimationSet0″.
  • Remove IK bones from root objects

When the model has the plural objects in the armature object, the original of this script chooses the last object as the root. Under this spec, you may be unable to export your model having IK bones which don’t have a parent. This customized script removes objects which contain “IK_” in their name from root object candidates.

I pay a respect to Arben OMARI’s great works. Thank you very much!

How to install
  • Calls this script directly on Blender.
  • Or, put this script to your Blender’s script directory.
How to use

You may use this script as well as the original script.

  1. Active “Anim”.
  2. Active “Swap zy” to get Y-axis up.
  3. Inactive “Flip z” to
  4. Active “Speed”
  5. Let’s Export!

Categories: XNA

Animation Component Library 1.0.1.0 Beta

March 23, 2007 Leave a comment

I exchanged 1.0.5 in my free-time project with 1.0.1.0 Beta. That has many changes. But, all tutorials already have been changed for the latest spec, so it’s easy to adjust my code.

At first, an unity class FiniteStateMachine has been removed. This is a very simple abstract class, so I prepared my class instead of it easily.

Next, BonePose.CurrentAnimation member was renamed to CurrentController. Also CurrentBlendAnimation was renamed to CurrentBlendController. It’s possible to replace them by replace command of VS.

Lastly, AnimationEventHandler‘s sigunature has been changed from AnimationEventHandler(AnimationController sender) to AnimationEventHandler(object sender, EventArgs e). See this.

Categories: XNA
Follow

Get every new post delivered to your Inbox.

Join 54 other followers