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
1 answer

How can I fix my sprite animation in pygame?

I'm coding a game in python 3 (with pygame) for a school project, but i'm struggeling with something: I'm trying to get my sprite to have an animation when moving, but it only shows a static image: when i press the left key, the sprite's image…
Thadboy
  • 29
  • 6
1
vote
2 answers

Unity - sprites take up more memory than textures? Causes a black screen after launch on device?

I have a series of sprites Im using to animate a UI animation that needs to be on a canvas - theres about 500 because I exported a png sequence from aftereffects and I flip through them with a canvas image with this: public class VideoPlayerRawImage…
UserDude
  • 323
  • 1
  • 3
  • 18
1
vote
1 answer

Pygame error argument must be pygame.surface not None

The problem I am getting is an error when I have entered the sprite, the error states: Traceback (most recent call last): File "C:\Users\User\Documents\Pygame\pygame1.py", line 88, in drawGrid() File…
1
vote
1 answer

The sprite doesn't follow the box2d body when the camera translate but works well if the camera is static in libgdx

My problem is the following, when i don't move my camera my sprite follow my box2d body well. But when i implement the scrolling aka i use cam.translate the sprite go each frame to high until it disapear. The weird thing is that if i check the…
elenox
  • 13
  • 2
1
vote
1 answer

Pygame argument 2 must be pygame.surface not str

My code so far, the problem I have is that when I enter the sprite from the selection, I get an error stating that the argument must be surface not string. I am wondering how to fix this. What I am trying to do is have the user select a sprite from…
1
vote
3 answers

Sprites and Arrays as3

I have a sprite called food which adds to the screen via the use of a timer. more food items are added to the screen over time. How would i hit test all these food sprites with another object? (the makeItem function creates the sprite btw) private…
DIM3NSION
  • 1,681
  • 5
  • 20
  • 38
1
vote
2 answers

How do i color key, in c#, in xna?

I've started on a small game and downloaded some great 2d sprites from http://reinerstileset.4players.de. However, his background (unknown) is a brown color that I want to remove. Is there a way that I can check pixel at (1,1) and set that pixel as…
Jason94
  • 13,320
  • 37
  • 106
  • 184
1
vote
3 answers

Image trail when moving bitmap in Android

I'm trying to program a little game for Android, and when I draw the bitmap and animate it using Sprites, I can see a trail in the image! (it's a PNG image). I know it is not a problem of the sprites, because I used a static image moving along the…
noloman
  • 11,411
  • 20
  • 82
  • 129
1
vote
1 answer

Python: How can I combine several sprites into one and save the image?

Currently, I am working on a 2D top-down style RPG (in Pygame; newest version of Python), and I want to make the character drawing process as simple as possible. However, I have no earthly idea of how to pull it off. I know already that drawing out…
1
vote
1 answer

Animating a multiple sprite without animator in Unity

So I have this multiple sprite in which there are eight sprites. I want to show them to the player one by one with say 0.5 second delay, like an animation. I can easily do it using animation and animator and stuff in Unity, but I want to do it…
Gordafarid
  • 143
  • 1
  • 1
  • 9
1
vote
1 answer

Tap "under" SpriteWidget layer

I would like to combine Flutter SpriteWidget with common app design like this: @override Widget build(BuildContext context) { return Scaffold( body: Stack( fit: StackFit.expand, children: [ Image.asset( …
Zoltan
  • 43
  • 1
  • 8
1
vote
1 answer

How to modify sprite position using 65c816 Assembly for the SNES?

I am trying to modify my sprite's position, but I can't figure out how to I have spent hours searching for answers, but none of which work with the assembler I am using: WLA-DX. I am extremely new to 6502 assembly, so forgive me if my logic is…
Priswall
  • 21
  • 5
1
vote
1 answer

Sprite animation flashing

I'm doing a basic javascript based game from my studies as homework. While the animation going right just fine, when press on the left Key, I don't find to understand how to make the code taking the second row of the image properly that will show…
Yakir Malka
  • 308
  • 2
  • 11
1
vote
1 answer

How to detect and end game when a pygame sprite runs into its tail (using screen.get_at)?

I created a snake-like game in which the user moves the sprite, and the sprite leaves a trail. If the user runs into the trail he's created, I'd like the game to end, and the player to lose. As the sprite moves, it makes a white trail on a black…
Gal
  • 41
  • 6
1
vote
1 answer

Using a function inside another function doesn't work: variable is not defined

We are coding a game with JavaScript. We are almost there. The only thing is the realising the last loop. We want to do this with a function. If we start a function in this loop we get an error. If we skip the first function, the following function…
user10871993