Questions tagged [sprites]

A 2D rendering of an object in space.

Filter by
Sorted by
Tagged with
0
votes
0answers
20 views

LibGDX Shader that converts sprite to single colour with blurred edges

I made a shader which turns all the colours of the texture to black but I also want it to be blurred at the edges where the opaque sprite turns transparent. Original texture with desired output. <...
0
votes
0answers
24 views

How to choose between 2D sprites versus 3D models for a 2D game?

I wanted to know how to decide between using 2D vs 3D models for games. What are the advantages/disadvantages of using 3D models versus 2D sprites in 2D games?
0
votes
0answers
11 views

Make a child sprite match the layer ordering of its parent

I have my project settings set up to order the sprites' visual layering based on their y position. If I add a sword as a child to my character, the sword won't have the same order as the parent so ...
0
votes
1answer
59 views

Make enemy move diagonally in 2D

I'm making the enemy follow the player only straight or diagonally e.g.(1,1)(1,0)(0,1)(-1,1). I expected the problem that I have, but I don't really know how to fix it. When my enemy is placed ...
0
votes
1answer
10 views

Lights not displayed on Sprite

I have a scene that contains 3 elements: Main Camera A 2D Sprite that renders a single white pixel image, scaled to 2000 x 1000 A point light with a yellow color What should be done so that the ...
0
votes
0answers
10 views

Having Problems in PyGame with Mouse Cursor and Sprite Collision

I know something is not right but I'm just starting out and hit a wall. Basically, I just want to MouseClick on a Sprite and make something happen. The mouse clicking itself works, the sprite ...
1
vote
1answer
40 views

How should I setup my sprites for 2D combat?

I was painting pixel sprites of a goblin (the enemies in the game). I first thought of making sprites of it for each different scenario: facing camera, moving toward camera 1, moving toward camera 2, ...
2
votes
0answers
20 views

How to use HD and SD sprites in Unity addressables

I am able to load sprites using Unity addressables. But how can I use SD or HD variants of a sprite based on my device resolution? Previously I was using LIBGDX, and it has ...
3
votes
0answers
68 views

Why use sprite tile maps on the GPU in WebGL?

I'm trying to figure out the best way of rendering my layered tiled maps with WebGL, and have come across this tutorial several times: https://blog.tojicode.com/2012/07/sprite-tile-maps-on-gpu.html ...
0
votes
0answers
17 views

How do I determine that the edge of the camera intersects the edge of the background sprite? UE4

I'm trying to make sure that when the camera reaches the border (left or right) of the sprite's background, a copy of it is spawned from the corresponding side. But I seem to be missing something in ...
0
votes
1answer
25 views

How can I create a musical sheet using sprites?(Ocarina of time )

I am looking to make a musical sheet similar to the image below: I want to: use sprites prefabs have each sprite correspond to a different line Move down notes are more are being played have tail ...
2
votes
3answers
261 views

Place Buildings to represent village

I try to convert an array of Buildings into a representation of a small village. There are several different buildings in a village, like factories that are located on the outside of the village, ...
0
votes
1answer
30 views

Efficient sprite animation display methods?

I'm making a game sprite, with animations for transitioning to different states, such as idle, sleeping, etc. I'm wondering what the most efficient way to play the animations is. As of now, I have a ...
0
votes
0answers
19 views

Changing Animation Sprites At Runtime Once

I am designing a 2d platformer with pixel 32x32 sprites, right now I’m using the method that’s utilized at 20 minutes in this video. I’m pretty much creating a main player parent object and adding the ...
0
votes
0answers
39 views

How to make a sprite face the player sprite (pygame 2d)

Basically I have a sprite and I want its front/face to face the player sprite. All the sprites are rectangles/squares and use .get_rect(). I have a base class for ...
0
votes
1answer
24 views

Any problems with flipping a sprite by scale? (2d Platformer)

I am wondering if there are any problems with flipping a sprite on the x-axis using vector2 to tell which direction it is facing/flip. Though doing this helps me write less code for Ray-cast direction ...
0
votes
0answers
15 views

Sprite walk animation blurring when sprite image moves too quickly

I didn't see any other questions like this that had an answer so I thought I'd ask in hopes this helps someone else too. I have a game I'm in the beginning stages of working on, and I've gotten to the ...
0
votes
0answers
15 views

How to select a sprite with the mouse in c# XNA?

I'm attempting to create a chess game, for the movement I need to be able to click on a piece with the mouse, and then the square I'd like to move it to. Each piece on the board is a sprite, and I'm ...
0
votes
1answer
139 views

How to align the Polygon Collider 2D in Unity to match the position of Sprite?

How to align the Polygon Collider 2D in Unity to match the position of Sprite? I have a game object. It has a Sprite Renderer with an image. Now I add a Polygon Collider 2D component to the game ...
0
votes
0answers
12 views

PYGAME - Sprite movement seize to function when entire X and Y span is reviewed

I've created an sprite class that has a detection radius checking if the player enters the zone. If yes, the sprite moves towards the player. It works perfectly fine when the sprite checks for three ...
0
votes
0answers
35 views

Data structure backing tile-based map?

I'm building a tile-based game with a similar art style as Stardew Valley, but have a few questions around technique. My understanding is that it's best to store the maps as a byte array of tile ids ...
0
votes
1answer
30 views

I do not understand the code version of time based sprite animation?

I'm Universo and for the longest time had coding issues around the concept of time-based sprite animation basically, do not know how to implement it and any code or explanation simple or complex that ...
0
votes
0answers
22 views

Sprite UV returning wrong values in script in newer Unity versions

I'm recreating in Unity 2019.4 an old project I have done few years ago in Unity 5.4.0. This project consists of a tiled map editor using unity editor scripts which reads baked data files containing ...
1
vote
1answer
65 views

SNES development: why bitplanes get scrambled?

I am following this tutorial https://georgjz.github.io/snesaa04/. I am stuck on trying to draw a sprite. Where the end result should be this: My end result is this: As I have not been able to find ...
0
votes
0answers
11 views

Unity color transparency is affecting image transparency

I am building a chess board in Unity. I have a Grid Layout component made out of 64 Single_Field PreFabs. I instantiate the field like this ...
0
votes
0answers
10 views

(Unity) How to show a texture on a model at a specific Pixels Per Unit?

I'd like to use flat 3D models alongside pixel art sprites, but I have no idea how to make the textures applied to these models have the same Pixels Per Units as the sprites. How can I achieve this ...
0
votes
0answers
28 views

How to flip a sprite that is noncentered

I have a sprite that I want to flip horizontal but I don't want it to look like the sprite is "changing position". I have code that changes the sprite horizontal direction depending if you ...
0
votes
0answers
24 views

solid color to sprite (javascript game)

Hi I recently created a javascript game, in this game, math random is used to pick a random shape. The shapes are in strings, and the associated numbers within the string are then used to show a color....
0
votes
1answer
109 views

My pixel art looks weird in the game view in Unity [duplicate]

I am making my first 2D game in Unity and something has been bothering me. If I'm in the scene view, my game looks fine but when I go to the game view the pixels in the sprites aren't rendered ...
0
votes
0answers
43 views

Why won't PNGs load successfully to game from server?

I'm working on a game which involves loading pictures from a server and rendering them as sprites. The images are stored as PNGs and open normally from on the server. I get no errors when downloading. ...
0
votes
0answers
57 views

unity spriterenderer scale to fit screen portion

let me explain what i have. a camera that render only a sprite ( sprite renderer) and what i'm looking for is to scale that sprite renderer to fit a screen portion (not the entire screen) for example ...
0
votes
1answer
104 views

How to make player walk through layers of 2d fog smoothly?

I'm trying to recreate the fog effect that Graveyard Keeper has, with several layers, so taller objects will get less fog. I'm using the approach described here: the devs post on Gamasutra The problem ...
0
votes
0answers
15 views

Unity-How can I enlarge the sprite to avoid the movement of the character when the pivot change?

Changing the pivot to custom on all of the sprites is not a viable option for me Video showing the problem: https://youtu.be/YpAdamkbhFA
0
votes
0answers
15 views

How to animate large and complex sprites with modular parts

I am trying to animate sprites like metal slug bosses. But they can't be animated as regular and squared sprites because the have multiple moving parts at same time. Considering i am talking about ...
0
votes
0answers
29 views

How to fuse 2 sprites as they approach each other in Unity2D?

Hi i seen this video by Sebastian Lague on ray marching. Link: https://www.youtube.com/watch?v=Cp5WWtMoeKg&t=204s At 3:19 mins. I want this merging effect but for 2D sprites. Please can someone ...
0
votes
1answer
77 views

Unity - Transforming horizontal distance between two spriteRenderers to set UnityEngine.UI.Button width to this distance

In my Unity scene, I have a couple of spriteRenderers and a UnityEngine.UI.Button called ...
0
votes
1answer
129 views

How can I use Drag handlers (IBeginDragHandler, IEndDragHandler, IDragHandler) with a 2D sprite renderer instead of a UI Image?

In my game, I assigned all of the blocks to be 2D sprites so that they could be easily converted into prefabs: However, when designing the drag and drop scripts, I noticed that all of the drag and ...
0
votes
0answers
129 views

Slot machine game Phaser 3

I need an advice on creating a slot machine phaser game. So it looks like this I need to plan an approach to do the animation of the reels of the slot machine. I have idea of using tileSprite, are ...
0
votes
0answers
100 views

Using Unitys URP how to make sprites lit by 3D Lights again?

I'm working on 3D game and I converted my project to URP. Everything works fine expect sprites that previously were 'Sprite/Diffuse' so they were lit by 3D lights (kind of Doom style, 2D elements in ...
0
votes
1answer
26 views

Unity: Sprite stretch issue

I have a simple png square 8px x 8px. In Unity I've left the pixels per unit at 100 and added the image to the scene to create a prefab of the item. I then add four items to the screen like so: ...
0
votes
0answers
40 views

How can I use .txt or .xml reference file to slice up spritesheets in Lua?

I've been learning to code games in Lua, and I've recently started on my own project. I wanted to use the following spritesheet from Kenney.nl, as well as a few other spritesheets from them but I'm a ...
0
votes
1answer
95 views

Sorting layer issue with multiple sprites and a Tilemap in Unity

I have a particle system that draws a blood splat. I have a Tilemap that represents terrain. However, the blood splats, which are on a sorting layer in front of the terrain, are somehow rendered both ...
0
votes
2answers
73 views

Sprites lose quality when in Unity

Whenever I drag a sprite sheet into unity, it, for whatever reason, distorts. Is there any way to remedy this? Original Distorted
0
votes
0answers
136 views

How to create a 2D Polygon Sprite from prefab at runtime?

At start of my 2D unity game I want to create a new "building" (at random). So I created a prefab named "Building" from a polygon sprite. Then I created a "Empty Game Object&...
1
vote
0answers
103 views

How to decide sprite size for isometric tile textures?

When I draw these textures on screen, I put them in a sprite and specify a width and height to draw the sprites in like this: ...
0
votes
1answer
41 views

How to change a sprite via script at runtime when using an animator?

I am making a simple 2D shooter. I have my character's body and head as different objects, as I want him to look up/down regardless of the movement. So, I basically use the following script: ...
0
votes
0answers
33 views

Can the particle system in Unity select sprites from a spritesheet based on angle?

I want to create a particle system for gore effects. I have some requirements that don't seem possible with Unity's built-in particle system, but I want to make sure I haven't overlooked something. So ...
0
votes
2answers
148 views

Unity Animation Controller and walking diagonally keeps switching between the two diagonals?

Using Unity 2019.4.1f1 Personal. I have the above Animation Controller. When only walking in one direction at a time and when you stop you stay facing that direction, this works as planned. All of ...
0
votes
1answer
128 views

Unity - Sprite vertices in 3D world

Rookie here, still learning the basics of Unity. I've been using a quad as a cursor sitting flat on top of a hilly terrain mesh. I've been getting the terrain angle by raycasting down at all four ...
0
votes
1answer
23 views

unable to see sprite in scene Getting error as floating point precision limitation

I am trying to create game object by dragging image from project window to scene I am getting error as due to floating point precision limitation- it is recommended to bring the world coordinates of ...

1
2 3 4 5
21