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 to get auto width for SVG icon inside a sprite?

I've a problem in setting automatic width for SVG icons, preserving aspect ratio, having a fixed height for Firefox, Chrome and IE11. I know this is a common problem and I've read examples reported in this very good article, but I cannot find a…
caneta
  • 1,612
  • 2
  • 20
  • 34
1
vote
2 answers

How do you move a sprite completely offscreen?

My sprite moves to the left, as it should but it stops moving and does not go offscreen, as I want it to. It's as if there is an invisible wall. I have tried https://www.youtube.com/watch?v=YfIOPWuUjn8. In the video, the person's sprite completely…
HSN720
  • 71
  • 2
  • 12
1
vote
0 answers

SVG sprite rendering is blurry in threejs

I am loading an svg into a sprite using THREE.TextureLoader. the sprite that is displyed looks like it took the SVG and rendered it as png/bitmap. Is there a way to render SVG's as sprites and still have them displayed as vector graphics? var map…
Shai Kimchi
  • 746
  • 1
  • 4
  • 22
1
vote
0 answers

How can I keep sprites stacked vertically in threejs?

I'm trying to arrange a scene in threejs where by I will eventually have multiple sprites representing players. In order to highlight the currently active player, I want to position another sprite, such that it appears above the players head. I…
KevB
  • 3,570
  • 1
  • 26
  • 29
1
vote
1 answer

Pygame sprite-collision detection doesnt work

When I trie to detect a collision between the two rectangles with hit = pygame.sprite.groupcollide(enemy_sprites, player_sprites, 1, 1) it only prints "HIT" once when I start the program also I tried to detect the collision with hit =…
thefakejeff
  • 57
  • 1
  • 7
1
vote
1 answer

How to get continuous movement of rendered sprite image ( pygame )

I'd like to run the application to move the character continuously as long as a key is pressed, this code only manipulates the rendered image once upon key press. I've tried while loops in hopes that while the key is pressed, perform action, but…
HelloWorld
  • 35
  • 5
1
vote
1 answer

Make image appear for 300ms when pressing space

I asked this question earlier but I think I formulated myself wrong, so this time I will add pictures. I have a game where there is a man (well actually Donald Trump) at the bottom of the screen shooting bullets upwards to the top of the screen at…
1
vote
1 answer

Sprite disappears after holding SPACE or DOWN when using scrolling background

When SPACE or DOWN is held, then the sprite disappears because of the scrolling background. When the background is a still image, it works. Furthermore the animation is fast so I used a timer to make it slower, but when the DOWN button is let go of,…
1
vote
1 answer

How do I open an image from a different directory in python for pygame

I am trying to open a png image that is not in the same folder as python. I dont know what to do even though I set the pathway. I don't know what to do at all image1 = pygame.image.load('Libraries\Pictures\pixel6.png') image1 =…
1
vote
0 answers

How to separate created group sprites into individual sprites

I'm trying to create a small game that has a soldier moving around a small area and fires bullets. I'm a new programmer who just started javascript not but a few months ago, and so I apologize if my question is poorly worded or my code is…
1
vote
1 answer

SMIL animation not working when I use with in symbol tag

I have a requirement to use the symbol tag and reference the SVG elements in the browser. those svgs are SMIL animation svgs. without symbol tag. it is working fine. but if I use within the symbol and use the reference. it is not working. attached…
1
vote
1 answer

SFML: How to solve sprite quality drop when rotating a sprite in sfml

The image on the link below consists of 20+ images(each body part and armor type in seperate files). This character is animated in the software called "Spriter". The code takes spriter's output file (.scml) then calculates the body parts' and armor…
Ozan Deniz
  • 27
  • 5
1
vote
1 answer

Attempting to create a moving sprite in java but there is an afterimage

I'm trying to create a moving sprite in java, which I have managed to do, except every time I move it there is an afterimage that follows the sprite. Are there any ways I could easily fix this problem without radically changing my code? I'm…
Evan
  • 11
  • 1
1
vote
2 answers

Pushbutton Engine - repeating/tiling art assets across sprites

So I'm creating a classic side-scroller using the Pushbutton Engine (http://www.pushbuttonengine.com) and I want the 'world' bits to be any given size, of course, and the repeat/tile my art assets. I've got the following render setup code as a…
1
vote
1 answer

Sprite pixel parsing to determine Vector

Given an image that can contain any variety of solid color images, what is the best method for parsing the image at a given point and then determining the slope (or Vector if you prefer) of that area? Being new to XNA development, I feel there must…