Tagged Questions
9
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 ...
7
votes
1answer
837 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 ...
7
votes
2answers
4k 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 ...
7
votes
1answer
320 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 ...
6
votes
3answers
1k 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 ...
4
votes
4answers
3k 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 ...
4
votes
2answers
3k 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
2answers
719 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 ...
4
votes
2answers
417 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 ...
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
562 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)
...
3
votes
1answer
828 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 ...
2
votes
1answer
409 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 ...
2
votes
1answer
1k 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 ...
2
votes
1answer
234 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 ...
2
votes
1answer
588 views
Sprite Animation in XAML/C# for Windows 8 Modern UI (Metro)
I'm working on a project that requires doing sprite based animation in XAML / C# for a windows store app. I've worked out a method for displaying the animation, but it causes flickering during the ...
1
vote
2answers
2k 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
2k 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 ...
1
vote
1answer
967 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 ...
1
vote
1answer
3k views
Where to find free platformer sprites for commercial use? [duplicate]
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 ...
0
votes
1answer
748 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 ...