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
2 answers

Using SpriteBatch.Begin() within other SpriteBatch.Begin()

Hey guys, i'm trying to use the following drawing logic: Class Game { Character x; public Draw(...) { spriteBatch.Begin(transformation1); x.Draw(); spriteBatch.End(); spriteBatch.Begin(transformation2); …
xlar8or
  • 601
  • 9
  • 18
1
vote
1 answer

How to draw same sprite in multiple box2d object layers.?

I am working on a game, it is my first time...I encountered a issue, that I cant help myself to solve. Lets cut to the chase, I have a coin class, It draws coins to the only one box2D body, but In that layer(which I made in tiled), I have more 1…
calculusnoob
  • 165
  • 1
  • 11
1
vote
1 answer

Loading a large number of images from a spritesheet

I'm attempting to make a simple game of Pairs for Android. Program Structure: Menu.java (Menu activity initially loaded) Game.java (Game activity, started by Menu) GameThread.java (Handles gameloop, calls render process in GameView) GameView.java…
woodstock365
  • 1,780
  • 4
  • 19
  • 35
1
vote
1 answer

How to implement CSS sprite background into existing JavaScript variable?

I would like to add a sprite image to an existing button which previously used its own image "play.png" which I replaced with "spacer.png" (this item is already set to a fixed soze of 30x35pixels in the css). Goal is to save http requests by…
Sam
  • 15,254
  • 25
  • 90
  • 145
1
vote
1 answer

How to clip and mask sprites in Pixi.js like `clip-path` in CSS

In CSS, we can mask/clip a square image inside a shape with clip-path, for example, clip-path: ellipse(60px 40px at 75px 30px); clips the image to an ellipse. How can I clip a sprite into an ellipse in Pixi.js?
John
  • 2,675
  • 3
  • 13
  • 20
1
vote
1 answer

Check for collision and stop velocity in pygame

I am trying to make a simple platformer in pygame, with simulated gravity and collision. I can't make the collision working. On collision with a sprite, the player slowly falls through the sprite and continues falling at normal speed when reached…
Viktoracri
  • 61
  • 1
  • 7
1
vote
1 answer

Animating sprites in sfml from a sprite sheet

I am trying to animate a sprite in sfml. At the moment I am able to move the sprite and change it's image when moving in a different direction, but I want to animate it while it is moving. I am thinking that there might be a way to accomplish this…
DapperDaniel
  • 75
  • 1
  • 10
1
vote
2 answers

What Happens When Setting transform.up in Unity

What happens when I set the transform.up value in unity. Specifically could you explain this video in the link below https://youtu.be/_XdqA3xbP2A I know it changes what the object is looking at. But, does it look at a position, or how does it work?…
BeastCoder
  • 2,391
  • 3
  • 15
  • 26
1
vote
1 answer

How do I use .spritecollide() in pygame to detect for collisions?

I am trying to learn how to use pygame by creating a simple 'shmup' game with blocks. When running the code, no errors are shown, however the game does not seem to be detecting collisions between the sprites. Am I using this incorrectly? Any help…
KHumphs
  • 55
  • 1
  • 6
1
vote
1 answer

I want to show a pygame button, which is inherited from pygame.sprite.Sprite, but it is not getting blitted on the display

All I am building a game with the PYGame library. I am struggeling with this piece of code, where I want to schow a button. The button is inherited from the pygame.sprite.Sprite class. I have searched around but I could not find any example wiht a…
1
vote
1 answer

Spawning multiple SKSpriteNodes

So im making a game which is pretty much like four squares except you have 20 sprites to place before a square is chosen. I just need help on how to add multiple different sprites by taping the screen 20 times (each time is a different sprite)…
1
vote
0 answers

Sprite shadow in 3D world

I am trying to project shadows from sprites on 3D objects, i followed some tips here and there but i still have issues. I created a material that use Legacy Shaders/Transparent/Cutout/Diffuse and add it to my sprite, i also enable ShadowCastingMode…
reonZ
  • 135
  • 2
  • 10
1
vote
2 answers

Need to add image in the Instantiated object

I am following a tutorial on youtube.This is a swipe menu tutorial. https://www.youtube.com/watch?v=njfc_QYKdio&t=229s I tried and understood what he have done. public class SecMenuScene : MonoBehaviour { [Range(1, 50)] …
user5234003
  • 77
  • 1
  • 9
1
vote
1 answer

Unity3D asset bundle sprites/default shader issue

I've updated my unity from 5.5.2f1 to 5.5.5p2, after building my first build, all of the assets containing sprite renderers where the shader is "sprites/default" downloaded from the cloud (which were working perfectly on builds from earlier version)…
user51929
  • 185
  • 1
  • 15
1
vote
1 answer

Console error: 'Uncaught SyntaxError: Unexpected token : Learning sprites'

This is my code (I am linking it because I do not know where the problem is and I do not want to link it all to this post). I am getting this error in the console: The error is in line 57, but I do not know what is wrong. rectangle = { height…