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

Issue with pygame.transform.rotate(), Index is apparently out of range

So I am working on a basic PacMan game, and am trying to get my player to run through its sprite_sheet to show an animation. It works flawlessly when I am moving it right (thats the original orientation of the image), however for any of the other…
Addison
  • 403
  • 8
  • 24
1
vote
1 answer

Android libgdx enemies movement with respawn

Im making a 2d game and I want enemies go right to the left and when one enemy goes out of the screen (on the left), instantly appears at the beggining again (on the right). How can I do this? I can do the movement with addAction without a problem,…
MarcusF
  • 43
  • 7
1
vote
0 answers

{javascript} SPRITE buttons sticky hover state

I am making a game in javascript/html5. I have buttons which I draw from a sprite sheet. I am attempting to get the hover state for the buttons working correctly. Currently the hover state draws when a button is hovered over, but does not "un hover"…
1
vote
1 answer

Pygame collision: spritecollide has no output

I made a game where you can jump with a sprite and obstacles are moving towards the player. I made a sprite mask to dedect the collision, but nothing happens: for checking I made a simple print statement, what works when two sprites collide. I…
Taavi Raudkivi
  • 71
  • 1
  • 2
  • 6
1
vote
1 answer

How to remove black background from sprite in sprite sheet in pygame

I am trying to remove the black background from this sprite taken from a sprite sheet. As you'll see in the following is the code and suggested by this post (Transparent spritesheet has black background), I've tried to use the pygame.SRCALPHA flag…
Eric
  • 363
  • 2
  • 9
  • 24
1
vote
1 answer

Three.js raycaster intersection with sprites is completely off to the left

I have sprites with text on screen, placed in spherical pattern and I want to allow user to click on individual words and highlight them. Now the problem is that when I do raycasting and do raycaster.intersectObjects() it returns sprites that are…
1
vote
1 answer

Unity spritesheet or animation

Currently i'm drawing sprites for my game. I'm developing the game in unity for android. So, the question is which way out of 2 is the best: 1. Create sprite, animate it in adobe after effects and export it as PNG sequence, then make a spritesheet…
1
vote
0 answers

Is multiple class assignment in the example html that gulp-svg-sprite provides possible?

Using the gulp-svg-sprite plugin, I'm able to get an example html which uses the generated svg sprite. There, the s which the s automatically have a class according to the shape ID. This class is of the form mode..prefix…
mknd7
  • 21
  • 3
1
vote
1 answer

Sprite Position Moves Faster than Viewport

I was doing some things with a viewport yesterday in XNA, and couldn't figure out why the sprite I'm using moves faster than my viewport when changing the positions. I had a feeling that it may have something to do with the different value types…
Lander
  • 3,369
  • 2
  • 37
  • 53
1
vote
1 answer

Strange errors when changing out the sprite

var game = new Phaser.Game(400, 600, Phaser.AUTO, '', { preload: preload, create: create, update: update }); //creating score value and onscreen text var score = 0; var scoreText; function preload() { // preload assets …
user2387766
1
vote
2 answers

libgdx how to detect collisions?

I have a Problem to detect collisions. I'm using TiledMap and created a virtual joystick, so that its possible to move in every direction not just left, right, top, bottom. The Point of View is directly 90 degrees from the top. I don't know if…
Domooo93
  • 55
  • 7
1
vote
0 answers

Adding changing sprite groups to a normal list (pygame)

I have started to make a platforming game in pygame. In the game, I want to use a 'timewarp' option, which allows the player to go back to a previous point int he game with all the variables being the same as at that point, e.g. if they had not…
Rupinder
  • 11
  • 2
1
vote
1 answer

Unity C#, Camera facing sprite and rigidbody not working together

I have a small piece of code to make a sprite (in a 3D world) always face the camera (It has to be in 3D space). public class CS_CameraFacingBillboard : MonoBehaviour { private Camera m_Camera; private void Start() { m_Camera…
1
vote
1 answer

libGDX Tiled Map hiding sprites that are out of viewport

I started to create a 2D game using libGDX and Tiled as map creator. I am using some sprites as Collection of Images in Tiled. The problem is that whenever I move to the right and some sprite's bottom left point is out of viewport it dissapears like…
Matej
  • 177
  • 2
  • 16
1
vote
0 answers

Swift Playground & Sprite Kit Issues

I was creating a Swift Playground using SpriteKit but was having multiple issues. Below is my code: // Setup import SpriteKit import Foundation import UIKit import PlaygroundSupport public class GameScene: SKScene, SKPhysicsContactDelegate { …
kingkps
  • 156
  • 1
  • 13