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.
1,144
questions
1
vote
1
answer
25
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.
...
1
vote
0
answers
35
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 ...
0
votes
1
answer
50
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 ...
0
votes
0
answers
31
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 ...
0
votes
1
answer
60
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
...
0
votes
0
answers
31
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 ...
0
votes
2
answers
129
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 ...
1
vote
0
answers
53
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.
...
0
votes
1
answer
77
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 ...
1
vote
2
answers
123
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 ...
0
votes
0
answers
37
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&...
0
votes
0
answers
28
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?
0
votes
0
answers
25
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 ...
0
votes
0
answers
41
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 ...
1
vote
1
answer
126
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 ...
0
votes
1
answer
158
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 ...
0
votes
0
answers
35
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 ...
0
votes
0
answers
54
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 ...
0
votes
0
answers
23
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 ...
1
vote
1
answer
35
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 ...
0
votes
0
answers
71
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 ...
0
votes
1
answer
102
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 ...
0
votes
1
answer
512
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 "...
0
votes
1
answer
50
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 ...
0
votes
1
answer
72
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 ...
0
votes
0
answers
55
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 ...
2
votes
1
answer
85
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 ...
1
vote
1
answer
81
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 ...
0
votes
1
answer
155
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:
...
0
votes
1
answer
143
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 ...
0
votes
1
answer
577
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 ...
0
votes
0
answers
96
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 ...
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 ...
2
votes
1
answer
659
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 "...
2
votes
0
answers
212
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 ...
0
votes
0
answers
48
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 ...
0
votes
1
answer
415
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, ...
0
votes
0
answers
119
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 ...
0
votes
1
answer
593
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 ...
3
votes
1
answer
382
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 ...
0
votes
0
answers
106
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&...
0
votes
3
answers
583
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 ...
0
votes
1
answer
208
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 ...
0
votes
1
answer
253
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....
0
votes
1
answer
298
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 ...
1
vote
1
answer
139
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:
...
0
votes
1
answer
157
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 ...
0
votes
0
answers
49
views
Custom Idle Animation not working
I'm trying to insert the idle animation in the if-else statement but whenever I run the game, it doesn't play the idle animation, just the running animation. The base of this algorithm is from the ...
0
votes
1
answer
559
views
Sprite renderer doesn't update color in realtime
Whenever I add colors in Unity using script it updates it in the sprite renderer but I don't see the result on screen and it's not the alpha issue. I can see the result in the sprite renderer color ...
1
vote
1
answer
519
views
Should I destroy dynamically created Image.sprite?
Image sprite is created programmatically
_image.sprite = Sprite.Create(texture, ...);
Should I destroy it before replacing with a new one?
P.S.
My question comes ...