Tagged Questions
1
vote
1answer
284 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 ...
7
votes
1answer
144 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 ...
7
votes
1answer
441 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 ...
3
votes
2answers
224 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 ...
1
vote
1answer
677 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 ...
4
votes
3answers
782 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 ...
1
vote
1answer
943 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 ...
3
votes
2answers
442 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
528 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 ...
1
vote
2answers
1k 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
1k views
Create a body of an irregular 2D sprite in Farseer
I'm trying to create a body of a irregular 2D sprite Farseer 3.3.1.
The regular shapes that BodyFactory provides are not that I want. Is there a way that one can create irregular objects? Could it be ...
3
votes
1answer
657 views
Turning a sprite such that it rotates in the direction that's most efficient
I have a sprite that moves from waypoint to waypoint. It turns to face its velocity vector, but not instantly (there's a rotation speed).
The problem I'm having is, from one direction to another, the ...
3
votes
2answers
2k views
How do I access variables in the Game1 class from another class in XNA?
I'm trying to write a SpriteManager class in XNA, but I need access to the Game variables. For example, the Game.Content property would be very helpful in loading textures, and ...
1
vote
1answer
2k views
Where to find free platformer sprites for commercial use? [closed]
Possible Duplicate:
Where can I find free sprites and images?
I need some good 2d platformer sprites for a game i am making in C#. Can anyone suggest a good site or link?
The sprites need ...
8
votes
2answers
1k views
Scale my pixel art files when designing them or when rendering?
If I create pixel art files that need to be scaled up on the screen later, so that a single pixel becomes a box of 4 pixels. Should I create my pixel art with 2x2 pixels or should I create it with 1x1 ...
4
votes
2answers
621 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 ...
7
votes
2answers
3k views
How do I disable texture filtering for sprite scaling in XNA 4.0?
I have a sprite that I'm trying to scale up in XNA, but XNA is applying some sort of texture filtering that smooths it and makes it look ugly. I'd like it to just do pixel doubling instead of ...
4
votes
1answer
1k views
Mixing sprite drawing with 3D primitive drawing in XNA?
In my game, I have a base Note class, and various subclasses of Note. In addition, I have a NoteCollection class which contains a collection of these Note objects and draws them to the screen. ...
3
votes
2answers
2k views
Clipping a SpriteBatch Draw() in XNA
Is there any way to enable a temporary clipping mask in XNA while using a SpriteBatch? I'm drawing a bunch of Texture2D objects and Sprites in a given rectangle, and I want to make sure that said ...
4
votes
4answers
2k views
How to handle a Sprite Class?
Currently I am learning XNA and while playing around with some tutorials knowing what I am aiming for a game it made me think that the Sprite Class will be something very important and re-used a lot ...