A 2D rendering of an object in space.

learn more… | top users | synonyms (1)

0
votes
3answers
71 views

In Unity3D, how can I improve image clarity?

The same images that appear clearly in Adobe Flash appear blurry in Unity. My game uses quads, cubes and sprites. I've tried the game on Android, iPhone, Mac and PC, but the image appears ...
2
votes
1answer
748 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
0answers
282 views

Inline sprites in Unity's text?

How can I use different materials when using the tag for Unity's rich text syntax? I want to be able to have sprites that are inline with my text without having to create custom fonts. Here's what I ...
1
vote
1answer
178 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 ...
0
votes
1answer
20 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 ...
1
vote
1answer
243 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 ...
8
votes
7answers
2k views

Can I use copyrighted sprites for a demo?

I just had a quick question and wanted everyone's opinions. I'm making a 2D demo game for a resume which I want to post online. I'm applying as a programmer position so I don't really have my own ...
3
votes
1answer
413 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
5answers
103 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 ...
0
votes
1answer
27 views

Sprite Size For A Top Down RPG-Shooter

I am creating a Top-Down RPG-style Shooter in Javascript with Canvas, based on Sci-Fi Events I have written. Now I have ran into a conundrum: I have nice looking square tiles - that don't look like ...
1
vote
2answers
82 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.
1
vote
2answers
125 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 ...
2
votes
2answers
4k views

Android: Improving surfaceView?

I'm using Surfaceview in my Android app. I have two threads, one for UI and another for rendering and updading the UI. I am limiting my frames per second to 30 fps and have employed frame-skipping ...
-2
votes
1answer
34 views

Sprite disappears after adding a material to it

I have background which is FirsLayer, order in layer 0 and platform over it which is FirstLayer, order in layer 1. Once I add a material to the platform, the layer doesn't seem to change but it ...
0
votes
1answer
132 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
187 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
1answer
22 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 ...
1
vote
1answer
1k views

Positioning a sprite in XNA: Use ClientBounds or BackBuffer?

I'm reading a book called "Learning XNA 4.0" written by Aaron Reed. Throughout most of the chapters, whenever he calculates the position of a sprite to use in his call to SpriteBatch.Draw, he uses ...
4
votes
3answers
4k views

Smooth Sprite Movement - Don't Add Velocity to Position?

I am trying to figure out if there is a way to move a sprite smoothly on the screen at different speeds without stuttering, but keeping the effect that it's moving smoothly; especially at faster ...
0
votes
1answer
1k views

Ligdx Box2d : convert box2d coordinates into screen coordinates

I'm new in libgdx and i have a little problem. I created a body in box2d and i want to assign it a sprite; for that i need to get the position of the body,then insert into the main loop the updated ...
-2
votes
3answers
46 views

Sprite not drawing at correct position

I have a texture with 20x20 pixels. Consider this piece of code: public override void Draw(GameTime gameTime) { spriteBatch.Draw(texture,Position * 20,null, Color.White, 0f, new ...
2
votes
1answer
568 views

Windows 8 C# Compile spritefonts for MonoGame without XNA

Hello Stack Exchange community. Recently, I've been attempting to in some way generate sprite-fonts into XNB files for use with MonoGame. The issue is however, as you may be aware, XNA is very ...
0
votes
3answers
60 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
151 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
188 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 ...
-2
votes
1answer
27 views

addChild does not work in Flash [closed]

Have been trying to understand this problem for two weeks. When I use addChild(movieclip) in the Main.as file, it works. When I try to use it in a function in a separate class file it does not work. ...
8
votes
1answer
316 views

Why are 16×16 pixel tiles so common?

Is there any good reason for tiles (e.g. Minecraft's) to be 16×16? I have a feeling it has something to do with binary because 16 is 10000 in binary, but that might be a coincidence. I want to know ...
3
votes
2answers
731 views

In Ren'Py, how do I show a different image depending on variables?

At the start of my RenPy game, the player chooses a male or female character. The game plays out the same for both, save for some details. The problem is that I want to write: show hero normal ...
2
votes
1answer
280 views

How do I make a sprite appear to sway with the wind?

I'm trying to find a method to simulate the effects of wind on various sprites in a side-view 2D scene. What relatively simple technique could I use for this? What I have in mind is to give these ...
0
votes
1answer
59 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 ...
0
votes
1answer
65 views

Moving a Sprite using Mouse in SFML (setOrigin logic needed)

I trying to make a card game using SFML. I want to move the card relative to the position the player selects on the card. I managed to check if the card is pressed. However, when I click and drag, the ...
0
votes
4answers
435 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? ...
1
vote
1answer
29 views

Android - animating spritesheets

I'm creating a basic endless runner game on Android using SurfaceView. I have background that recreates itself constantly, which was simple enough. One problem I've always had is getting my head ...
0
votes
0answers
23 views

How to use collision masks and overlap_area in pygame?

So, I've been prototyping a game, and I've been using sprite collision, and it's not cutting it any more. I read up on the documentation about masks and overlap area: ...
2
votes
1answer
60 views

How to divide sprite sheet, but keeping the in same png?

first post here, but couldn't find an exact answer in your database, so guess I'll have to ask. I want to know how it is possible to create a ".META" file for a .png so you can extract individual ...
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 ...
0
votes
2answers
71 views

How would I create classes for each map tile instead of using a tmx? LibGdx

I am making a top down style game using LibGdx that I want to be randomly generated each new game load. I already have the algorithm to generate the array for what tile should be what. But i'm ...
0
votes
1answer
45 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 ...
0
votes
1answer
44 views

Would flipping a sprite depending on direction be too inhibitive for modders? [closed]

For a game I'm making (similar to games like Terraria, Starbound etc.) I want to ensure that the framework is as modder friendly as possible. This leads me to wonder if it would be too inhibitive to ...
1
vote
2answers
117 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 ...
0
votes
1answer
36 views

Move Sprite in direction of rotation

I have the following code. void Update () { if (Input.GetAxis("Vertical")!=0) { GetComponent<Rigidbody2D>().AddForce(-transform.right); } ...
0
votes
1answer
40 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 ...
0
votes
0answers
8 views

Set FilterMode.Point to all GameObject children?

I want to scale a GameObject using FilterMode.Point. However it seems I need to apply FilterMode.Point to all children individually if I want them to uses nearest neighbor when scaling up. Is there a ...
1
vote
1answer
44 views

What size should I scale my sprites to before importing them to Unity?

I'm developing a game with an 8bit look. I want to target iOS and Android devices. The real resolution for my backgrounds is 108 x 192. Should I should put them in that same resolution and scale ...
0
votes
2answers
255 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
0answers
22 views

Sprite animation in Java? [duplicate]

I know this question has been asked many times but none of the answers were very clear to me. I'm working on a small Java RPG, and so far I can control a character (drawn onscreen with a .PNG sprite) ...
0
votes
1answer
206 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 ...
0
votes
1answer
67 views

Unity 2D - scale sprite according to screen width

So I have a square sprite (width == height) and I want to scale it so that both width and height are exactly one fifth of the width screen. To find the desired pixel width I do: float ...
-1
votes
2answers
541 views

How do I make a sprite blink on an HTML5 canvas?

I'm thinking of the flashing effect many games have when a character gets hit and takes damage. Something like overlaying a lighter color on visible sprite pixels for a second.
-1
votes
1answer
46 views

How do i load, render and trasnform 2D images using Direct3D 11 API? [closed]

In my small game project using DirectX 11 API, I created a Direct3D device, and can draw 3D meshes, using web tutorials and a book. But I cannot figure out how to load, transform (rotate, scale, ...