Questions tagged [sprites]

A 2D rendering of an object in space. Sprites are two-dimensional bitmaps that represent objects or entities in a game and populate larger scenes.

Filter by
Sorted by
Tagged with
4 votes
1 answer
5k views

Any way to combine instantiated sprite renderers into one texture so I can apply into a plane at runtime?

So I am procedurally generating a tile set in Unity by instantiating different tiles that only have a transform and sprite renderer components. I managed to pack the sprites using unity sprite packer ...
Kepol's user avatar
  • 183
33 votes
4 answers
11k views

How do you approach resolution independence in raster based graphics content?

Those games that are not fortunate enough to run on a locked platform spec, like handhelds, need to run across various resolution formats and aspect ratios. In a 3D game you might have a HUD or menu ...
Keyframe's user avatar
  • 2,321
19 votes
8 answers
12k views

What's the best way of transforming a 2D vector into the closest 8-way compass direction?

If you have a 2D vector expressed as x and y, what's a good way of transforming that into the closest compass direction? e.g. ...
izb's user avatar
  • 860
8 votes
1 answer
5k views

How should I handle sprite creation for customizable 2D characters?

I'm want to create avatar animations (sprites) for a browser-based MMORPG. The player is able to customize the character, and the content changes often (new weapons, armors, and so on). How can I ...
Lauri Laakso's user avatar
21 votes
2 answers
17k 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 ...
Daniel T.'s user avatar
  • 537
7 votes
1 answer
2k 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 ...
user avatar
13 votes
2 answers
26k views

How can I move a sprite in the direction it is facing?

I'm using Java/Slick 2D. I'm trying to use the mouse to rotate the sprite and the arrow keys to move the sprite. I can get the sprite to rotate no problem, but I cannot get it to move in the direction ...
rphello101's user avatar
25 votes
8 answers
22k views

What is a good tool for producing animated sprites? [closed]

Has anyone come across a software package that allows you to build animations in a similar way to how you can in Flash (i.e. using techniques such as tweens & bones & easings, etc) and then ...
Alconja's user avatar
  • 848
9 votes
3 answers
6k 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 sure ...
Martin.'s user avatar
  • 429
5 votes
1 answer
5k views

How to keep sprites sharp and crisp, even while rotating

How can I maintain crisp, sharp edges on sprites, while avoiding the aliasing caused by rotation? None of the things I've tried produce a pixel-perfect non-rotated block, while allowing rotation ...
Drin's user avatar
  • 51
25 votes
9 answers
19k views

Tips and Tools for creating Spritesheet animations

I am looking for a tool that I can use to create sprite sheet easily. Right now I am using Illustrator, but I can never get the center of the character in the exact position, so it looks like it is ...
Spooks's user avatar
  • 2,965
9 votes
7 answers
3k views

Can I use copyrighted sprites for a demo?

I just had a quick question and wanted everyone's opinions. I'm making a 2D demo game for a resume which I want to post online. I'm applying as a programmer position so I don't really have my own art....
user1119033's user avatar
5 votes
1 answer
1k 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 ...
Johnny's user avatar
  • 89
11 votes
3 answers
5k views

Random enemy placement on a 2d grid

I want to place my items and enemies randomly (or as randomly as possible). At the moment I use XNA's Random class to generate a number between 800 for X and 600 ...
Robb's user avatar
  • 293
11 votes
1 answer
87k views

Change the sprite of a Object in Unity

Inside the script code of the the hero(object) I want add the possibility to change its sprite. So the player hits the space button and the sprite changes into the other sprite already added to the ...
Fab's user avatar
  • 189
9 votes
3 answers
18k 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 ...
Raymond Holmboe's user avatar
8 votes
3 answers
8k views

How can I generate isometric sprite sheets from 3D animations?

I want to generate sprite-sheets for an isometric projection of various 3d assets purchased from the Unity3D asset store. I'd preferably also render the normal maps. I am a programmer, but new to 3D ...
user45488's user avatar
6 votes
1 answer
2k 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 ...
David Gouveia's user avatar
4 votes
1 answer
5k views

How do I make a 2D character aim their gun toward the mouse?

Heli Attack is a perfect example of the shooting mechanic I'd like. The character aims perpetually toward the mouse. What's going on here? From what I've read so far, you could separate the arm and ...
atkayla's user avatar
  • 221
0 votes
1 answer
460 views

How to keep objects in the same position relative to their parent?

I'm writing a simple game in C# and i'm having some difficulty to calculate the local position of a sprite. What i'm aiming to achieve: Calculate the sprite "local position" relative to the ...
RickS.'s user avatar
  • 51
19 votes
5 answers
6k views

Sprite Animation Best Practices

I'd like to get a better handle on how people in the real world are handling their animation. Do you load 1 large image and then draw different rectangles based on the animation frame? Do you load X ...
jblaske's user avatar
  • 305
16 votes
6 answers
39k views

Where to hire 2D sprite artists? [closed]

I'm looking for high quality original 2D sprite collections which are animated where appropriate. (IE not simply collections I can buy, we want original work). I've had a look online but am ...
Tom Gullen's user avatar
15 votes
4 answers
6k views

Where can I go to find a game graphic artist? [closed]

Where's a good place to post to find a decent game artist to create a small number of 32-bit sprites? This is for an internal code war framework so it's minimal work - maybe a couple of hours. Any ...
14 votes
5 answers
10k views

How can I handle sprite sheets with nonuniform sprite dimensions?

For a spritesheet with non-uniform sprite dimensions, how can I get the bounding-rectangles for each individual sprite (i.e. the blue boxes in the following image / I only drew a few examples)? What ...
Ben's user avatar
  • 487
13 votes
5 answers
5k views

Tools for generating texture atlases/sprites from source images? [closed]

Is there an industry standard file format for texture atlases? What are the apps that take a directory of images and turns it into a texture atlas png and a text file describing what's on it? This ...
davidcann's user avatar
  • 233
12 votes
6 answers
13k views

How do you move a sprite in sub-pixel increments?

Pixels are either on or off. The minimum amount you can move a sprite is a single pixel. So how you make the sprite move slower than 1 pixel per frame? The way I did it was to add the speed to a ...
bzrr's user avatar
  • 263
9 votes
3 answers
17k views

SDL2 sprite batching and texture atlases

I have been programming a 2D game in C++, using the SDL2 graphics API for rendering. My game concept currently features effects that could result in even tens of thousands of sprites being drawn ...
jms's user avatar
  • 257
8 votes
1 answer
4k views

Mip Maps on 2D Sprite causing black line above. Why is this?

I am new to Unity. I'm trying it out and using Futile for a code-first approach, but still importing textures using the Unity system. The problem I'm having is that when I use mip maps to scale large ...
Adam K Dean's user avatar
8 votes
3 answers
7k views

Why does Unity in 2d mode employ scaling and the default othographic size the way it does?

I previously used SFML, XNA, Monogame, etc. to create 2d games, where if I display a 100px sprite on the screen, it will take up 100px. If I use 128px tiles to create a background, the first tile will ...
Neophyte's user avatar
  • 583
8 votes
3 answers
4k views

2D Top down view maps

I was wondering how this works. Do you load the complete map when the game starts up, or do you load parts of the map at runtime? And how would you save the maps? Would it be in XML or some binary ...
Kevin's user avatar
  • 183
7 votes
2 answers
3k views

How do I change a sprite's color?

In my rhythm game, I have a note object which can be of a different color depending on the note chart. I could use a sprite sheet with all the different color variations I use, but I would prefer to ...
Mr_Qqn's user avatar
  • 392
6 votes
1 answer
14k views

Efficient billboarding sprites in Unity 5

What's the most efficient way to do billboarding sprites in Unity 5? I want to make a forest of sprite trees in 3d space. Those sprites need to face the camera at all times. I am working on VERY ...
K.L.'s user avatar
  • 795
6 votes
2 answers
2k views

How do I turn an image into a Box2D physics object?

I'm using Box2D for a Game Programming course, and I was wondering if it is possible to choose the best shape and size of shape for the rigidbody/fixture for a sprite based on its transparency. I've ...
vdwtanner's user avatar
6 votes
1 answer
9k views

How to make a 2D neon-like trail effect in Unity

Recently I've been toying around with neon-ish effects for a game I'm making and wanted to share my results with you. If you guys have any other methods of achieving this result, please be sure to ...
John Hamilton's user avatar
6 votes
1 answer
2k views

2D animation: Animated 3D models or sprites with animation frames?

Starting out with new project, I am stuck choosing between: 3D textured model animated directly through the renderer 2D sprites and drawing each animation frame The game will be 2D platform, I would ...
SAFAD's user avatar
  • 215
5 votes
1 answer
4k views

OpenGL ES 2.0. Sprite Sheet Animation

I've found a bunch of tutorials on how to make this work on Open GL 1 & 1.1 but I can't find it for 2.0. I would work it out by loading the texture and use a matrix on the vertex shader to move ...
Project Dumbo Dev's user avatar
4 votes
1 answer
1k views

Doom-style 2.5D Movement Animations

I've started working on a demo for my 2.5D game. For a basic scene I figured I would just use the good old fashioned doom sprites textured to a double sided plane. Simple enough. But I've been ...
whitwhoa's user avatar
  • 201
4 votes
2 answers
3k views

How to rotate "stacked sprites" in XNA?

I'm working on a simple Sinistar-style shooter in XNA, and I'm constantly running into trouble with transformations. I feel like I'll get it eventually, but this problem is really bending my mind. ...
CodexArcanum's user avatar
  • 1,362
4 votes
1 answer
1k views

Space Invaders-type game: Keeping the enemies aligned with each other as they turn around?

OK, so here's the lowdown of the problem I'm trying to solve. I'm developing a game in PyGame that's a cross between Space Invaders and Columns. I'm trying to make the motion of the enemies similar ...
JesseTG's user avatar
  • 1,077
4 votes
1 answer
3k 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 ...
OriginalDaemon's user avatar
3 votes
2 answers
6k views

Cocos2d rotating sprite while moving with CCBezierBy

I've done my moving actions which consists of sequences of CCBezierBy. However I would like the sprite to rotate by following the direction of the movement (like an airplane). How sould I do this with ...
marcg11's user avatar
  • 425
1 vote
1 answer
2k views

Using copyrighted sprites [duplicate]

Possible Duplicate: How closely can a game resemble another game without legal problems I was thinking about making a pacman clone, I know there is a similar question here Using Copyrighted ...
Zertalx's user avatar
  • 31
1 vote
1 answer
1k views

LWJGL—How to Animate and Render Characters Using a Sprite Sheet

I'm making an RPG similar to Super Nintendo RPGs in the early '90s. I'm handling movement much like Squaresoft's Final Fantasy IV. Notice that the player never actually changes his x and y positions ...
ND523's user avatar
  • 1,022
1 vote
1 answer
287 views

My position is "changing" when handling animation

I'm trying to learn Monogames(Old XNA) and how to develop a 2d game. I'm in the process of animating my sprites. It works but there are somethings that are weird to me. For some reason when ...
tirri's user avatar
  • 31
26 votes
2 answers
2k views

Algorithm for spreading labels in a visually appealing and intuitive way

Short version Is there a design pattern for distributing vehicle labels in a non-overlapping fashion, placing them as close as possible to the vehicle they refer to? If not, is any of the method I ...
mac's user avatar
  • 1,375
21 votes
9 answers
19k views

Efficient way of drawing outlines around sprites

I'm using XNA to program a game, and have been experimenting with various ways to achieve a 'selected' effect on my sprites. The trouble I am having is that each clickable that is drawn in the ...
Greg's user avatar
  • 313
15 votes
3 answers
19k views

Create a trailing, ghosting effect of a sprite

I want to create a trailing, ghosting like effect of a sprite that's moving fast. Something very similar to this image of Sonic (apologies of bad quality, it's the only example I could find of the ...
General Waters's user avatar
11 votes
3 answers
9k views

Rendering performance for Flash games

I was reading on SO about native flash rendering vs building a custom BitmapData frame buffer and some of the answers were a bit conflicting, so I was wondering: ...
Alconja's user avatar
  • 848
9 votes
2 answers
3k 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 ...
Tamara Wijsman's user avatar
9 votes
4 answers
10k views

sprite animation in openGL

I am facing problems on implementing sprite animation in openGL ES. I've googled it and the only thing i am getting is the Tutorial implementing via Canvas. I know the way but I am having problems in ...
Siddharth-Verma's user avatar