Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
XNA is a game framework by Microsoft that allows deployment for Windows, Windows Phone & Xbox 360.
12
votes
Accepted
How do I get the height of an XNA SpriteFont?
MeasureString() returns to you a Vector2 where the X is the width and Y is the height of the text.
Also the SpriteFont class has a LineSpacing member that gives you the height of a line, including te …
11
votes
Accepted
How do I enable higher FPS in XNA 4.0?
if Game.IsFixedTimeStep is true the update method will be called every 1/60 seconds
http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.game.isfixedtimestep.aspx
"The default value for I …
7
votes
What can I do to render generated 2D terrain in XNA?
You can create a Texture2D this way.
Texture2D Mountain = new Texture2D( GraphicsDevice, Width, Height);
Color[] PixelData = new Color[Width * Height];
Color colA,colB;
…
6
votes
XNA 4.0 problem Initializing Instanced Classes in for loop
Don't create a random generator in each call to the AddParticle() method.
It will return always the same value.
Also you may want to pass a different seed to the the generator each time you create i …
6
votes
Accepted
How can I fade something to clear instead of white?
If you work with premultiplied alpha, the default behaviour, you have to multiply the alpha....
public void Update()
{
color*= 0.95f;
position.X += 3;
if (color.A <= 10) isDead = tr …
6
votes
1
answer
599
views
Linking nodes algoritm for Visual Design
I'm developing an editor for my game, and now it's time to make a visual scripting system to let designer modify behaviours.
This video shows what i have done and the problem
to resolve the link b …
5
votes
Accepted
(XNA) Checking coordinates, directly vs List<Vector2> vs Dictionary<X, List<Y>>
bool[,] Rooms = new Rooms[Width, Height];
bool IsPositionAvalaible(int x, int y) { return !Rooms[x,y];}
bool SetPositionValue(int x, int y, bool Avalaible) { Rooms[x,y] = !Avalaible; }
5
votes
How do I make objects move along a path?
You need a list of points and a list of balloons
class Path
{
List<Vector2> Points;
float[] Lengths;
Vector2[] Directions;
void Build()
{
Lengths = new float[Points.Count-1];
…
5
votes
Accepted
elongate or scale limbs of a model in XNA
Xna offers you a Model class that let you access to the Bones, but you have to recalcultate the bone transform by yourself. …
4
votes
Problems using easing equations in C# XNA
This are the meanings:
t = TimeElapsed => Range[0, Duration]
b = InitialValue;
c = FinalValue - InitialValue;
d = Duration;
I have a similar code to this for every easing function:
…
4
votes
Accepted
List has no value after adding values in
You may have several problems:
A)
Using string for directions is not a good idea... because the string comparation is slow and case insensitive... is much better using an enumeration or integers.. …
4
votes
Different types of cubes
I think are doing over engineering the cubes...
it would be easier to use an enum, it is better because let's you indexing cube properties in arrays or sorting the cubes easily,
You don't need to …
4
votes
How can I create a resizeable 2D camera with parallax scrolling?
The X position of the background have to be calculated with the X position of the player and a speed factor.
Texture2D ParallaxTex;
Rectangle ParallaxBounds = graphics.Viewport.Bounds;
spriteBatc …
4
votes
Accepted
Debugging a custom content pipeline processor in XNA?
I think that you maybe need Visual Studio Professional or the .Net Framework SDK to use this solution... it was needed with the old XNA frameworks, now I'm not sure. …
3
votes
Accepted
How can I get a list of sprites which are being drawn in the current viewport using XNA?
You can check if the object's bounding is inside of the camera frustum.
you have the class BoundingFrustum that can manage intersections with BoundingBoxes or BoundingSpheres.