So I have a XNA application set up. The camera is in first person mode, and the user can move around using the keyboard and reposition the camera target with the mouse. I have been able to load 3D models fine, and they appear on screen no problem. Whenever I try to draw any primitive (textured or not), it does not show up anywhere on the...
I'm in a project to create a 3d game using XNA/C#, and the game will use a lot of 3d characters.
Looking at the current 3d games, in some they create near to hundreds of characters, what lead me to think that there are some good 3d character/model creator.
To narrow the sample, the game will have characters like the game "Grand Chase"...
I have a C# XNA game that I'd like to test on the 360. How do I do this, in terms of what I need to do to the Visual Studio project?
For instance, how can I define certain actions will only take place on an Xbox? Something like:
# if XBOX
// do stuff
# endif
...
I'm so close! I'm using the XNA Game State Management example found here and trying to modify how it handles input so I can delay the key/create an input buffer.
In GameplayScreen.cs I've declared a double called elapsedTime and set it equal to 0.
In the HandleInput method I've changed the Key.Right button press to:
if (keyboardState....
I currently have a game that takes in large images, easily bigger than 1MB, to serve as backgrounds. I know exactly when this transition is supposed to take place, so I made a loader class to handle loading these large images in the background, but when I load the images it still freezes the main thread where the drawing takes place. Sin...
What I am trying to do is use alpha blending in XNA to make part of a drawn texture transparent. So for instance, I clear the screen to some color, lets say Blue. Then I draw a texture that is red. Finally I draw a texture that is just a radial gradient from completely transparent in the center to completely black at the edge. What I wan...
If I have a sprite, how would I check collision between two points? For example, in a game I am making, I would like to draw multiple lines that my sprite collides against. I'm thinking that this is more flexible than other collision systems if I had a lot of platforms.
...
Please see attached picture to better understand my question
i have a matrix of cells of [JXI] ,
cell is square in shape with length "a"
my question is .. is there a way to use FOR loop to assign MIN,MAX coordinate to each cell
taking origin (0,0) at one corner
Thanks
i was trying following code but no success
int a ;
a = 1;
f...
I'm messing about with some stuff in XNA and am trying to move an object around asteroids-style in that you press left and right to rotate and up/down to go forwards and backwards in the direction you are pointing.
I've got the rotation of the sprite done, but i can't get the object to move in the direction you've pointed it, it always ...
Hi all,
I am still shiny new to XNA, so please forgive any stupid question and statements in this post (The added issue is that I am using Visual Studio 2010 with .Net 4.0 which also means very few examples exist out on the web - well, none that I could find easily):
I have two 2D objects in a "game" that I am using to learn more about ...
Hi there
I am pretty new to XNA & game dev and am stuck at ball reflection. My ball is reflecting once it hits the bat, but only in one angle, no matter which angle the bat is at.
Here's the code:
if (BallRect.Intersects(BatRect))
{
Vector2 NormBallVelocity = Ball.velocity;
NormBallVelocity.Normalize();
Norm...
Is there a eazy way or c# class to get 12 triangles of a cube
where, only (MIN,MAX) coordinates are known for the BoundingBox cube
i want to use PrimitiveType.TriangleList for rendering face of cube but dont know how to get
static indices array of 12 triangles which can be defined by , MIN ,MAX vertices of the cube .
I am using C# w...
The problem is that I can't select minimalization filter for Texture2D scaling. There is MinFilter
GraphicsDevice.SamplerStates[0].MinFilter
But it's not working. When I try to assign some filter it just changes back to the Linear.
Is there a way to implement my own filter or how to select one of the available?
...
I'm working on as small game for class and was wondering what is a easy way to handel level configuration files. Like object placements , names, etc.
I'm new to C# but fluent in Java, Ruby.
so XML? YML? text, serialized objects?
...
Hello.
My code is:
FileStream fs = new FileStream("ImageProcessing.fx", FileMode.Open,FileAccess.Read);
CompiledEffect compiledEffect = Effect.CompileEffectFromFile(fs, null, null, CompilerOptions.None, TargetPlatform.Windows);
fs.Close();
effect = new Effect(graphics.GraphicsDevice, compiledEffect.GetEffectCode...
I want to make a program that will involve some faces with various facial expressions. They will change from one facial expression to another based on their "mood" as influenced by user input. I know some java but I have done pretty much nothing with graphics. A friend tells me that it will be easier to do this in C# with XNA than to ...
I'm making an extension to the Vector2 class. In my main code, I can say
Vector2 v=new Vector2();
v.X=2;
But in my extension, I can't.
public static void SetToThree(this Vector2 vector)
{
vector.X=3;
}
v.SetToThree() doesn't change v.
When I go line by line through the code, in the extension vector's X direction is cha...
I'm trying to port some image interpolation algorithms into HLSL code, for now i got:
float2 texSize;
float scale;
int method;
sampler TextureSampler : register(s0);
float4 PixelShader(float4 color : COLOR0, float2 texCoord : TEXCOORD0) : COLOR0
{
float2 newTexSize = texSize * scale;
float4 tex2;
if(texCoord[0] * texSize[0] > ...
I have a a polygon class which stores a list of Microsoft.Xna.Framework.Vector2 as the vertices of the polygon. Once the polygon is created, I'd like other classes to be able to read the position of the vertices, but not change them.
I am currently exposing the vertices through this field:
/// <summary>
/// Gets the vertices stored for...
Hi. I'm following an XNA tutorial and have the following code for collision detecting (detecting when a bullet collides with a target). Basically I'm looking to increment a score variable to display the score to the screen without re-writing the whole program. No matter where I place it in this method it seems to start incrementing from ...