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
8
votes
3 answers

cocos2d getting a sprite to blink, it becomes invisible

im trying to make my sprite blink, but it just disappears, i have searched google, but i cant find a solution, heres what im doing: CCBlink * blinker = [CCBlink actionWithDuration: 0.5 blinks: 1]; [player runAction: blinker]; this method is…
sahil
  • 141
  • 1
  • 9
8
votes
11 answers

Getting rid of `instanceof`

In a sprite based game I'm writing, each field in a 2D grid contains a stack of sprites. Mostly the top one counts. In the rules module of the game, I have a lot of code like this: public boolean isGameWon(Board board) { for (Point point :…
Thomas Ahle
  • 30,774
  • 21
  • 92
  • 114
8
votes
2 answers

Click area on sprite in canvas

I'm creating a game in Javascript. currently the sprites are div elements with a background image that is updated to create animation. I have heard that if I make the elements canvas and blit the sprite onto the canvas I can make the sprite…
Robert Hurst
  • 8,902
  • 5
  • 42
  • 66
8
votes
4 answers

How to add color to grayscale images with css / html or javascript?

I have a CP437 tileset: which I want to use as a CSS sprite on a webpage Currently, I have a very simple markup and css: .tile { display: inline-block; width: 16px; height: 16px; } .cp437-0 { background: url('tileset/tileset.png')…
Adam Arold
  • 29,285
  • 22
  • 112
  • 207
8
votes
1 answer

Purpose of mipmaps for 2D sprites?

In current Unity, For use in Unity.UI as conventional UI .. for any "Sprite (2D and UI)", in fact it always defaults to having "Generate Mip Maps" turned ON. Every time you drop an image in, you have to turn that "off" and apply. As noted in the…
Fattie
  • 27,874
  • 70
  • 431
  • 719
8
votes
1 answer

Cross domain svg sprite

I'm aware that there are plenty of methods to use SVG sprites in HTML. My preference to this date has been to use something like
Icon Title
cortopy
  • 2,758
  • 2
  • 25
  • 31
8
votes
3 answers

sprite kit sprite not being colorized

I'm trying to colorize a spriteNode (in this case its named background) using sprite kit but cant get the color to change. I have a sprite that I want to colorize. I'm changing the color property of the sprite as well as the color blending factor.…
Stone Preston
  • 1,828
  • 4
  • 20
  • 35
8
votes
3 answers

Generating CSS sprites for dynamic images

I have a webpage which contains about 20 - 50 dynamic images (images served from a non-static source). These images are served through a servlet based on the request URL. This results in a request being generated per image, which leads to…
Zecrates
  • 2,952
  • 6
  • 33
  • 50
8
votes
5 answers

Pygame: Collision by Sides of Sprite

Is there a way in pygame to look for a collision between the a particular side of a sprite and a particular side of another sprite in pygame? For example, if the top of sprite A collides with the bottom of Sprite B, return True. I am certain there…
meyer0095
  • 137
  • 1
  • 1
  • 6
8
votes
1 answer

Is 1024x1024 a widely supported OpenGL maximum texture size on the desktop?

I am creating a sprite engine that uses the concept of "graphics banks" to speed up rendering using batches. I was wondering if anyone knows if 1024x1024 textures are widely supported enough these days to "count on", and/or if there is a way to…
Roger Levy
  • 105
  • 1
  • 1
  • 9
8
votes
1 answer

Using the same Compass sprite in different stylesheets

I'm using Compass to generate CSS sprites. I found a way to define a sprite once and use it across different .scss files, but I'm not sure this is the right solution. The best way I could find until now is: create a _variables.scss partial…
verlok
  • 173
  • 7
8
votes
2 answers

libgdx sprite fade out

I'm working on 2D shooting game in LibGdx. I have to mention that I'm new to LibGdx, and I'm trying really hard to understand how it works. I have experience in Java and Android programming for few years, so I understand game concepts. I'm…
Veljko
  • 1,893
  • 6
  • 28
  • 58
8
votes
1 answer

Android: Is there any way of speeding up canvas.drawBitmap?

Simple question, not sure sure there's a simple answer though!! Is there anything at all that I can do to speed up my surfaceview drawing? I'm using something like this: c.drawBitmap(scaledSprite, X, Y, redPaint); The method that I'm using has to…
Zippy
  • 3,826
  • 5
  • 43
  • 96
8
votes
3 answers

Is it a good practice using an animated gif as CSS sprites?

I have a website that pops-up animated icons when you mouseover them But i think that maybe it could result in poor graphical performance from the browser. I could put animated icons in a sprite, and not-animated icons in another, but what is the…
yukatta
  • 505
  • 2
  • 7
  • 16
8
votes
1 answer

Maximixing the speed of particle rendering on HTML5

I am doing an experiment and attempting to improve the max particle count before frame-rates start to drop in HTML5 Canvas. I'm using requestAnimationFrame, I'm using drawImage from a canvas as this seems to be the fastest method for rendering…
BumbleShrimp
  • 2,150
  • 23
  • 42