Questions tagged [sprites]

A 2D rendering of an object in space. Sprites are two-dimensional bitmaps that represent objects or entities in a game and populate larger scenes.

Filter by
Sorted by
Tagged with
1 vote
0 answers
74 views

Y-Sorting in 2D Isometric Games in Godot 4.x

I am having a problem with Y-sorting in an isometric Godot game. More specifically, when my character moves behind/in front of larger objects than one standard tile size, the rendering is inconsistent....
Gergely Kovacs's user avatar
0 votes
1 answer
25 views

Fade-in sprite in TextMeshPro

...
Nader Amir's user avatar
0 votes
0 answers
49 views

Add a sprite, move with keys, Javascript example?

I have a small image (30x30 px) I want to use as a sprite on a Javascript screen to show students what Javascript can do. (They want to create games.) How do I link the image file to my Javascript ...
Jonathan Titus's user avatar
1 vote
1 answer
32 views

How to detect colored pixel of Sprite3D texture with perspective camera ray?

I've tried to ray cast my mouse position to Sprite3D on screen but I have some problems with it. ...
Pucka's user avatar
  • 13
1 vote
0 answers
39 views

How to fix collision for objects beyond their green lines?

As you can see in the image those are collision lines but its kinda of disingenuous as there are I would say invisible collision blocks on the X's, I tried messing around with the sorting layers and ...
Thecodingnoob's user avatar
0 votes
1 answer
55 views

Sprite chasing a target using move_towards_ip does not move

I'm trying to get a turtle sprite to chase a falling algae sprite utilising Pygame's inbuilt functionality. I have spent many hours reviewing questions and answers and suspect I'm missing some ...
Lone's user avatar
  • 3
0 votes
0 answers
40 views

Sorting layer of wall in top down game 2d

I made tilemap using tiled app. I try to sort layer so the when the player is in front of wall he visible and when he is behind the wall then not viable, it's commonsense. But problem only one line ...
TECH VR Gamers's user avatar
0 votes
1 answer
68 views

Weapon flips upside down when aiming to the left

When the player turns to the left, the texture of the weapon turns upside down. How can I solve this? Shooting Script ...
Lekr01d's user avatar
0 votes
0 answers
52 views

Ideas for how to attach meta data to an arbitrary sprite sheet?

I am currently messing around with monogame and creating some silly sprite based games. One issue I have is when I get sprites for OpenGameArt or any equivalent they are often in spritesheets in a ...
kiooikml's user avatar
  • 101
0 votes
2 answers
165 views

Adding text label to sprite

I'm completely new to Unity. I'm trying to create something similar to Scrabble. I've simply got a tile as a sprite (red arrow).Firstly, I don't understand it being so small.. I'm trying to give the ...
Kingsley Obeng's user avatar
1 vote
0 answers
83 views

How to set pivot point for rotating a sprite?

Is there a way to set the pivot point for rotating a sprite? The default option seems to be arbitrarily chosen point on the sprite or the mid point. ...
Naveen's user avatar
  • 111
0 votes
1 answer
106 views

How to process tiles of different sizes?

I have next problem. Sprite sheet that I have has sprites of different sizes. I use 16 pixels per unit. On the screen you can see a choosen tile and that it's height is 14 pixels. I can't resize it ...
Taras Fityo's user avatar
1 vote
2 answers
160 views

Rotating 2D sprite around tilted Y axis

I am building a sprite that I want to spin along an axis. I am using SpriteKit on iOS for this, but I'm sure that the question is not really tool specific. In my case, I have a sprite such as: and I ...
PKCLsoft's user avatar
  • 225
0 votes
0 answers
45 views

Fill color on an empty space on a sprite

I'm trying to make a coloring game, of which I already have a drawing (outline) of an object - let's say a face of a dog. How can I do it that whenever I click for example the eyes, it will "fill&...
DC37's user avatar
  • 1
0 votes
0 answers
51 views

Decrease size of hitboxes for a sprite in PixelPAD

I need to make the hitboxes of spikes smaller, so that it's not impossible for the player to get through. How do I do that?
CK Development's user avatar
0 votes
0 answers
28 views

SpriteResolver's category and label values null when I try to access them at runtime. How do I fix this and make sure I get these string values?

I'm working on creating an animation system used for mouth movement that works like this: BEFORE the animation clip starts playing, cache the SpriteResolver's state (category and label) Once the ...
KD867746's user avatar
0 votes
0 answers
55 views

How to smooth sprites drawn from an atlas (either with linear filtering or some post processing technique)?

I've been doing a 2D renderer for a Tibia clone and came up with a design where all textures are bundled into a texture atlas. The pixelated style isn't working well (textures are often shrinked or ...
fusion32's user avatar
1 vote
1 answer
231 views

Draw a sprite x number of times in GDscript

Ok this has stumped me. In Godot 4.x, how do I programmatically (GDscript) draw a sprite x number of times (with an offset)? I can manually add sprites in the editor over and over again. Only I don't ...
Ghoul Fool's user avatar
0 votes
1 answer
256 views

What is the name for the types of assets used in games like "Brotato"?

What type of assets are used in games like "Brotato"? Brotato steam page Video of gameplay Would these be called vector graphics or are they just really smooth looking sprites? I'm ...
user12345613's user avatar
0 votes
0 answers
53 views

In Unity, how do I get a specific texture in runtime from .psd file rather than its whole entire texture?

I'm trying to recreate the current texture on a SpriteRenderer's sprite in order to make it bigger so that I can add a white outline to it. This is all done on runtime. If we look at the .psd file ...
rain walker's user avatar
0 votes
0 answers
67 views

How can I make a bounding box better fit a sprite?

I'm working on a simple 2D platformer for learning purposes and I'm trying to add a bounding box to the player sprite. I've managed to get it working; however, I'm having difficulty with sizing it to ...
Konjointed's user avatar
0 votes
0 answers
26 views

PolygonCollider2D components do not work properly in iOS build

I'm trying to figure out why my polygon colliders default to pentagon shapes when I build my app and test it on a device. I have a scene with some blocks you can drag around where the colliders work ...
KD867746's user avatar
1 vote
1 answer
39 views

Platformer Sprite is inside of a Solid Sprite

My platformer sprite in Construct 2 works normally aside from it not colliding correctly with platform sprites that are solid, as it goes through them until the platform is not quite halfway up the ...
703337's user avatar
  • 11
0 votes
0 answers
84 views

How do you handle collision with a sprite?

I'm in the process of learning C++ and SDL2 and I'm trying to add a sprite to my player which is currently a rectangle. I've managed to get the sprite showing on the screen, however, I've run into a ...
Konjointed's user avatar
0 votes
1 answer
148 views

floating damage text in 3D

followed this tutorial : https://www.youtube.com/watch?v=UlvBqz8bhCo the guy is working mostly in 2D, i tried to apply the same method but I'm hating working with UI in godot, everytime I seem to get ...
Cei's user avatar
  • 873
0 votes
1 answer
833 views

In Unity, how can I make sprites be affected by lights in the scene? The Sprite-Lit-Default Material doesn't seem to be working

I am trying to make it so the sprites in my scene are affected by lighting, but I cannot figure out how. I looked it up, and everywhere I looked, I was told to switch the sprite's material from "...
NateBob's user avatar
0 votes
1 answer
58 views

Is there a simple way to find where our code is keeping references to disposed/pooled objects?

In our c# game we use object pools to store sprites once the Dispose() method gets called.Then when the Sprite.Create method gets called if a sprite is in the pool it gets depooled, cleared and ...
Matteo's user avatar
  • 15
0 votes
1 answer
73 views

How to separate player characters occupying the same board game space?

I'm trying to create a 2D "board game" type thing in Unity, and I would like each player to be visible within the same space. The way I want to do that is by having it so when a player ...
Konxovar's user avatar
0 votes
0 answers
58 views

How can I modify a Unity Sprite Shader to create a black outline around the Sprite in addition to a flashing color effect?

I would like to be able to make a Unity Sprite flash 2 colors: The entire sprite should flash Red (or whatever color is defined in the Sprite Color setting). There should be a Black outline around ...
kanamekun's user avatar
  • 369
2 votes
1 answer
105 views

How can I initialize a sprite programmatically in Unity

Hello everyone and thank you so much for your help! I've tried following the answer at Unity 5 2D drawing sprites programmatically but nothing happened. I have a blank screen with just a background ...
TOM's user avatar
  • 41
1 vote
1 answer
90 views

Solving distortion with non-linear scaling in a shader

I am currently working on implementing an older paper in Unity to show the progression of some graphics technologies, and part of that involves sprites being able to cast shadows. A trivial ...
Noon's user avatar
  • 13
0 votes
1 answer
194 views

Why does Unity sprite editor reduce the resolution of my sprites?

I have a PNG file (taken from here) with tiles that look like this: Each tile is 32x32 pixels. I tried to use Unity's Sprite Editor to slice them into individual tiles. Here are the settings I used: ...
Erel Segal-Halevi's user avatar
0 votes
1 answer
164 views

rotating a sprite with mouse cursor

i am learning how to make a 2d game using sdl and c++ and am currently trying to rotate the sprite so that is always facing the cursor, my game is set up with an entity component system, i have a ...
user21746705's user avatar
0 votes
1 answer
750 views

The Unity 2021 URP 2D Renderer Sprite-Unlit-Default material transfers transparency of layered sprites to render texture

So, complicated title, but I am not sure how to properly describe this phenomenon. I have switched recently from Unity version 2019 to 2021 to use the URP 2D-Renderer and make use of the ...
Raphael's user avatar
  • 163
0 votes
0 answers
133 views

Better Alternative than Sprite Masks in Unity?

I am have blank sqaure sprite as a Fog of war and I am spawning multiple sprites masks when the player starts moving, through this I am to get this effect where only places where the player has ...
Ashok kumar's user avatar
1 vote
1 answer
48 views

Animatedsprite at godot 3.1

In Scene Player, I changed the sprite to animated sprite and created two modes, stand and walk, and wrote these scripts to move the player. But when I play the scene, the characters don't show their ...
Nina Monti's user avatar
2 votes
1 answer
831 views

How to make a sprite fill the image?

I created a custom UI Button: However, when I use the sprite as the image for a button it doesn't fill out the whole "Collision" area: This is an example of how I want it to fill the "...
Motcho's user avatar
  • 23
2 votes
0 answers
249 views

Resize Decal Based On Distance From Another GameObject

What I'm trying to accomplish: I am trying to recreate Paper Mario's "fake" shadow effect for my game. All of the characters in Paper Mario have a sprite of a dark circle that follows their ...
PayasoPrince's user avatar
0 votes
0 answers
54 views

How to slowly render a Sprite in Unity over multiple frames (from its center)

I'd like to slowly render a Unity Sprite of cracked ice, but from the middle of the sprite... over the course of 3-4 frames or so. Then it would appear as if the ice crack is originating from the ...
kanamekun's user avatar
  • 369
0 votes
1 answer
511 views

Having trouble trying to figure out why pygame.sprite.Group's draw method isn't working properly, but switching to player sprite does work

Goal, Description & Scope (when encountered issue) I was building a testing script to see how implementing different ideas (event handling, update handling, draw method) to loading sprite images, ...
DracoDaine's user avatar
0 votes
0 answers
130 views

Downscaling from 1080 to 768 in Unity 2D

I have an orthographic camera of size = 10.8 and I use it as base and have developed the game for a 1080 display. On a ...
FunnelScr's user avatar
0 votes
1 answer
683 views

Detecting whether sprite is outside the camera's view

I want to detect when the game object is not visible anymore. I search for the size of the SpriteRenderer, and convert it to screen space. Then, I check if the ...
Mwoon's user avatar
  • 3
3 votes
1 answer
463 views

How do I implement HP bar using OpenGL?

I got simple hp bar container from open game art, rendered the texture and now I am wondering how to fill it and change the amount of filling. I decided to render red rectangle over the container and ...
Steyrix's user avatar
  • 203
0 votes
0 answers
126 views

Use Universal-LPC-Spritesheet-Character-Generator in Android game

I am writing an Android game. I wonder if there is a possibility to use this sprite generator https://sanderfrenken.github.io/Universal-LPC-Spritesheet-Character-Generator/#?body=Body_color_light&...
Jawegiel's user avatar
0 votes
3 answers
719 views

Why do my svg sprites (vector images) appear to have very low resolution in the game view and how can I fix this issue?

I recently drew a game sprite for my game using Adobe Illustrator 2021. I exported the sprite using the Export for Screens menu to export the entire artboard. The problem I have in Unity 2021+ is that ...
rasputin's user avatar
0 votes
1 answer
237 views

Should a swinging sword be part of the player sprite, or its own separate sprite?

Should the sword be part of the player sprite and therefore share the same hitbox that is widened when attacking? or Should the attack animation be separate from the player sprite therefore having its ...
WindBreeze's user avatar
0 votes
1 answer
288 views

Color mismatch between transparent asset from Photoshop and Unity in 3D project

I have created a simple asset in photoshop (teal square) with transparency. To make the square semi-transparent, I just changed the layer opacity from 100% --> 50%, then exported the file as a .png....
Spaderdabomb's user avatar
0 votes
1 answer
355 views

Can I use normal images to make tiles in Unity?

If I'm not wrong, those are steps to use tiles with Tilemap in Unity Upload sprites to Unity Create a palette. Upload sprites to the palette to create tiles. I need some static images to use with ...
kozavr's user avatar
  • 23
1 vote
1 answer
145 views

Sprite with hard transition from opaque to transparent shows translucent pixels in Sprite Editor

I have no idea why I have blurry/transparent borders on sprites when I cut them in the Sprite Editor, whereas I get everything fine in a graphic editor. Picture from Sprite Editor with a problem: ...
Silz's user avatar
  • 37
0 votes
1 answer
189 views

How does Sorting Layer work *under the hood*?

I know how to use SpriteRendere's Sorting Layer and Order in Layer. But how do they actually work under the hood? How the render ...
Kodra's user avatar
  • 23

1
2 3 4 5
23