Questions tagged [sprites]

A 2D rendering of an object in space.

Filter by
Sorted by
Tagged with
0
votes
0answers
6 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
29 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
27 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
15 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
35 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
10 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
8 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
23 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
22 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
50 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
28 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
26 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
69 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
14 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
11 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
44 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
56 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
69 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
79 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
18 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
30 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
63 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
54 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
78 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
62 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
28 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
29 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
88 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
81 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
14 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 ...
0
votes
1answer
51 views

Animating MultiPart 2D Character with RigidBodies

Some background to the question: I am attempting to animate and control a large multi sprite 2D Boss character for a platforming game. Up until this point I had been assigning individual animators for ...
0
votes
0answers
30 views

Is there any way to automaticaly rig a sprite?

I'm making an AR test where the player takes a photo, them i get the bones from the pose and set a t-shirt sprite's bones position to match the ones from the photo. I was wondering if there's any way ...
0
votes
0answers
27 views

Sorting armor sprites over body sprites in 3D

I'd like to use sprites for my characters in a 3D game world, but I'm having issues getting them to cooperate. I want to have my characters to have outfit/appearance customization options, and so to ...
1
vote
1answer
37 views

Character Action Sprite Framelength of Late-90's Something, Industry Standards of that Era?

I'm making a 3d character that emulates a sprite. The game as a whole emulates the feel of a classic RPG game. Old games like Ultima Online, or Diablo...or similar late-90's generation... For an ...
0
votes
0answers
27 views

Unsure how to change sprites in an animation (Unity)

I'm using Unity 2019.3.13f1 to make a 2D game with friends and I am looking for help with changing sprites so that different characters can look different. Currently we have sprites for hair, heads, ...
1
vote
0answers
38 views

Drawing sprites to the screen in 65816 Assembly

I am trying to create a SNES game in assembly on the WLA-65816 assembler. However, I can't quite figure out how to draw sprites to the screen or figure out what software to use. At the minute, ...
1
vote
0answers
112 views

Unity Shader-Graph randomly tiled sprite

Lets say I have a shader with a clean white tile. Then I use it on a wall and tile it a few times. I also have a sprite with numbers. Now, is it possible and if yes how. To put a random sprite ...
0
votes
0answers
34 views

How to create fog effect over specific tiles in dungeon game

I'm working on a game in unity and I have areas the player cannot enter blocked off by game objects that are animated sprites that are supposed to look like fog. They don't look that great and I'd ...
0
votes
1answer
62 views

9-Slicing Sprite for UI Image still stretches corners

I am currently trying to slice a sprite for an Image component. It's a rectangle with rounded corners on the left side. Those rounded corners are supposed to stay the same even when the image is ...
0
votes
0answers
391 views

How do you make lights affect 2D sprites in a 3D environment using Unity's URP render pipeline?

I'm using Unity, URP and have 2d sprites characters in a 3D environment. I want 2D sprites to be affected by lights/shadows like the rest of the environment. -I know if I use a 2D renderer I can use ...
0
votes
1answer
29 views

How to set the color of a game object as of the other?

I am 15 year old Indian student and I am creating my first 2D game in Unity. I have set the color of my player as Random and I have to set the color of my game object as of my player. But the color of ...
0
votes
1answer
213 views

Sprites draw-order sorting for top-down 2D game with floors and bridges

I am working on custom 2D engine for a game. I am having trouble figuring out a working system for sprite drawing-order sorting for this specific game. Game description: 2D Top-down perspective ...
0
votes
0answers
24 views

Animator prevents swapping spriteRenderer source sprites at runtime

Background: Unity 2019.3. I'm using an animator component on a parent gameObject to play animations involving multiple body part gameObjects with individual spriteRenderers (see below). ...
0
votes
0answers
30 views

Is using sprite sheets and drawing specific part the way to go?

I'm programming in Java. I have more than 200 MB of images used in my games, something like 100000 40x40ish images. I initially wanted to load them all during app initialization but it took like 2 ...
0
votes
1answer
45 views

how to join the body of snake in 2D snake game

i'm making a snake game in javaScript from scratch. The problem is that the snake looks disjoint(see image). How can I connect the body(rectangles) of the snake? here is the code of drawing snake: <...
0
votes
0answers
79 views

Prevent sprite from rotating with camera

I am creating a small 2d game and looking for a way, to prevent certain sprites from rotating with the camera. I could not find any settings that would allow me to do so, so my next best guess would ...
0
votes
0answers
51 views

In Godot 3.2.1 stable beta, in the 2D sprite shaders, how do I import a new PNG to test out those shaders?

I am using Godot 3.2.1. on Steam on Linux Mint. How do I take a pixel art image I've made and import it for using in Godot? I couldn't find it under Project.
0
votes
0answers
28 views

Creating a border on a tile?

I'm using Godot and I want to set an outline on the tile which is currently being hovered over, but I'm not sure whether to do it as a seperate tilemap which is hidden until it is hovered over or just ...
0
votes
2answers
163 views

Improving shading of procedurally generated pixel art sprites

I've been working on a sprite generator and I'm having a hard time figuring out how to add shading automatically. Here are some examples of the generated sprites Currently what I'm doing is checking ...

1
2 3 4 5
21