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

Calling my background Sprite to fill screen in Unity

I know that there are many questions like this on the net but I haven't found a solution to my problem yet... I'm trying to make a background image that fills the screen. In my game, there is a canvas and inside this Canvas there is a gameObject…
Jr Antonio
  • 193
  • 1
  • 4
  • 20
1
vote
1 answer

How to decompose a sprite in Unity?

I am trying to decompose this sprite into separate image files. The metadata for the sprite is here. I opened the project in Unity but couldn't find out how to decompose the sprites into separate files. Since there is a metadata file that has the…
Utku
  • 2,025
  • 22
  • 42
1
vote
1 answer

Why does it say I don't have a rect

I have put in the code self.rect = pygame.Rect(x, y, 100, 100). There is an AttributeError: type object 'MobRow1' has no attribute 'rect'. Why does this error keep popping up when I have put the rect in. I have tried self.rect = pygame.Rect(self.x,…
Max COSSETTO
  • 103
  • 7
1
vote
0 answers

Creating a 2D sprite with Trigger Events?

have been sitting at this problem the whole day, and I need some help from you guys. Basically in my have multiple sprites which need to have Event Triggers. I know they are easy to implement and I have played around with applying Event Triggers to…
AndroidFreak
  • 866
  • 1
  • 10
  • 31
1
vote
1 answer

Tiling Sprite in Android

I have these particles and I would like it to scroll down infinitely. What I mean is when whatever is drawn out of the screen when the particles scroll down, it goes back up and scrolls down from there again. Is this possible in android java?…
Troll PC
  • 85
  • 1
  • 1
  • 7
1
vote
1 answer

AttributeError: 'Mob' object has no attribute '_Sprite__g'

I am trying to make a sprite which spawns multiple times across the screen. The sprite will be used in a collision. The sprite previously had a randrange issue which I believe has been fixed. But none the less there is an issue with the sprite…
Max COSSETTO
  • 103
  • 7
1
vote
2 answers

What are width and height supposed to represent for a sprite?

I'm working with a Sprite in AS3. Initially, width,height are 0,0 as expected. After this: var tf : TextFormat = new TextFormat(); tf.font = "Arial"; tf.size = 48; tf.bold = true; text = new TextField(); text.text = "A"; …
Charlie Skilbeck
  • 1,081
  • 2
  • 15
  • 38
1
vote
0 answers

Sprite object is not iterable, Platform Game (Python)

I am creating a platform game. I was trying to do a platform that went constantly up and down like an elevator, when i got this error: TypeError: 'Sprite' object is not iterable. Here's the code related to the elevator: IN SET UP: self.platform_list…
MariaVila
  • 11
  • 1
1
vote
0 answers

Image transformation using Sprite

How can we use sprites to apply the image transformation in java/ android? I know we can use andEngine in android for this. I need to apply mesh warping and produce a bulge effect using sprite.
random
  • 10,238
  • 8
  • 57
  • 101
1
vote
2 answers

Put sprites inside another sprite(Phaser)

I'm making a game which basically is to move a truck with furniture to the destination. I'm using Phaser with P2 engine. I'm now facing problem with putting the furniture inside the truck. I've tried: 1. Making the truck parent and furniture…
WhaleShark
  • 75
  • 6
1
vote
2 answers

PyGame: why isn't collision working well?

It detects collision most of times, but sometimes it doesn't. Here is collision checker: def collide_check(this, object_1): bullet_rect = this.image.get_rect().move(this.bullet_x, this.bullet_y) object_1_rect =…
S4V4GE
  • 21
  • 3
1
vote
1 answer

How can I make a sprite unable to pass through lines?

So I've imported a maze image (png) as the background of my canvas, and drawn lines over the corresponding lines in the image in p5. I've created a sprite which is my 'character' and it's just a small image, and all it's doing at the moment is…
1
vote
4 answers

CSS Sprite Not Styled

I am having a problem with my css sprites. It looks like it is working (well, to me it looks like it should work). All the sprites just show the first icon but not the other ones. Looked at many places and could not find an answer. Thanks for…
ambiguousmouse
  • 1,983
  • 3
  • 22
  • 27
1
vote
1 answer

Pygame sprite sheet hitbox broken

I made a simple game, where you have to jump over the stones moving towards you. The problem is that one of those sprites hitboxes is broken, even if the sprite mask is used. The player sprite is generated just dividing the player sprite sheet into…
Taavi Raudkivi
  • 71
  • 1
  • 2
  • 6
1
vote
0 answers

HTML canvas is leaving the trails on the horizontal translate move

I'm trying to understand how HTML canvas works. I know the basics and I'm coding a 2D game, but I have so many questions regarding it and its weird behaviour. I have different versions of code and each gives me different results when moving the…
Limpuls
  • 856
  • 1
  • 19
  • 37