A 2D rendering of an object in space.

learn more… | top users | synonyms (1)

0
votes
1answer
57 views

LibGdx Scalling sprites on Android

I have a sprite that is a few buttons but need them in the center of the screen for all android devices. I tried setting it's location to the center of the screen by dividing the orthogonal camera by ...
1
vote
2answers
118 views

How to define axis of Sprites in a CCAnimation?

I'm struggling to find how to define a kind of axis in my frames, when my sprite punches it moves back. I want to define the head as a pivot for the other sprites with different sizes. How can I ...
1
vote
1answer
137 views

Resize sprite to match camera width?

I'm trying to resize my small background sprite to match the screen width of the user's device. This is what I'm trying // Use this for initialization void Start () { // Set filterMode ...
4
votes
2answers
446 views

Jittery Movement, Uncontrollably Rotating + Front of Sprite?

So I've been looking around to try and figure out how I make my sprite face my mouse. So far the sprite moves to where my mouse is by some vector math. Now I'd like it to rotate and face the mouse as ...
0
votes
2answers
332 views

Card game - creating card Listener

I am making a card game where there are 21 cards on hand and 2 options from where user can draw cards to his hand and throw a card from hand. I am new on game development and I'm following the ...
0
votes
1answer
36 views

Sprites not showing (C# - XNA 4.0)

I'm following a tutorial from XNA GPA, but in my project, none of the sprites are loading. I've followed all of the instructions exactly, and the code works as expected when I copy it from my project ...
1
vote
1answer
14 views

libGDX sprite image not updating Event Handling InputHandler

I created a separate inputHandler class implementing InputProcessor. I'm using Event Handling (libgdx github page: https://github.com/libgdx/libgdx/wiki/Event-handling) public class inputHandler ...
0
votes
0answers
28 views

Modern OpenGL Sprite Drawing - Not Rendering

I'm trying to render sprites based of this tutorial, in LWJGL. Here's what I have so far, with descriptions of what class I use: Transformable2D is a class that holds transform matrices meant for ...
1
vote
1answer
37 views

how to accurately select a sprite on a scene with a click?

I have a scene with some sprite on it (added), the gamer has to select one of them and take the next action. What is the simplest way to select one of the sprites accurately? I am looking for a ...
0
votes
1answer
50 views

Change sprite to animation in unity 5 2d (c#)

I want to do the same as this older post with one change: Change the sprite of a Object in Unity I want to use a .anim animation (created with unity) after the space key is pressed instead of ...
2
votes
1answer
803 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 ...
2
votes
2answers
860 views

Sprite draw-order in libgdx

From other frameworks I know methods for easy ordering sprites within a spritebatch (to determine if a sprite has to be drawn in front or behind another sprite). For example in MonoGame/XNA this is ...
1
vote
1answer
189 views

How can I spawn a sprite based on a condition after the game starts?

How do I spawn a sprite anytime later in the game when the game starts? I'm using FlashDevelop with Flixel. I did try it in override public function create(): void. It works only in the beginning. I ...
1
vote
1answer
266 views

Cocos2d/Cocos2d-x Attaching an arrow (sprite) to another body sprite (person)

I am trying to set up a simple bow and arrow game. When the arrow hits the enemy body, the arrow's body is deleted and the arrow sprite continues to update, keeping the position correct in relation to ...
0
votes
2answers
27 views

Unity C#: strange texture/sprite problems

I've been making a gallery style shooting game, like something you'd find at a carnival, with ducks to shoot. I'd made the game and it was all working fine. However opening it today, it doesn't look ...
1
vote
1answer
38 views

SFML Library Not Rendering Sprite Texture Updates When Accessing Sprite From Lower In Framework Heirarchy

So currently I am working on a framework for a game utilising the SFML graphics library and in one of the classes representing a renderable object in the framework there is an sf::Sprite that is used ...
1
vote
2answers
143 views

LibGDX: Easy way to draw partial sprites

I am surely overlooking something, but is there an easy to draw for example only half a sprite in LibGDX? I originally thought I could do this with setBounds() but this distorts the sprite.
2
votes
3answers
168 views

How can I scale sprites and maintain visual quality?

I currently have an isometric grid. This grid contains tiles. Some of these tiles have 'tree' sprites sitting upon them. If I have my tree sprite loaded from a texture with a fixed resolution, when I ...
1
vote
1answer
157 views

Why my dynamically generated Sprites overlap?

I'm trying to dynamically generate scene representing chess board made from sprites. I'm using two textures for these: - pieces.png (taken from here: ...
0
votes
1answer
224 views

DirectX9 Drawing Sprites out of place due to offset

This is my very first time into DirectX. Im trying to make a simple 2D game, just for learning the basics. And i've achieved that. The next step is to draw an animation using sprites. For that, i ...
1
vote
2answers
42 views

Acceleration and Deceleration During Rotation

I'm attempting to have a sprite rotate in a way where its rotation speed increases until it has reached the halfway point in its rotation, to which it starts to slow down. I'm currently calculating ...
1
vote
1answer
35 views

Update animation based on distance traveled instead of elapsed time?

2D sprite Animation is supposed to be based on the elapsed time from the previous update so that it runs (and looks the same) no matter the speed of the machine/device it's running on. The method ...
4
votes
1answer
849 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. ...
1
vote
3answers
158 views

2D Sprites vs UI Image Scripts in Unity

I am doing a 2D casual puzzle where the user can drag and drop some pieces into a board. The pieces are 2 or 3 or 4 tiles. Each tile may have text over the sprite. Target platform: Mobiles and ...
1
vote
1answer
175 views

Gamemaker Running Animation Flashing, showing single frame, and displaying jump and run sprites at same time

EDIT: I changed the origin of the run sprite to the center, and it is no longer hovering above the jumping sprite. It now flashes in the same location as the run sprite when moving to the side. ...
0
votes
1answer
246 views

Game sprite far too small

So I started writing an Android 2D game. I've come to the point where I want to display my character image on the screen. I read that most sprites have a resolution of 16*16, or more. So I created an ...
3
votes
1answer
44 views

How can I make a scrollable text view?

I am trying to do an appication in monogame windows. I have a long text to be displayed on screen. I tried to render it on screen using spriteBatch.Drawstring, was succesful to an extent. But, the ...
0
votes
1answer
110 views

How to properly give Image source for multiple sources?

I'm writing a script to change the image on the button based on previous selection. Another script is giving the CurrentAvatar variable once previous button is pressed. My problem is i can't seem to ...
6
votes
3answers
10k views

Changing the color of a sprite at runtime

Is there a form to change the color of a sprite in runtime?} I have a black point loaded with an image, but i dont want to load various images with different colors, is there a mode to change the ...
0
votes
1answer
39 views

Efficient method to export a lot of pre-rendered sprites from 3D models

I have a lot of 3D Characters and I wish to use them in a 2.5D game as Sprites; in doing this I have to render them from a fixed camera angle and since each should have its own atlas file containing ...
0
votes
3answers
74 views

Unity 2D - Instantiate a GameObject and scale it every second

I want to make a bomb-like game object, that when instantiated, takes 2 seconds to charge, and then some other event triggers. The problem is I can't make it scale smoothly for 2 seconds, and then ...
4
votes
2answers
3k views

Rendering shadow sprites in cocos2d-x

I am writing a 2D game with cocos2d-x. I want to put a "shadow" sprite on a background sprite using the equation: MAX(0, Cd * 1 - Cs * S) where Cd is the destination color (that is, a background ...
-1
votes
1answer
57 views

How can I set up a pixel-perfect camera using OpenGL and orthographic projection?

I am creating a 2D game using OpenGL and orthographic projection. For sprites, I use textured quads (actually two triangles). I want the pixel art textures for the sprites to be displayed in a ...
1
vote
1answer
268 views

Programmatically creating sprite animations in Unity

Some background: I have a set of animated gifs which I've converted to spritesheets, which are then imported into Unity as multiple sprites. The end result is that each spritesheet in the Unity editor ...
2
votes
2answers
71 views

Unity2D: Rendering multiple sprites as a single one

I'm creating NPCs in Unity 2D using C#, and I have 16x16 sprites for body, helmet, clothes and weapon. All these have a tile set which has been split in unity. I'd like to be able to render one of ...
2
votes
3answers
204 views

Sprites saved in INA and AN format?

I'm not sure if this is a suitable question but I found a game that had all it is sprites and stuff saved in INA and AN format and I got curious to know which program is it. Or is it some sort of ...
1
vote
0answers
92 views

Gradient fill color on circular sprite

I have a white circle sprite. I know how to change its color to a solid fill color. using GetComponent<Renderer>().material.color. But how would I give it a gradient fill color. I've been ...
0
votes
1answer
29 views

Bouncing projectile off of sprite, the sides work but top and bottom do not

I'm having a problem bouncing a projectile off a sprite, we've been asked to move the projectile using the equations of motions which makes things a little more difficult but as far as I can see what ...
0
votes
0answers
20 views

Sprites power of 2 are better? [duplicate]

I was starting a Unity project, and wanted to have tilesets of 20x20, but the graphic designer mentioned that tiles like 8x8 or 16x16 are better, because it being power of 2. I asked what was the ...
0
votes
1answer
1k views

How to mirror a texture in libGDX

Is it possible to rotate my sprite in LibGDX? public class Flame { private static final int FRAME_COLS = 6; private static final int FRAME_ROWS = 1; private Animation flameAnimation; ...
1
vote
1answer
26 views

How to iterate a sprite group correctly in Pygame avoiding “maximum recursion depth exceeded”?

I'm making a game and I have almost finished it, but I'm usually finding the error RuntimeError: maximum recursion depth exceeded when I iterate a sprite group. This is an example and the group is ...
0
votes
1answer
42 views

Java: Exported JAR file doesn't load images

I am using Netbeans to create my game. The images do seem to load when I run it in Netbeans. However, the built jar file only leaves me with a blank screen. This is how I call the images in my game. ...
0
votes
0answers
40 views

speed/power trade-offs in sprite-based vs shader-based games?

I'm trying to understand how expensive (speed-wise and battery-wise) certain shader-based code is compared to the sprite-based code I'm used to. I apologize up front that this question is a bit ...
1
vote
1answer
31 views

Aspect ratios for sprites in Unity3d

I'm using Unity3D version 5.0. I'm wondering what the best way to deal with changing resolutions in Unity is. In Swift I can just use the @x2/@x3 in order for it to pick the correct sprite for it ...
0
votes
5answers
204 views

How to properly pass sprites to a std::vector without destroying the sprite's texture in SFML?

From the official SFML tutorials, The White Box Problem:- "When you set the texture of a sprite, all it does internally is store a pointer to the texture instance. Therefore, if the texture is ...
1
vote
4answers
519 views

What is the easiest way to make an object follow the edge of a sprite?

I have a rounded rectangle sprite and another sprite that's just a circle. I want the center of the circle to follow the edge of the rounded rectangle. Is there any easy way to accomplish this task? ...
5
votes
4answers
3k 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. ...
2
votes
2answers
7k views

Exporting the frames in a Flash CS5.5 animation and possibly creating the spritesheet

Some time ago, I asked a question here to know what would be the best way to create animations when making an Android game and I got great answers. I did what people told me there by exporting each ...
1
vote
0answers
40 views

Editing sprite shading to change perspective?

I'm currently developing an RPG in Java with some of my friends, and one of my tasks is to do the pixel art. I'm a beginner at it, but I know that I'll get better in time. I recently finished the ...
0
votes
2answers
502 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 ...