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

OpenGL quads smaller than expected

Running on iPad. Mapping a texture that is 256x256 onto a quad. I'm trying to render it exactly the same size as the actual image. The quad looks correct (shape is right, texture mapped correctly), but it is only ~75% of the size of the actual…
Gerald
  • 21
  • 3
1
vote
1 answer

Unity isn't properly rendering 2D sprites

So for some reason my 2D sprites are rendering in a worng way. In the scene it's ok, but not in the actual game. What I tried: Filtering mode: Point(no filter) Tried different Max Size options Tried different Pixels Per Unit options Nothing seems to…
nikolajeff
  • 19
  • 1
1
vote
1 answer

CSS sprite, jQuery fadeIn/fadeOut, transparent PNG, and IE: wtf?

My situation is perhaps one of the most masochistic in which I've ever been. I have a series of images that fade in and fade out over a period of time using jQuery. They're all transparent PNGs. Because I'm interested in optimizing the speed of my…
Dany Joumaa
  • 2,030
  • 6
  • 30
  • 45
1
vote
1 answer

Mapbox GL JS: How to use multiple sprites for multiple data sources?

is there any way to use multiple sprite urls with mapbox gl js in combination with maputnik? Right now we are using just our own dataset but will add more external sources in the future. Problem right here is, we can't add all the possible sprites…
1
vote
2 answers

For a pygame.Surface element, is there a way I use .fill() to change a specific colour?

I'm making a game and have a fish sprite with alpha colour pink, I want to change the colour pink on to something else, so fo instance here I tried to change it to orange but instead it made it red because I think it's blending somehow? Is there a…
1
vote
1 answer

SVG sprite issue with Laravel Mix

I'm struggled with the following and would appreciate any help...! I try to use Laravel Mix (v5.0.4) and extend it with SVG sprite loader (svg-sprite-loader) to generate SVG sprite. I have the following folder structure: resources/ images/ …
Sas Sam
  • 681
  • 4
  • 10
  • 25
1
vote
2 answers

Background images in HTML but not CSS

Doing an online programming course and completely stuck on this bit. Have tried the same thing in Brackets / Atom / Sublime and all do the same thing. I can view an image no probs if it is called in src="" in html but trying to call it as a…
Lizzard
  • 21
  • 2
1
vote
1 answer

my pygame bullet sprites only fire once each time through loop. would like to fire multiple times

i'm very new to coding, and i'm trying to get a ship to fire multiple bullets, but every time i push spacebar the bullet sort of re-triggers and doesn't make it to the end of the screen. it seems maybe only one instance of my Bullet class is called…
1
vote
1 answer

Different ways to detect size of image on mesh versus size of mesh

I'm creating a puzzle game that generates random sized pieces with 2D meshes. The images contain transparent portions and sometimes a piece is completely transparent. I need to detect what percentage of a piece is transparent. One way I found to…
Cassova
  • 530
  • 1
  • 3
  • 20
1
vote
1 answer

Check sprite collision only for one side

Hey I have a problem with my game code. Is there a way to check if, for example, the right side of my player sprite (hero) is colliding with the group obstacle_sprite? I can only figure out how to check for collision in general but I want only a…
ZoKi Mo
  • 51
  • 1
  • 5
1
vote
1 answer

Accelerate floatanimation in Delphi

there is a way to accelerate a floatAnimator in delphi ? such as increase or decrease velocity of a sprite when a key is pressed ? thanks
1
vote
0 answers

How to Connect Two Box2D Libgdx Bodies Together (Body and a Head)

I have a rendered animated boy and I have a rendered animated head. They both use Box2d bodies and they are both circle shapes. My question is how do I combine the two together so that I have a head on top of a body. Currently the body can move…
1
vote
2 answers

How can I flip loaded image sprites? Pygame

I want to flip these sprites so that they're facing left. That way I can use the sprite images for my player running left when I press K_LEFT. Currently have it where if you press the right arrow your player moves right and animates. …
Master Chef
  • 65
  • 1
  • 12
1
vote
1 answer

Questions with creating sprites in pygame

So basically what I know how to do is add a player sprite (make a player class that inherits from pygame.sprite, etc...) this works for me. What I would like to know how to do is iterate the creation of sprites and add them to the sprite group. This…
1
vote
2 answers

use pygame.sprite.collide_mask() within pygame.sprite.groupcollide() efficiently

Here is my code: hit_list = pygame.sprite.groupcollide(all_bats, all_sword, False, True, collided = pygame.sprite.collide_mask(bat_front1, sword1)) for self in hit_list: self.bat_health -= 1 if self.bat_health == 0: …
Owen Penn
  • 163
  • 9