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 make a sprite to do a visible moving from a position to a mouse click in monogame?

I am making a fireball, which is moving to a mouse clicked position. The fireball sprite is already moving to the postion, but I can't see the fireball fly. I want to see, that the fireball "flys" to the postion? here is my monogame code, written in…
Arenosa
  • 41
  • 10
1
vote
0 answers

Image not rendering inside SVG

I have a sprite of SVG like this: ...
Maicon Furtado
  • 298
  • 1
  • 4
  • 15
1
vote
1 answer

Unity - How to combine sprites into one

I want to make RPG game using Unity2d with the tile feature to draw the game map. I created a new class inherited from UnityEngine.Tilemaps.Tile and overrided void GetTileData. In void GetTileData I determine the sprite to show for each tile…
user11847100
1
vote
1 answer

DirectX Texture Warping

I am writing a WIN32 DirectX 9 program in which I load a few textures (a person and a background) and display them on the screen. However, they become warped (stretched), not being a one-to-one representation of what I drew in Paint. I tried…
Ryan K
  • 3,985
  • 4
  • 39
  • 42
1
vote
0 answers

Stretchable moving sprite spline with rigid body 2D

I've created a platform with unity where you can stretch it out with touch by using Sprite Shape Controller. The ideas is that upon touch you can drag this platform and curve it and follow your mouse like so: I've got it working pretty much…
Jorayen
  • 1,737
  • 2
  • 21
  • 52
1
vote
1 answer

Curve and stretch a sprite to mouse click/touch

I wish to create a game object where you can start dragging it by touching somewhere on the line of its collision and to create these "dynamic shapes" by stretching the sprites and readjusting the sprite look and collision according to the drag…
Jorayen
  • 1,737
  • 2
  • 21
  • 52
1
vote
2 answers

Is there a way to change my_sprite or my_group to change the animation displayed?

I'm making animated sprites in pygame, and would like help finding a way to flip from one to the other? The current code looks something like this: class normal(pygame.sprite.Sprite): def __init__(self): #etc, list of images to create the…
1
vote
1 answer

How to adjust the size of sprites according to different screen resolutions in unity?

I am working on a 2d project.I am using different sprites of different pixels inside my project.Each sprites are having different height and width not square sides. For example look at the sprite settings in the project.Similarly there are many…
zyonneo
  • 1,319
  • 5
  • 25
  • 63
1
vote
1 answer

Add sprite in function in Phaser 3

I am adding a sprite to my game like this: enemy = this.physics.add.sprite(280, 32, 'enemy'); Now I'd like to add it from inside a function like this: spawn(this.enemy); function spawn(enemy) { enemy = this.physics.add.sprite(280, 32,…
Hade0011
  • 81
  • 3
  • 10
1
vote
1 answer

Function to create a sprite and set its color

I have an item which is created from a SQL Database. I have been using a GetSprite() function successfully until now... Now I need this function to change the color of the sprite if a custom color is specified. // The Items come from a SQL…
1
vote
1 answer

Android: AndEngine - AnimatedSprite texture size too large?

sorry if this issue's been asked before but I couldn't find a reference to it, trying to start using andEngine and I'm trying to use an image 3360x720, because it's tiled with 7 columns. I've tried this method: // Initialize the…
While-E
  • 1,527
  • 2
  • 20
  • 37
1
vote
0 answers

Unity 2D Tilemap, and ever increasing Total Object Count

I'm creating a game that uses an 80x40 2D Tilemap, using procedural terrain generation. Currently, creating the map works flawlessly, as well as re-building with a button press (as many times as I want). And, I'm getting really great graphical…
AntonEagle
  • 19
  • 2
1
vote
1 answer

How can I deepcopy a pygame sprite group?

I am trying to implement a chess AI using a monte carlo tree search. This requires playing through 800 random games from each position to evaluate the value of each move. However, I am using a pygame sprite group to hold instances of the pieces,…
Arkleseisure
  • 416
  • 5
  • 19
1
vote
1 answer

Crack C64 game with sprite collision

I'm trying to crack an old commodore game called "Katz und maus". I already realized the infinite lives, rewrite scores and I'm halfway on implementing the level jump. I think sprite collision will be the key to finish the level jump. The problem is…
Paxi
  • 111
  • 11
1
vote
2 answers

Change image via in scriptable object in Unity

So im trying to make a Text adventurer game and i want to change the background of the game when a specific dialogue shows up. I already have a black Image at the start and want to change it throughout the game. I've made a scriptable object for the…
user10823919