Questions tagged [sprites]

A 2D rendering of an object in space.

Filter by
Sorted by
Tagged with
0
votes
3answers
597 views

Slicing irregular spritesheet (automatically?)

If found a cool sprite sheet on the internet but its irregular. Is there any way besides manually cutting sprites to extract the separate pngs? I need to pack them then again into the Texture Atlas ...
0
votes
1answer
19 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
9 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 ...
1
vote
2answers
1k views

How to make a 2D semicircle sprite in Unity?

I followed this answer: https://answers.unity.com/questions/1008644/semi-circle-2d-collider.html and was able to create a semicircle collider: But is there any way I can just crop the circle sprite ...
0
votes
1answer
114 views

Remove Sprite Shape Controller Icons from 2D sprite shapes

How do I get rid of those "purple icons in my scene"? They are so annoying ... they literally covers the entire 2d shape! GIF showcasing it
0
votes
0answers
30 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 ...
1
vote
2answers
454 views

Loss in quality on downsized sprites in Game Maker

I'm having an issue with sprites quality in Game Maker. I have some sprites used for UI with an original size of 2048*512. I need to resize them in game to 512*128. But when I do, I got a loss in ...
1
vote
1answer
184 views

How to prevent a sprite to move in an angle that will lead to collision

I have two sprites that can move in any angle. The sprites are rectangular. I created bounding boxes for both the sprites. These boxes rotate whenever the sprite rotates. They always surround the ...
0
votes
1answer
28 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 ...
5
votes
2answers
3k views

How do I support animation with frames of different sizes?

I'm trying to create a simple top-view 2D rpg, in the style of Zelda and Secret of Mana, using PyGame. I've managed to make the beginnings of a game, with an animated character walking around. However,...
5
votes
1answer
1k views

libGDX using Stage and Actor produces different camera angles on desktop and Android Phone

libGDX using Stage and Actor produces different camera angles on desktop and Android Phone. Here are pictures demonstrating the problem: http://brandonyuh.minus.com/mFpdTSgN17VUq On the desktop ...
0
votes
1answer
80 views

Why my canvas isn't showing anything after I put code in the loop for tile map?

My canvas stop showing anything when I want to display a tile 25 times. No errors. Here is the code: ...
1
vote
0answers
17 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 ...
2
votes
1answer
36 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
1answer
279 views

Cocos2d-x setContentSize, setScale give poor graphic quality

I want to create sprite with size is relative to the screen size. I.e: Sprite size is equal to screen width * 0.2. I use setContentSize and ...
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
1answer
68 views

Aligning animation frame assets with different sizes

I have code that changes texture in each frame depending on the player's state - walking, idle. My problem is that the idle texture (from separate png) has a slightly different size, and due to that ...
3
votes
1answer
467 views

How to make a map surface object

I'm making a 2d tile based game. In pygame I could create a map like this: ...
0
votes
1answer
60 views

In AGK2 Basic, how would I attach a camera to the player charater?

I've started making a game in AppGameKit and I'm using Tier 1/AGK2 Basic. I'm trying to make a sort of endless runner. I've made it so that the player stays still and the rest of the world moves ...
1
vote
2answers
470 views

Transition the scale of a sprite

I'm new to LibGDX but I am making a menu with some basic animation, I would like to start with a sprite scaled up and then it would transition to the normal size. Is it possible with LibGDX or do I ...
0
votes
1answer
258 views

Unity not redrawing sprite, after sprite change

I am making a game where the player mines dirt by walking on it: So, I created a scene and added a bunch of dirt to a grid, from a dirt prefab. When the character walks on a square, it is supposed to ...
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
1answer
63 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
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
1answer
84 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
0answers
23 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....
2
votes
3answers
2k views

Displaying sprites in a 2.5D raycasting engine

I'm developing a raycasting engine like the one used in DOOM, Wolfenstein 3D, etc. My engine is capable of correctly displaying walls and textures on walls, but I'm stuck at sprites rendering. Given ...
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
2answers
299 views

Struggling to define js sprite sheet

I've been working on this for a couple days, unable to get anything to load. Here is the whole page. Please help me find what I'm doing wrong. Right now, I'm only trying to render the first card in ...
0
votes
1answer
55 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
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
29 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
28 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 ...
1
vote
1answer
435 views

How to make Sprites scroll with the background image that are inside Scroll View?

I'm new in Unity, so I hope you guys can help. I'm developing a 2D-game for Android device, on the scene I have a huge background image inside Scroll View (UI - Scroll View). Next, I created new ...
0
votes
1answer
46 views

Stretch line on bow using touch

I have drawn a line on sprite representing the string of a bow. I want to stretch it with finger touch input, using onTouch. I have added a Physics body but I don't ...
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
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: <...
1
vote
1answer
9k views

Unity3D sprites vs Mesh Quads - Depth, Blending, Shadows

I'm new to unity but not new to game development. In my OpenGL ES 2.0 (mobile) games I create a vertex array of all my "sprites" and stuff it in a VBO. Then draw them as I need them one at a time, ...
0
votes
1answer
137 views

Sprite is getting out of screen when changing resolution - Unity

Hello I am making this layout: I used sprites for birds but used UI for the blue food thrower. I used UI for it so it will not get cut when screen resolution changes. But I also need to add food ...
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 ...
3
votes
5answers
7k views

sprite group doesn't support indexing

I have a sprite group created with pygame.sprite.Group() (and add sprites to it with the add method) How would I retrieve the nth sprite in this group? Code like this does not work: ...
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
46 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 ...
5
votes
4answers
7k views

How can I ease the work of getting pixel coordinates from a spritesheet?

When it comes to spritesheets they're usually easier to use, and they're very efficient memory-wise, but the problem that I'm always having is getting the actual position of a sprite from a sheet. ...
0
votes
1answer
219 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
1answer
508 views

SlimDX Direct3D10 Sprite stretches with window size

I'd like to draw a sprite bitmap with SlimDX Direct3D10, but I'm stuck at this problem, where I can see my image on screen, but it gets stretched depending on the window size. The issue looks like ...
0
votes
1answer
58 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
2answers
91 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
0answers
71 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 ...

1
2 3 4 5
21