Archive

Posts Tagged ‘XNA’

XNA Game Engine

December 6, 2009 azer89 Leave a comment

xna_logo

Commercial

Blade3D
Blade3D specializes in producing high-quality game content and reducing the cost of art production for leading game companies such as Electronic Arts, Activision Blizzard, and Eidos

Visual3D.net
Visual3D’s All-in-One Game Development Toolset enables rapid development of 3D interactive simulations, virtual worlds, and next generation games using C#, .NET and XNA

TorqueX
Looking to put your game on a console? Whether your console of choice is the Xbox 360, Nintendo Wii, or even the iPhone, TorquePowered.com has the engine for you.

SunBurn
Combining the latest lighting and rendering technology with a flexible and easy to use framework, SunBurn performs the heavy-lifting, letting you focus on your games.

Free/Open Source

Flat Red Ball
The FlatRedBall name is most commonly associated with the FlatRedBall Engine; however, FlatRedBall does not only create and distribute a game engine, but also a collection of original video games. Although there are two sides to FlatRedBall, each is closely related to the other

Qx
Ox is a mature 3D XNA game engine ready for use in your free or commercial project. It features a 3D scene system with a visual scene editor, a 2D gui system (also with its own editor), JigLibX physics, fully-integrated XNAnimation animation system, and C# game scripting system.

Quickstart 3D Game Engine
The QuickStart Engine is an engine designed to allow a programmer to get a 3D game started in XNA Game Studio as quick as possible. The QuickStart Engine is designed to make it easier to get a 3D XNA project off the ground, by taking care of the framework for you, like physics, animation, rendering, etc. Some of this is still lacking, but the point in having a community project is that anyone can pick it up and add to the engine, or optimize what is already there.

X-Engine
The X-Engine is a game engine built around Microsoft’s XNA project. It is designed to make implementation of many common tasks easy, as well as expand upon this with some more advanced features

BetaCell
BetaCell is a toolkit designed to aid computer graphics programmers to achieve their objectives by embracing DRY (don’t repeat yourself) code and offering an object oriented perspective with design patterns.

Thrust
Thrust is the framework for writing XNA games across the Windows, Xbox 360 and Zune platforms

Particle Engine

Mercury
Mercury Particle Engine is a multi-platform API which allows developers to add rich visual effects to their games. Implemented in C# and targeting the Microsoft XNA Framework, it is fully compatible with Windows and Xbox 360.

Physics Engine

Farseer
The Farseer Physics Engine is an easy to use 2D physics engine designed for Microsoft’s XNA and Silverlight platforms. The Farseer Physics Engine focuses on simplicity, useful features, and enabling the creation of fun, dynamic games.

JigLibX
JigLibX is a specially for XNA designed C# port of the Physic Engine “JigLib”

BulletX
BulletX is the first fully managed 3D physics engine, it supports Windows and XBox360 platforms

Categories: Game Programming, XNA Tags: ,

XNA – Transparent Effect

December 4, 2009 azer89 Leave a comment

xna_logo

If all you want to do is a 50% alpha, you can create that via a Vector4 in the color. The alpha float will be between 0 and 1 (0% and 100%) and you’d just use this color in your spritebatch while drawing the particle.

float alpha = .50f;
Color color = new Color(
    255,
    255,
    255,
    255 * (byte)alpha);

To rendering with transparent effect, example,  vertex with transparent alpha value or a .png image with transparent area, just add code below before effect.Begin() called

effect.GraphicsDevice.RenderState.AlphaBlendEnable = true;
effect.GraphicsDevice.RenderState.SourceBlend = Blend.SourceAlpha;
effect.GraphicsDevice.RenderState.DestinationBlend = Blend.InverseSourceAlpha;

In my example code, i will render some line, a transparent line. Befor rendering, i save some properties value of GraphicsDevice object, so i can restore it’s state after rendering

public void Draw(Matrix viewMatrix, Matrix projectionMatrix)
{
    bool alphaBlendEnable = basicEffect.GraphicsDevice.RenderState.AlphaBlendEnable;
    Blend sourceAlpha = basicEffect.GraphicsDevice.RenderState.SourceBlend;
    Blend inverseSourceAlpha = basicEffect.GraphicsDevice.RenderState.DestinationBlend;

    basicEffect.World = Matrix.Identity;
    basicEffect.View = viewMatrix;
    basicEffect.Projection = projectionMatrix;
    basicEffect.VertexColorEnabled = true;

    basicEffect.GraphicsDevice.RenderState.AlphaBlendEnable = true;
    basicEffect.GraphicsDevice.RenderState.SourceBlend = Blend.SourceAlpha;
    basicEffect.GraphicsDevice.RenderState.DestinationBlend = Blend.InverseSourceAlpha;

    basicEffect.Begin();

    foreach (EffectPass pass in basicEffect.CurrentTechnique.Passes)
    {
        pass.Begin();

        device.VertexDeclaration = vertDeclaration;
        device.DrawUserPrimitives<VertexPositionColor>(PrimitiveType.LineList, vertices, 0, vertices.Length / 2);

        pass.End();
    }
    basicEffect.End();

    basicEffect.GraphicsDevice.RenderState.AlphaBlendEnable = alphaBlendEnable;
    basicEffect.GraphicsDevice.RenderState.SourceBlend = sourceAlpha;
    basicEffect.GraphicsDevice.RenderState.DestinationBlend = inverseSourceAlpha;
}
Categories: C#, Game Programming, Programming, XNA Tags: , ,

XNA – Rotated Camera

December 1, 2009 azer89 Leave a comment

xna_logo

What’s a game or an interactive presentation without a way to move around? So in this tutorial, I’ll show you how to make a rotated camera. This is a simple class to make a camera that can rotating about a fixed point rather than origin point (0, 0, 0)

Keyboard Control :

KEY UP – for rotating up

KEY DOWN – for rotating down

KEY RIGHT – for rotating right

KEY LEFT – for rotating left

Note : for using this code in your application, do not forget to change camera position, camera target and camera up vector (as you needed)

Read more…

INVADERZ – My First XNA Game

December 1, 2009 azer89 Leave a comment

xna_logo

Game Title : INVADERZ

Genre : Shoot ‘em up

Type : Game 3D

Framework : XNA Game Studio 3.1

Tool :

-    Visual Studio 2008 Professional SP 1
-    SpriteFont 1.2


DOWNLOAD HERE

 

Judul Game     : INVADERZ

Genre              : Shoot ‘em up

Jenis                : Game 3D

Framework      : XNA Game Studio 3.1

Tool                 :

- Visual Studio 2008 Professional SP 1

SpriteFont 1.2

Categories: C#, Game Programming, Programming, XNA Tags: , , ,

XNA – TriangleStrip

August 9, 2009 azer89 Leave a comment

xna_logo

The idea behind TriangleStrips is that you should define each vertex only once. So for the first triangle, you have to define vertices 0,1 and 2. Now, for the next triangle, you only have to add vertex 3, XNA will always use the last 3 vertices to draw the triangle, so for the second triangle it uses vertices 1, 2 and 3, which is correct.

Untitled

Read more…

XNA – Quaternion

July 24, 2009 azer89 Leave a comment

xna_logo

The XNA Framework provides the Quaternion structure to represent and calculate the efficient rotation about a vector around a specified angle. Quaternions represent a rotation. Typically, they are used for smooth interpolation between two angles, and for avoiding the gimbal lock problem that can occur with euler angles.

A Quaternion is much like a Matrix, but can only store a rotation. Don’t let the name of this thing scare you away (for first time i hear it, i thinks it is a weird planet’s name :D ), although it’s very hard to understand mathematically (it makes my head blown away) a quaternion is VERY very easy to use.

Untitled

In this tutorial, we will create a simple example program using quaternion, we will draw a spacecraft and it would be flying through 3D world.

Read more…

XNA – Camera Rotation

July 19, 2009 azer89 Leave a comment

xna_logo

In this article, we will create a simple XNA program that load a 3D model, and rotating the camera around the model. In this example,  showing how to moving your camera position around the model. Camera target and camera up vector will remain same, what we need is to change camera position vector.

Untitled

Read more…

XNA – Using Effect

July 19, 2009 azer89 Leave a comment

xna_logo

The XNA Content Pipeline is pretty good. It implifies the process for importing and loading models, textures, and other content. Unfortunately, it is optimized for loading data, not code. Effect files are essentially code, so an alternative approach could provide additional benefits.

Like the XNA Content Pipeline, Effect Generator compiles your .fx files at build time, reducing game load times. Additionally, Effect Generator further simplifies run-time loading and effect parameterization.

Place your effect file in Content folder :

Untitled


We start by declaring an Effect:

Effect effect;


We’ll use the Content pipeline to load an instance of the Effect class:

effect = Content.Load<effect>("effects");


And render using the effect:

effect.CurrentTechnique = effect.Techniques["Pretransformed"];
effect.Begin();
foreach (EffectPass pass in effect.CurrentTechnique.Passes)
{
    pass.Begin();

    pass.End();
}
effect.End();

Read more…

XNA – Set Up Camera

July 18, 2009 azer89 1 comment

xna_logo

Before we render 3D world, we need set up camera. We do this by specifying the View and Projection matrices. Before rendering, both matrices are needed so the graphics card can correctly transform 3D world to 2D screen in our monitor.

Setting up camera in 3D world comes down to specifying two matrices. We can save the camera position and direction in a single matrix, which is called the View matrix. To create the View matrix, XNA needs to know the Position, Targer, and Up vector of camera. We can also save the view frustum, which is the part of the 3D world that is actually seen by the camera, in another matrix, which is called the Projection matrix.

Untitled

Read more…

Categories: C#, Programming, XNA Tags: , ,

XNA – Load 3D Model

July 11, 2009 azer89 Leave a comment

xna_logo

here’s the screenshot (click image for larger view):

one two

three four

five six

Read more…

Categories: C#, Programming, XNA Tags: , , ,