2
votes
2answers
136 views

Pathplanning A* Getting stuck in wall

I'm having a problem with my pathplanning. I can plan a path and make my character follow it, that's not a problem but then i plan a path around a wall it takes the shortest way as A* suggests, which ...
2
votes
1answer
153 views

How do I make a sprite appear to sway with the wind?

I'm trying to find a method to simulate the effects of wind on various sprites in a side-view 2D scene. What relatively simple technique could I use for this? What I have in mind is to give these ...
0
votes
1answer
89 views

How can I compute a velocity proportional to the difference between two hand positions?

I'm working on a project with the Kinect SDK and XNA 4. I need take the position of the hands and draw a sprite over it. I'm was doing it directly and because of that I get a "trembling hands" effect. ...
-4
votes
2answers
94 views

Is it possible to render controls inside controls in XNA?

I want to know if there is an easy way to render sprites in XNA inside other sprites or something similar (I don't know if sprite is the best or unique way to draw in XNA). For example, I want to draw ...
1
vote
1answer
114 views

Should I be using Reach or HiDef profile if I have large spritesheets?

I'm working on a platformer in monogame, that I want to use a large number of sprites for making up items and objects in the background. The main spritesheet I've created is 4095x3734, when I tried ...
1
vote
0answers
359 views

Windows 8 C# Compile spritefonts for MonoGame without XNA

Hello Stack Exchange community. Recently, I've been attempting to in some way generate sprite-fonts into XNB files for use with MonoGame. The issue is however, as you may be aware, XNA is very ...
2
votes
3answers
395 views

XNA Rending Bottom Half of Video, How to fix?

First off, sorry if this is a repeat question i didn't see anything similar in my searches. The issue i am having.... When running an XNA game any Video objects & related Texture2D's are not ...
2
votes
1answer
215 views

Sprite Animation Using Multiple Images (XNA / C#)

all. Right now I am currently working on a game with my Australian buddy and I just am having such a difficult time with the spriting process. As the programmer of our game, it is my responsibility ...
1
vote
2answers
173 views

XNA slowly stops sprite movement on key released

I'm making a game where player moves around a spaceship pressing W,S,A,D. What I would like to achieve is that I would like to make the ship stop slightly when a key is released before it went to full ...
1
vote
1answer
718 views

Loading images in XNA 4.0; “Cannot Open File” Problems

Okay, I'm writing a game in C#/XNA 4.0 and am utterly stumped at my current juncture: Sprite animation. I understand how it works and have all the code in place, but my ContentLoader won't open my ...
1
vote
1answer
92 views

Create sprite and place in pre-defined places using mouse

So, I have a table. I want to be able to click on a button that allows a mode where I place a sprite on the table, on places that are predefined. How do I do that? I was thinking I could constantly ...
0
votes
0answers
116 views

Flash CS6 Spritesheets and XNA

So new with Adobe Flash CS6 comes the new Feature to export Movie Clips as a Spritesheet which seems very nice! I have a few questions to CS6: http://imgur.com/enllkyL Its nifty but it lost its "up ...
2
votes
1answer
133 views

Get average tile color

In my 2D game I have TileSet class that loads the texture and creates Rectangle[] array which stores each tile coordinates. Pretty basic stuff. Now I'd like to also calculate and store the average ...
0
votes
2answers
1k views

How to scale a sprite with its center as origin?

I'm trying to zoom-in a sprite gradually from 0% to 100% (a sprite called SelectionBox), so it zooms from the middle of the sprite, not from the upper-left corner. I'm almost there, but I'm having ...
0
votes
2answers
107 views

Returning The Position Of A Sprite Drawn & Updated By A List [closed]

My problem is this, when iceBoy hits any of the newGrounds in the ground.groundAmmount list, it will return the specific position of this newGround so that i can set iceBoy's position based on the ...
0
votes
2answers
162 views

Why does my sprite animation sometimes runs faster? [closed]

I don't know why each time I call the Update_Animation function, my sprite animation runs faster. Is it caused by gameTime? How to fix it? Here's the relevant code: class Character { // ...
0
votes
1answer
191 views

xna: Methods for having sprite characters in 3d game?

Methods for having sprite characters in 3d game? I am making a game much like Doom. The world is 3d but objects and characters are 2d sprites. I am not asking about billboarding objects. I am asking ...
-6
votes
1answer
762 views

How can I make sprites like diablo's for my soon-to-be isometric rpg? Like in all directions [closed]

(xna newcomer)I can use blender(3d modelling tool). I just can't make people, but if I have to, I'd learn it. How can I do that? I plan on making a lot of armor sets, equipments too. How would I go ...
2
votes
1answer
383 views

High volume sprite management in entity component system

I'm working on an entity-component-system based 2.5d game. That is, entities are groups of components that are processed by systems. I am having a hard time seeing how a sprite rendering system, that ...
5
votes
1answer
645 views

Improving SpriteBatch performance for tiles

I realize this is a variation on what has got to be a common question, but after reading several (good answers) I'm no closer to a solution here. So here's my situation: I'm making a 2D game which ...
2
votes
2answers
222 views

Loading Texture2D is extremly slow on XBOX360

I have ~100 sprites for each level im my XNA game. On windows it takes ~2 seconds to load them all. Unfortunately on XBOX360 it takes ~30-60 seconds. Am i doing something wrong? Essentially the ...
3
votes
1answer
638 views

How do I make a jumping dolphin rotate realistically?

I want to program a dolphin that jumps and rotates like a real dolphin. Jumping is not the problem, but I don't know how to make the rotation. At the moment, my dolphin rotates a little weird. But I ...
1
vote
1answer
143 views

If statement causing xna sprites to draw frame by frame

I’m a bit new to XNA but I wanted to write a simple program that would fire a cannon ball from a cannon at a 45 degree angle. It works fine outside of my keyboard i/o if statement, but when I ...
7
votes
1answer
542 views

Spritebatch drawing sprite with jagged borders

Alright, I've been on the making of a sprite class and a sprite sheet manager, but have come across this problem. Pretty much, the project is acting like so; for example: Let's take this .png ...
1
vote
2answers
4k views

How can I draw a simple 2D line in XNA without using 3D primitives and shders

I would like to be able to draw arbitary lines in my sprite based 2D XNA game. How can I draw a simple line on screen in XNA without dealing with vertex arrays or shaders.
9
votes
1answer
1k views

Xbox thumbstick used to rotate sprite, basic formula makes it “stick” or feel “sticky” at 90 degree intervals! How do you get smooth rotation?

I am using a very basic formula to calculate what angle my sprite (spaceship for example) should be facing based on the Xbox controller thumbstick i.e. you use the thumbstick to rotate the ship. In ...
8
votes
2answers
3k views

How to decompose sprite sheet

I have a lot of spritesheets that are poorly formatted that I want to decompose, or split out into many small images, one for each sprite. If I can do that, I can use my custom texture packer tool to ...
2
votes
1answer
204 views

XNA Framework sprite vectors and also scaling

I'm working on making my first Pong game with XNA Framework 4.0. Right now i've put 2 pong paddles and a ball (they have separate classes). In the "Paddle" class i've made a function that returns a ...
1
vote
1answer
2k views

XNA 2D Collision with specific tiles

I am new to game programming and to these sites for help. I am making a 2D game but I can't seem to get the collision between my character and certain tiles. I have a map filled with grass tiles and ...
1
vote
1answer
1k views

Positioning a sprite in XNA: Use ClientBounds or BackBuffer?

I'm reading a book called "Learning XNA 4.0" written by Aaron Reed. Throughout most of the chapters, whenever he calculates the position of a sprite to use in his call to SpriteBatch.Draw, he uses ...
3
votes
1answer
2k views

Spritesheet per pixel collision XNA

So basically i'm using this: public bool IntersectPixels(Rectangle rectangleA, Color[] dataA,Rectangle rectangleB, Color[] dataB) { int top = Math.Max(rectangleA.Top, rectangleB.Top); ...
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 ...
1
vote
0answers
502 views

Sprite visual effect in XNA?

Suppose I have a character sprite and I want to apply some animating effect that overlay its color, how would I do it? What I desire is something along this line: (From final fantasy tactics) It is ...
2
votes
2answers
913 views

How do I apply pixel shader to specific sprite in XNA 4.0 in a spritesort FrontToBack?

I have a set of sprite drawn in FrontToBack sortmode. In XNA 4.0, the effect must be as an input argument of Begin() function of SpriteBatch. However, If I reinvoke the function, then the sprite ...
0
votes
1answer
461 views

XNA: weird effect by matrixTransform of spriteBatch on isometric tile

I wrote a Camera class that contains Matrix (for zooming and moving around). When I zoomed it with any zoom scale other than 1, some isometric grids becomes visible on each of my isometric tile. ...
1
vote
1answer
406 views

XNA - Drawing zoomed 2D sprites

I have a tile based game. Each tile texture is loaded and then I draw each one next to the other, forming a continuous background. I actually followed this tutorial for the xml files. ...
5
votes
2answers
671 views

Alternatives to multiple sprite batches for achieving 2D particle system depth

In my 2D XNA game, I render all my sprites with a single sprite batch using SpriteSortMode.BackToFront and BlendState.AlphaBlend. I'm adding a particle system based on the App Hub particles sample. ...
1
vote
2answers
2k views

Tutorial or Example of creating custom sprite tool/map editor for XNA?

I want to create various sprite tool and map editor using XNA. Now, the problem is I do not know how would I implement the window forms and components (such as button, check box, sprite list, etc.) ...
-4
votes
1answer
407 views

Make Sprite Jump Upon a Platform

I have been struggling to make a game like Doodle Jump where the sprite jumps on a platform. So how do you make a sprite jump upon platforms in XNA? Th platforms are represented by a list of positions ...
6
votes
2answers
1k views

Simple thruster like behaviour when rotating sprite

I'm prototyping some 2D game concepts with XNA and have added some basic keyboard inputs to control a triangle sprite. When I press key up the sprite accelerates in it's current facing direction, ...
1
vote
1answer
1k views

SpriteBatch Draw Using Floats with the Destination Rectangle

So I created a nice little isometric tile engine and I have it so that when you scroll with the mouse it changes a variable called scale. Scale is a float and gets passed through the ...
6
votes
3answers
2k views

Is there a simple way to group two or more sprites, so all of them will be dependent on each other?

I think that this question is very similar to this one, but I'm not sure if the answers are universal. So, my goal is: Place two sprites in fixed position, for example player and his eyes Make ...
3
votes
1answer
2k views

How to “swing” bounding box and update collision for sprite swinging a weapon?

I have a simple question about sprite swinging weapons. I am making an RPG and would like something other than stabby-swords, so why not swinging swords? I have a bounding rectangle for them, and the ...
4
votes
1answer
1k views

How to create a 2D region where sprites are automatically wrapped?

Edit Finally managed to get this to work, after two separate questions! Here's a video demonstration: http://www.youtube.com/watch?v=nZ7e0jegvs0 Will write an article about it later when I have a ...
3
votes
2answers
676 views

SpriteSheet Animation with XNA

Hi i'm working on my First 2D Game with XNA and I have a little problem. To give a running effect to my Sprite, I scroll through a SpriteSheet with this code(running right): if (AnimationDelay == 6) ...
0
votes
1answer
1k views

Make a basic running sprite effect

I'm building my very first game with XNA and i'm trying to get my sprite to run. Everything is working fine for the first sprite. E.g : if I go right(D) my sprite is looking right , if I go left(A) my ...
7
votes
3answers
1k views

How do I adjust the origin of rotation for a group of sprites?

I am currently grouping sprites together, then applying a rotation transformation on draw: private void UpdateMatrix(ref Vector2 origin, float radians) { Vector3 matrixorigin = new ...
1
vote
2answers
3k views

XNA: draw a sprite in 3d, is that possible?

since now I always used sprited to draw in 2D: spriteBatch.Draw(myTexture, rectangle, color); (I suppose the texture is binded internally to 2 triangles and then scaled.) Now, I'm porting my game ...
1
vote
2answers
3k views

XNA Windows Phone 7 Sprite movement

I'm working on a Windows phone game and I'm having difficulty with the sprite movement. What I want to do is make the sprite gradually move to the position that is touched on screen, when there is ...
2
votes
1answer
600 views

Rotating a group of sprites - How to calculate origin

I am rotating a group of sprites in XNA, which I developed with the help of the following example: http://msdn.microsoft.com/en-us/library/bb194912%28v=xnagamestudio.10%29.aspx It all works very ...