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
1
vote
2 answers

CSS Sprites - code works in Chrome, fails in FF and IE... why?

I am using sprites to control two graphical navigation elements. The CSS I have written works perfectly in Chrome, but fails in FF and IE. The CSS is: a.gallery-left{ margin-top: 5px; background: url('arrows_sprited.png') 0 0px; width: 45px; …
Will Gill
  • 577
  • 2
  • 10
  • 21
1
vote
1 answer

Collide_Rect not detecting

Is there some reason why my pieces are detecting a collision in the play function? When I print out the location of the pieces, they say that they are in the correct place, but the collision is not picking up on it for some reason. import…
1
vote
2 answers

Unity C# Imported PNG won't show up in sprite source image

In my unity C# project I want to assign an important PNG image to a sprite. However the images I have important don't show up in the sprite selection menu.
1
vote
2 answers

Cocos2d-x setContentSize gives poor graphic quality

I want to create sprite with size is relative to the screen size. I.e: Sprite size is equal to screen width * 0.2. I use setContentSize and setScale but it gives ugly and poor graphic quality. I've read about multiple resolution supports, but it…
TomSawyer
  • 3,711
  • 6
  • 44
  • 79
1
vote
1 answer

Sprite animation wobbly / jumping in IE11

I built a semi-transparent sprite png which can be found at https://www.srf.ch/static/srf-data/test_sprite.png It is a 17280px high and 910px wide png (30 * 576 = 17280) - everything seems correct. I now want to loop through each frame (it should…
grssnbchr
  • 2,877
  • 7
  • 37
  • 71
1
vote
1 answer

Keyboard input using socket.io

At the moment I have been able to get the sprite to move using the mouse but I am stuck on getting it to move using the keyboard Client code shortened: var Client = {}; Client.socket = io.connect(); Client.sendClick = function(x,y){ …
1
vote
2 answers

How can I randomly generate 2 colors?

I am making a RISK game in unity. I have 42 sprites of countries, and I have to generate random colors for each one, for example for 2 players 21 green and 21 red. How can I generate color randomly ? { this.GetComponent().color…
Awais Chaudhry
  • 47
  • 1
  • 1
  • 9
1
vote
1 answer

Arrange elements in sprite to improve PNG compression

Given a huge sprite like this one. Is it possible to order the elements (emojis in this case) in a way that the resulting PNG file size becomes significantly smaller? Extra question. I've read that, in the filtering phase, for each scanline, the…
Pedro L.
  • 7,376
  • 3
  • 25
  • 27
1
vote
2 answers

Is it possible to combine more than one SpriteSortMode for SpriteBatch.Begin?

I want to sort sprites by layer depth (i.e. SpriteSortMode.BackToFront) but also sort them by SpriteSortMode.Immediate (which my understanding is the last thing to be drawn gets drawn on top of everything else). The reason I want this behaviour is…
meds
  • 21,699
  • 37
  • 163
  • 314
1
vote
1 answer

SKSpriteNode creation with static methods and properties

Hi, guys! I'am writing game with SpriteKit framework and I try to make object with several configurations so I have to use static to avoid init method and some boilerplate code with decoder. So I wrote code but I'am not really know if this code is…
wm.p1us
  • 2,019
  • 2
  • 27
  • 38
1
vote
1 answer

Css animation with steps jitters/shakes in Explorer and do not play in Firefox

I have animated sprites with css steps and when tested on Firefox and Explorer11 i understand that it do not behave like Chrome. I have the animattion like the below @keyframes sprite { from { background-position: 0 0%; } to { background-position:…
1
vote
0 answers

I need a vertical disintegration shader for 2d sprite objects with Unity3D

I am making a 2D game with Unity3D and I need disintegration shader for sprites like the following picture (the picture is horizontal, i need it vertical) The shader should have the following possibilites: It should desintegrate the image from one…
Dimitar Popov
  • 686
  • 5
  • 12
1
vote
0 answers

Array list for sprites in android game/app

I'm trying to get more than one sprite on screen (two for now to see if I can get it going) but all it does is just display the one still. My code is as follows (it's all in one class: public class GameView extends SurfaceView implements…
Phil Adams
  • 95
  • 2
  • 16
1
vote
1 answer

Getting a sprite to bounce off the walls/edges in android app

Most learned friends I have a sprite that moves around on screen but at the moment it just moves diagonally from left to right and goes off screen and then comes back on the other side. What I would like it to do is bounce off the edges of the…
Phil Adams
  • 95
  • 2
  • 16
1
vote
1 answer

Sprite disappear shader

i am working on Unity 2D platform game. i am using a shader i found here, but when i flip my sprite (scale -1), the sprite disappeared, i have little understand in shader coding, And i didn't found any help on Google, can any one help fixing the…
Dude
  • 887
  • 6
  • 15
1 2 3
99
100