4,760 questions
1
vote
0
answers
62
views
Render Texture Triangle From Vertexes and Uvs
I'm attempting to render out part of a spritesheet to a new standalone texture. I have the triangles, vertexes and uv coords of my sprite but my code only correctly renders the first triangle not the ...
2
votes
1
answer
77
views
Unity ReadObject in profiler causing spike for sprite animations
So it appears in the profiler that whenever one of our sprite animations is played for the first time, it causes a spike on the CPU as the sprite atlases are loaded into memory. This can cause a ...
2
votes
2
answers
78
views
Multiple frame animation in HTML canvas
I've been trying to find an answer for a while but most searches return results for animating shapes not frame animation. Given a canvas with a 2d context to which I draw sprites with drawImage, what'...
0
votes
0
answers
61
views
SkiFree Sprite Layout Order Issue
I am writing a beginner Java version of the popular game of '90: SkiFree for personal learning. I managed to create most of the game display, but I have an issue with the layout management there ...
-1
votes
1
answer
43
views
Issue with Sprite not showing up, using Pygame [duplicate]
I'm following a begginner tutorial to start using pygame, but I'm stuck with the sprite display. I'm not able to make it visible on screen, please find below the code related to the sprite.
I'm not ...
0
votes
0
answers
31
views
I'm trying sprite animations in React for the first time and my character keeps teleporting to its starting position
It's my first time messing around with sprites in ReactJs and I wanted to make something for fun.
There is a canvas where a character randomly walks left/right. My sprite sheet has 3 columns and 6 ...
0
votes
0
answers
25
views
My sprite.svg file showing only one/first element, project compiler is gulp
The icon-location icon is displayed correctly, but other icons such as icon-mail are not displayed. I have tried clearing the cache and reloading the page, but the problem persists.
<svg xmlns=&...
0
votes
1
answer
189
views
Character with multiple sprites doesn't flip correctly when scaling the root node
I'm working on a 2D game in Godot (version 4.3) and have a character composed of multiple sprites (e.g., body, head, equipment). These sprites are all children of a CharacterBody2D root node.
I want ...
0
votes
1
answer
85
views
Can't stretch sprite after adding with 2D Objects - Sprite
Unity has the ability to set boundaries for a sprite. This allows me to stretch the image without losing quality and save borders. This is usually used to create menus and pop-ups. I add such a sprite ...
0
votes
1
answer
417
views
Importing texture button from spritesheet in Godot 4
I have a spritesheet with all my buttons, and would like to use individual sprites as my buttons, not the entire sheet. Is there a way to do this? (I am a complete beginner)
I tried putting the file ...
0
votes
0
answers
63
views
Sprite Renderer tile from pivot
In Unity I have a Sprite Renderer set to tiled draw mode.
The import settings look like this (custom pivot, custom borders):
I'd like to reposition the renderer object dynamically (in the OnValidate ...
0
votes
1
answer
78
views
Pygame - Load letters and display text for an image
I'm following Tech with Tim's guide on how to create a platformer game link
I created a function to load letters from a sprite image, based on his load_sprites function:
def ...
0
votes
0
answers
48
views
I can't remove the gaps between the edges of the cube in a sprite made from an SVG image
Most learned friends
I have an SVG cube icon. I made a sprite out of it, but there are gaps between the edges of the cube that take on the background color of the div in which the cube is located. How ...
0
votes
1
answer
74
views
Shrink a rotating object up to point
I have an object (orange) that is tied to a hinge joint (black) and can rotate around it. At some point when I detect collision with other object I have to cut it there (red). In order to do that I ...
0
votes
1
answer
131
views
SpriteRenderer changing sprite on runtime not working in android build?
If you try creating test scene, with a simple script to change sprite every a period of time.
The sprite doesn't change, but if you try to log the changed sprite name, you'll see it has changed ...
0
votes
1
answer
61
views
SVG Sprite still working even after removing object
In my index.shtml I have
<object data="icons/svg-sprite.svg" type="image/svg+xml" width="0" height="0" style="display: none;"></object>
...
0
votes
0
answers
213
views
Matter.JS Scaling textures automatically + sprites not on body
I am making a game where every time you click, a fruit falls down from the mouse coordinates. The game was working when I was working with plain colours, so then I decided to add textures. However, I ...
1
vote
0
answers
48
views
Why do the enemy sprites disappear from the screen when they reach the edge of the screen?
I am currently trying to write a version of space invaders using p5.play (it's the language that my particular college uses) but whenever the sprites reach the right edge of the screen they all ...
1
vote
1
answer
20
views
Drag SKShapeNode respecting other SKShapeNode's boundaries
I need to drag a Shape Node avoiding other shapes, if they hit then I would like boundaries to not be crossed. So if I have a ceiling and I drag the a ball up to it, I want it to hit the ceiling and ...
0
votes
2
answers
436
views
Unity 2D - animated background
I'm working on a game with free pixel adventure sprites. The GIF below is a level that the sprite creator put, and I have no idea how to create such a background in Unity (repeat with go down ...
0
votes
1
answer
63
views
mouse click on sprite image rather than on its bounding box
In all the examples of games, which I examined, written in C++/C# using SFML, .NET Framework, WPF, Python and HTML5 a sprite reacts on mouseClick made within the sprite's bounding box.
Is there a ...
0
votes
1
answer
38
views
Pygame surfaces being unintentionally shared between objects
Working with this code in two separate files :
import pygame
# These are used to figure out where this top-level module is being run
# so that the path can be passed to submodules
from inspect ...
1
vote
3
answers
389
views
Should a sprite file be reloaded for each individual sprite?
I have 1324 different small SVG images, all the same basic size, that I need to load as background images for 1324 different cells in a grid display. The cells into which they load have varying ...
-1
votes
1
answer
38
views
Collision not working with different sprites? [duplicate]
I followed a tutorial for a simple runner game using pygame and got it to work. So I went to try it again with my own characters and obstacles that I made. But for some reason, the sprites seem to ...
1
vote
1
answer
252
views
Phaser 3: Rotate a sprite and automatically rotate all subsequent sprites
I have a series of horizontally-lined sprites in Phaser 3:
const sprite1 = this.add.sprite(20, 40, 'diamonds');
const sprite2 = this.add.sprite(50, 40, 'diamonds');
const sprite3 = this.add.sprite(80, ...