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

Converting a texture to a sprite

I have a texture that I use as a screenshot of the screen. When I save the texture as a png file it seems perfect, but I also want to show the captured image on the screen. So I converted the Texture to Sprite but for some reason, the final result…
SHAI
  • 789
  • 3
  • 10
  • 43
1
vote
1 answer

What are SVG Sprites?

I know what are image sprites. Just want to know is there any difference between image sprites and SVG sprites??
Mahima
  • 489
  • 1
  • 5
  • 17
1
vote
3 answers

Java Sprite should be merged with Data Structure

I'm building my own Canvas-style JPanel subclass which will draw a graph of nodes and arcs. As part of this application I am delegating the drawing of the nodes to a sprite class Node, i.e Class Visualiser extends JPanel { ... …
Adam
  • 5,091
  • 5
  • 32
  • 49
1
vote
0 answers

Auto-resizing texture at the beginning of the animation

I have one question. For animation of my object i using this method in Player class: func animationPlayerMovement(action: Bool) { for i in 1...3 { let name = "player \(i)" playerTextures.append(SKTexture(imageNamed:…
1
vote
1 answer

Collision Detection in Cocos2D

I am trying to detect collisions in cocos2D. I am using this code: - (void)checkForCollisionSpeedUp:(ccTime)dt { CGRect projectileRect = CGRectMake( guy.position.x, …
tallen11
  • 1,387
  • 2
  • 17
  • 33
1
vote
1 answer

is there a limit to the size of a SKSpriteNode() texture? (4000 x 4000)

I have been adding textures to SKSpriteNode() and also getting the texture from nodes in order to change them. When adding textures I can't add a texture over 4000 wide or high without it resulting in a black SKSpriteNode() (the texture exists, its…
carl
  • 121
  • 1
  • 8
1
vote
0 answers

Sprite's crash Google Chrome

I have strange problem. I'm trying to make 4 sprite's controlled by sliders which need to look like this: Code works fine, and when I'm make a change of position of slider JS updates background-position of sprite. My solution works good on Firefox…
KGROZA
  • 63
  • 7
1
vote
3 answers

Moving A sprite position with jQuery

I have an image that is a sprite, I want to move the scroll location onClick of another div with jquery please help .top-background{ background: url("../images/mainall.jpg") no-repeat scroll 0px 0px transparent; height: 888px; …
ChrisNoob
  • 13
  • 3
1
vote
1 answer

AndEngine duration between animation

I am developing a simple game which is totally based on animation. For this app, I am using AndEngine SDK. I am totally new in developing games in Android. I googled it lot, but all articles are so advanced and that are of no use for me in this…
MKP
  • 141
  • 1
  • 11
1
vote
0 answers

AS3: Is sprite's x value not a number?

I find this strange: trace("typeof: ",typeof(sprite.x)); trace("getClassName: ,getQualifiedClassName(sprite.x)); // Output: typeof: number getClassName: int Which makes a sprite's property "x" a number? ...or an integer?…
Chowzen
  • 321
  • 3
  • 12
1
vote
0 answers

How to get sprite animation to play just the next frame when button is pressed

I am extremely new to coding. I have managed to put together the following code. This is just a simple start to a bigger project. (learning how to do the pieces) When I press the Next button i only want it to show the next frame in sprite and then…
kelvin
  • 11
  • 2
1
vote
1 answer

Return a sprite to its original position?

So I have a very basic PyGame Python program which is a 'car' that the user controls and one which comes down he road towards it. How can I get the NPC car to return to its original position once it leaves the screen? My current code is shown below,…
Dan Hill
  • 43
  • 5
1
vote
2 answers

Could not draw the pillars of flappy bird using sprite in pygame

I am making a flappy bird clone game, using pygame. I want to draw pillars by using Sprite.draw. I made a Pillar class and initialized it with two rectangles p_upper and p_lower on the left side of the screen, coming towards the right side with the…
1
vote
0 answers

How to show full tilemap using phaser?

I have created tilemap using Tiled software of pixel size 1200x1000. While rendering it using phaser I have set width equal to 500 and height equal to 400.After this only map of 500x400 area is loading and remaining part is missing. How can I show…
Ashish
  • 85
  • 1
  • 2
  • 14
1
vote
1 answer

Exclude SVG from gulp-svg-sprite build process

I'm currently building an SVG Icon system using gulp-svg-sprite and have run into a situation where I need to exclude some icons from the build process. Is there a way to EXCLUDE an SVG from running through these 2 pipes? Somehow I need to get the…