-1
votes
0answers
66 views

best app store owner, which deals with payoneer, to host and sell an XNA game [duplicate]

I have developped a XNA game, and I'd like to sell it. I'd like to know what is the best free way to put the game as online appstore ? I need an app store owner, which deals with payoneer Thank you ...
1
vote
1answer
75 views

Predicted target location [duplicate]

I'm having an issue with calculating the predicted linear angle a projectile needs to move in to intersect a moving enemy ship for my 2D game. I've tried following the document here, but what I've ...
1
vote
1answer
31 views

Predicted target location

I'm having an issue with calculating the predicted linear angle a projectile needs to move in to intersect a moving enemy ship for my 2D game. I've tried following the document here, but what I've ...
0
votes
3answers
153 views

How can I properly rotate a 2D vector in the “flipped” XNA client space?

In my 2d XNA game, because SpriteBatch treats world space as client space and has positive Y axis down and negative up, I've built my game's world space with that coordinate system too. However, I've ...
1
vote
1answer
198 views

How do I find two points at an angle on opposite sides of a circle?

With reference to my previous question: I'm using micklh's answer, which works perfectly. However, it calculates the gradient based on two points, a starting point and an ending point. I want to ...
1
vote
3answers
236 views

Code to generate a color gradient within a texture using a diagonal line

I want to generate a color gradient between two colors from x1,y1 to x2,y2. I'm unsure how to do this though. I can use Color.Lerp to get all of the color steps, but the problem is that I don't ...
1
vote
3answers
274 views

In a semi-infinite procedural (chunk based) map, how do you handle objects larger than a single chunk?

I'll use an example to try and be more specific. Assume this is for a 2D top-down game. Chunks in this are made up of 32x32 tiles. If procedural buildings were to be generated based on some kind of ...
0
votes
2answers
52 views

Percentages for different platform generation [duplicate]

I have a level manager, which creates levels and levels create platforms. Levels can contain a variety of platforms. I dont really understand how I can say: I want a 10% of one platform being ...
1
vote
1answer
114 views

Automatically zoom out the camera to show all players

I am building a game in XNA that takes place in a rectangular arena. The game is multiplayer and each player may go where they like within the arena. The camera is a perspective camera that looks ...
6
votes
2answers
534 views

Why does the order matter in multiplication of matrixes?

I stumbled on this question because I had the same problem with my camera, and changing the multiplication order worked. I ran into a similar problem when scaling a model. This code produced the ...
1
vote
2answers
313 views

Rotate around the centre of the screen

I want my camera to rotate around the centre of screen and I'm not sure how to achieve that. I have a rotation in the camera but I'm not sure what its rotating around. (I think it might be rotating ...
1
vote
2answers
150 views

Rotating sprite 180 deg

I should say first, that I have the rotation down. Its just that I want my square to rotate exactly 180 degrees. Currently, it will rotate but it will rotate but by less each jump. So after several ...
1
vote
5answers
1k views

how to rotate enemy to face player? [duplicate]

Okay so i havebeen rotating my enemy to face the player using float targetrotation = Math.Atan2(playerpos-enemypos); enemy.rotation = targetrotation; (<this line of code i want to change) This ...
3
votes
1answer
771 views

360+ degree rotation skips back to 0 degrees when using Math.Atan2(y, x)

I'm new to XNA and this is my first actual project, so forgive my noobness. I'm using jointAngle = System.Math.Atan2(RightStick.Y, RightStick.X); in order to set an angle of a joint (farseer) so ...
2
votes
1answer
363 views

Min/Max of two vectors?

This seems like a simple question, but i'm having trouble searching the internet for it. In XNA, during a collision detecting method, I would determin the minimum of some vectors. // Get the minimum ...
2
votes
1answer
253 views

Vector vs Scalar velocity?

I am revamping an engine I have been working on and off on for the last few weeks to use a directional vector to dictate direction; this way I can dictate the displacement based on a direction. ...
6
votes
1answer
292 views

How can I get a 2D texture to rotate like a compass in XNA?

I'm working on a small maze puzzle game and I'm trying to add a compass to make it somewhat easier for the player to find their way around the maze. The problem is: I'm using XNA's draw method to ...
2
votes
4answers
1k views

Simulating a sine wave/oscillating pattern for enemies

I'm creating a simple top down shooter, right now I have an enemy which simply follows the player. I'd like to change things up and have the enemies move towards the player but in a wave like motion. ...
2
votes
2answers
257 views

How to offset particles from point of origin

Hi I'm having troubles off setting particles from a point of origin. I want my particles to spread out after a certain radius from a the point of origin. For example, this is what I have right now: ...
3
votes
2answers
393 views

Calculating the correct particle angle in an outwards explosion

I'm creating a simple particle explosion but am stuck in finding the correct angle to rotate my particle. The effect I'm going for is similar to this: Where each particle is going outwards from the ...
-1
votes
1answer
567 views

Breakout… Getting the ball reflection X angle when htitting paddle / bricks [duplicate]

Im currently creating a breakout clone for my first ever C# / XNA game. Currently Ive had little trouble creating the paddle object, ball object, and all the bricks. The issue im currently having is ...
0
votes
2answers
224 views

Determining my playable area/field of view

Contrary to what I found searching for the answer, I'm not trying to see whether a character is in view of another character. What I need to find out is the size of the field of view. This is because ...
0
votes
1answer
372 views

Rotation matrices from Quaternion.Identity and -Quaternion.Identity are the same?

If I create a rotation matrix from an identity quaternion then it is the same as a creating it from a negative identity quaternion Matrix m0 = ...
0
votes
1answer
418 views

Implementing framerate independence

I know the following line of code has the effect of moving 3 units per milliseconds independent of framerate, but my sucky mathematical intuition is unable to understand WHY this works translation *= ...
0
votes
1answer
227 views

Question about Target parameter of Matrix.CreateLookAt

I have a newbie question that's causing me a little bit of confusion when experimenting with cameras and reading other peoples implementations - does this parameter represent a point or a vector? In ...
2
votes
1answer
838 views

When to use Euler vs Axis angles vs Quaternions?

I understand the theory behind each but I was wondering if people could share their experiences in when one would use one over the other For instance, if you were implementing a chase camera, a ...
4
votes
1answer
1k views

Orthographic Camera Zooming

In XNA I am using a spritebatch to render a board. I have created a camera class which can provide me a view and projection matrix. Currently I am supplying the view matrix to my sprite batch when I ...
3
votes
2answers
378 views

Tessellating/Subdividing a quad

I am creating a quad that starts as a single quad, then divides itself multiple times (from 1 -> 4 -> 16 -> 64 -> 256 etc) but I have encounted an issue. When I get to 64 sub divisions only 16 quads ...
2
votes
1answer
298 views

Can someone explain this Pulsate code to me

// Pulsate the size of the selected menu entry. double time = gametime.TotalGameTime.TotalSeconds; float pulsate = (float)Math.Sin(time * 6) + 1; scale = new Scale(1 + pulsate * 0.05f,1 + pulsate * ...
1
vote
2answers
946 views

XNA: How to Flip/Mirror a position over a custom vector?

I want to flip Horizontally my Sprite/Texture however the SpriteEffects.FlipHorizontally isn't cutting it for me as it just flips the texture in place. I want to flip the texture over a specified ...
5
votes
1answer
381 views

How do I create weapon attachments?

My question is; I am developing a game for XNA and I am trying to create a weapon attachment for my player model. My player model loads the .md3 format and reads tags for attachment points. I am able ...
-1
votes
2answers
201 views

How to make sure that a Point A moving in the direction V reaches at Point B?

Let say I have, Point A(X1,Y1) moving in the direction V(W, H). I need to make sure that it reaches B(X2,Y2). I think I need to subtract some value in Point A(X1, X2). But not know what? I also sure ...
2
votes
1answer
190 views

Calculate the direction, From Outer Polygon Point to Inner Polygon inside Point

I was able to find the co-ordinates of inner Polygon using this trick. Need the co-ordinates of innerPolygon But, I have some problem in getting the direction from Outer Polygon Point to Inner ...
3
votes
2answers
94 views

Need the co-ordinates of innerPolygon

Let say I have this diagram, Given that i have all the co-ordinates of outer polygon and the distance between inner and outer polygon is d is also given. How to calculate the inner polygon ...
2
votes
2answers
2k views

How to move a line of sprites in a sine wave?

So, I'm spawning a horizontal line of enemies that I would like to have move in a nice wave. Currently I tried: Enemy.position.X += Enemy.velocity.X; Enemy.position.Y += ...
3
votes
1answer
388 views

Confused about order of operation when using a Matrix in XNA, C#

Here are two different pieces of code This is what I started with Vector2 hold = Vector2.Transform(pos1, mat1); Matrix inv = Matrix.Invert(mat2); Vector2 pos2 = Vector2.Transform(hold, inv); And ...
1
vote
1answer
522 views

Problems with 3D rotation when creating a 3D skeleton

I am writing a simple BVH parser in C# using the XNA framework. At the moment I have managed to parse in all the data and my goal is to find out the global coordinates of all the joints in the ...
8
votes
2answers
704 views

Function for sun movement?

So, given a sun sprite set at the horizon (x = 0, y = worldheight/2) I'm trying to devise a function to make the sun rise, then fall. The best way to do this would be the sin function, but I have no ...
0
votes
2answers
516 views

Moving along a flat plane with accordance to camera view

I'm making a 3D game, and I'm stuck on a little experiment. I currently have a flat plane with a free camera running around, and a sphere (really, a light approximated as a sphere) that rests above ...
1
vote
1answer
1k views

Line segment / circle intersection - X value seems wrong?

Major Edit I'm making a Breakout clone, and having difficulty with collision detection between a circle and line segment. Apologies, my earlier question was a result of frustration and no sleep :) ...
8
votes
1answer
6k views

Get position of point on circumference of circle, given an angle?

I would like to know how to get a specific point on the circumference of a circle, given an angle. The diameter of the circle is 1, and the center point of the circle is { X: 0.5, Y: 0.5 }.
3
votes
3answers
4k views

Getting the angle between two objects?

I have a set of boxes which create a sort of path, they don't intersect very smoothy and to help that process I'm trying ot find a way to get an angle between them that can make it easier to generate ...
1
vote
1answer
179 views

An ellipse outside two points?

I am trying to generate an ellipse outside two points (two-dimensional vectors). Is there a formular for that, or a cool way of doing that in C# XNA? What I am trying to do is have a particle circle ...
14
votes
1answer
3k views

Determine arc-length of a Catmull-Rom spline

I have a path that is defined by a concatenation of Catmull-Rom splines. I use the static method Vector2.CatmullRom in XNA that allows for interpolation between points with a value going from 0 to 1. ...
5
votes
5answers
1k views

Are game programmers aware of all the physics derivatives?

I am trying to study XNA for game programming. XNA has many methods that can simplify developer's life, such as reflecting the vector when it hits a solid plane. I know these are good and developers ...
1
vote
3answers
509 views

Get intersection of vector in the middle of the screen

My screen resolution is 640x480 and I have two Vector2 objects located at (10,10) and (600, 320). How can I connect these two objects and extend the line to encompass the whole screens width, how can ...
6
votes
2answers
496 views

Calculating and detecting curves

How can I detect the 'steepness' of a curve? For example, if the user swipes their finger across the screen in a curve, what's the best way of detecting whether the curve is almost a semi-circle, or ...
4
votes
4answers
981 views

Physics timestep questions

I've got a projectile working perfectly using the code below: //initialised in loading screen 60 is the FPS - projectilEposition and velocity are Vector3 types gravity = new Vector3(0, ...
3
votes
1answer
387 views

XNA - Weird bug with 2D Sprite Rotation

I have a problem with my XNA Game, I have a function where I need my sprite to face towards an enemy, using this code: Vector2 currentPosition = Position; Vector2 nearestEnemy = ...
4
votes
2answers
1k views

snapping an angle to the closest cardinal direction

I'm developing a 2D sprite-based game, and I'm finding that I'm having trouble with making the sprites rotate correctly. In a nutshell, I've got spritesheets for each of 5 directions (the other 3 come ...