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

Unity sprites are stretched on iPhone X

I have sprites for game ui/canvases and they are stretched on iPhone X view. When I scale for iPhone X, they become stretched on other iPhones.
1
vote
1 answer

Mouse hover on Sprite object Pyglet?

I want to know if there is a way to catching mouse hover on sprite object with Pyglet? my_sprite = pyglet.sprite.Sprite(image, x, y) something like this in Tkinter : sprite.bind(circle, "", on_enter)
1
vote
1 answer

How do I duplicate a sprite on screen multiple times with each sprite having the same code?

I'm trying to duplicate sprites on the screen, but I can't do that without making multiple sprites. I found somebody else ask the same question but what I am trying to do is, for example, click somewhere in the window and make the sprite appear…
A. Kim
  • 102
  • 2
  • 9
1
vote
1 answer

CSFML unintended repeating texture behaviour

I'm working on a CSFML 2d runner game project and want to implement some parallax to give the player an impression of speed. To do this I'd like to have some assets repeated through sfTexture_setRepeated but alas. It doesn't repeat them, it extends…
Sir Wrexes
  • 101
  • 1
  • 10
1
vote
1 answer

Pygame mouse click detection on moving sprites

I'm making a "duck hunt" game in pygame. I have everything working, my sprites move and respawn when needed, cursor is a crosshair with sound when clicked etc. The issue I'm having is trying to add points when the mouse is click on a duck. Any idea…
RocktheFries
  • 221
  • 2
  • 10
1
vote
0 answers

Flutter spritewidget how to use sprite sheet

I have been trying to make an animation work with spritewidget, but I can't seem to see how they make this work. I have the following await _fireworksImageMap.load([ …
carlosx2
  • 1,672
  • 16
  • 23
1
vote
1 answer

Unity sprite animation change first sprite on loop

I have the following sprite animator: I want to reproduce all 10 sprites on first loop, but on second loop I want to start at sprite number 6. That's because the 5 firsts sprites are from make a good transition to walk to run, but once zombie is…
Lechucico
  • 1,914
  • 7
  • 27
  • 60
1
vote
1 answer

Unity. Build don't play animations

I have an animation of movement which consist of basic 2D multiple sprite. The animation is working correctly only in the editor but it is not showing in the build. After I run the build the animated object is created but I can't see it. While I was…
Ailixia
  • 11
  • 1
  • 5
1
vote
1 answer

How do I leave a trail behind a sprite with pygame?

It's known that if you move a sprite without filling the screen before it leaves a trail, however, I want to leave a cool trail behind my while moving other stuff (which means I cannot simply stop filling the screen. Thanks in advance for any help
Gustavo Exel
  • 19
  • 1
  • 6
1
vote
2 answers

Moving Sprites across a screen

So I'm back at making a game and I was coding in the gameplay mechanics (it's a dodge-the-bullet, I was making the bullets) The bullets should keep generating from the top sprite (Minty) and keep spreading out(trust me, I've spent a lot of time…
1
vote
1 answer

Curve Sprite Movement COCOS2D

I'm trying with no luck to move a sprite position in an simetric curve way with the touch drag. So far I use the following code with no luck -(BOOL) ccTouchBegan:(UITouch*)touch withEvent:(UIEvent *)event { lastTouchLocation = [MultiLayer…
1
vote
1 answer

Moving sprites individually in Pygame

I'm trying to make multiple sprites follow the same algorithm that follows the main player. This is my code for my Sprite class Zombie(pygame.sprite.Sprite): def __init__(self): pygame.sprite.Sprite.__init__(self) self.image =…
Miffuine
  • 31
  • 2
1
vote
1 answer

Spritekit nodes are not colliding even though contact mask are set up

In the code below I have a couple nodes but right now I am just trying to detect collisions between the player and the enemy bullet( I refer to it as "BBullet") but under the function that detects collisions, nothing pops up. import SpriteKit import…
1
vote
1 answer

not showing sprite animation in cocos2d

I am creating animation in sprite.I am changing sprite after perticular period and repeating it forever.I have referred many site and the format is same as below: -(id) init { if( (self=[super init] )) { CCSpriteSheet…
user392406
  • 1,323
  • 5
  • 28
  • 53
1
vote
1 answer

Pygame.spritecollide() detecting collision between sprites even when they are not touching

I have not found any questions similar to this on the internet. I want pygame to detect when the player is colliding with another sprite, such as the chest or one of the monsters, but it is detecting the player is colliding with them even when they…
gsmith257
  • 45
  • 5