Questions tagged [sprite]

A sprite is a two-dimensional image or animation that is integrated into a larger scene.

Sprite

A sprite is a two-dimensional image or animation that is integrated into a larger scene.

Spriting

The term is also used when taking subsections of a larger image file containing icons for display. This allows browsers to load only one image file and reuse it to display many icons by using offsets. This is known as spriting.

FAQs

Resources

4792 questions
10
votes
2 answers

SVG sprite icon background position appears off in newer version of Chrome

I am using a background-image SVG sprite, and everything looks great on my versions of Safari, mobile Safari, Chrome, Firefox, Opera, IE, etc. However, the background positions aren't displaying correctly for a few of my co-workers who have a newer…
mistykristie
  • 567
  • 3
  • 13
10
votes
3 answers

Generate sprites with compass with smart layout and spacing

I'm trying to generate some sprites with SASS Compress where I want to apply the smart layout to the sprite file like the docs http://compass-style.org/help/tutorials/spriting/sprite-layouts/ This works great: $sprites: sprite-map("sprite/*.png",…
Tommy Bjerregaard
  • 1,089
  • 11
  • 24
10
votes
3 answers

2d Sprite Animations without using XNA or other third-party libraries

I want to create a simple game, similar to what can be created with RPG Maker. What I am primarily looking for at the moment is a tutorial which can guide me on how to accomplish it without using XNA or any other specific library. The ideal would be…
WiiMaxx
  • 5,322
  • 8
  • 51
  • 89
10
votes
1 answer

Can't find suitable example for android 2d opengl sprite class which does not use GL11Ext for drawing

As SpriteMethodTest says there are many ways for drawing sprites. Firstly, I tried canvas, and had some performance problems. Next, I decided to learn opengl. I made my first achievements using GL11Ext extension. However, you know by default, that…
BIOHAZARD
  • 1,937
  • 20
  • 23
9
votes
2 answers

How to load sprite sheet with 5 rows and 5 columns top view in android?

I have a sprite sheet of 612x864 dimension with 5 rows and 5 columns .My problem is how can I load it and animate it? I want to move the cat sprite in y-axis only .I've already try but my code is not working properly. Here is my code. In…
user7135072
9
votes
3 answers

How do I drag and drop a sprite in Swift 3.0?

All i'm trying to do is be able to drag and drop a sprite across the screen. I've tried the following code: override func touchesBegan(touches: Set, withEvent event: UIEvent?) { } override func touchesMoved(touches: Set,…
Mr_Username
  • 119
  • 1
  • 7
9
votes
5 answers

How would you store complex NES sprites, such as from the original Final Fantasy?

I know that NES had 4-color sprites (with 1 usually being transparent Edit: according to zneak, 1 color is always transparent). How then did the original Final Fantasy have so many sprites with 4 colors + transparent? (Example sprite sheet --…
Dinah
  • 52,922
  • 30
  • 133
  • 149
9
votes
1 answer

In JavaFX how do I move a sprite across the screen?

I'm new to JavaFX and am trying to write a game where an animated 2D character walks across the screen (for example like the original Legend of Zelda game). I had done this in Swing, by creating my own Sprite class and overriding the…
Zareh
  • 1,225
  • 2
  • 9
  • 6
9
votes
1 answer

Make Compass stop checking/compiling sprites

Is there any way to configure Compass such that it does not recompile or check my sprites on each change of a non-sprite file? I am trying to make edits to the file lists.scss but I have to wait for compass to check (I believe its checking, maybe…
Paul
  • 1,192
  • 1
  • 11
  • 23
9
votes
2 answers

Three.js: how to keep sprite text size unchanged when zooming

In three.js, when the mouse is zoomed, the text will be magnified and reduced accordingly. var texture = new THREE.Texture( canvas ); var material = new THREE.SpriteMaterial ( { map: texture, transparent:false } ); var sprite = new THREE.Sprite(…
dusai
  • 95
  • 1
  • 6
9
votes
4 answers

Replacing image in sprite - cocos2d game development of iPhone

I want to change the sprite image. Say for example: mainSprite=[Sprite spriteWithFile:@"redFile.png"]; [self addChild:mainSprite]; Here, Sprite is already added to a layer. I have mainSprite (pointer) which can access it. If I change [mainSprite…
sagarkothari
  • 24,520
  • 50
  • 165
  • 235
9
votes
4 answers

Favorite image file format for 2d sprites

What is your favorite, lossless image format for games (namely 2d games)? And why? Some things to take into consideration are size on disk, overhead for converting to a usable format, and features of the format (ie alpha support). There is no best…
Spodi
  • 1,151
  • 1
  • 11
  • 19
9
votes
3 answers

Google map marker sprite image position

How can we position the sprite image as Google map marker. For eg: In css we are positioning the image like background: url('../images/bodycss/pointer.png') 28px -32px; Now how can I include the above code to the below google api-v3 function…
FR STAR
  • 662
  • 4
  • 24
  • 50
9
votes
1 answer

How to re-write 2D OpenGL app for OpenGL ES?

I am working on an OpenGL 2D game with sprite graphics. I was recently advised that I should use OpenGL ES calls as it is a subset of OpenGL and would allow me to port it more easily to mobile platforms. The majority of the code is just calls to a…
Skyler
  • 909
  • 1
  • 10
  • 24
8
votes
2 answers

Convert Video into JPEG Sprite

I know video can't be turned directly into a motion JPEG but what I'm after is for each frame in a sequence to be taken from the video and turned into a JPEG sprite either horizontal or vertical. I'll then be using jQuery to animate the jpeg sprite…
The Angry Saxon
  • 792
  • 2
  • 7
  • 24