A 2D rendering of an object in space.

learn more… | top users | synonyms (1)

3
votes
1answer
312 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
0answers
29 views

Create a sprite in Unity that has a border that does not change its width when scaling

I am trying to create a box that has a 10 pixel border and when I scale that box I would like the border to stay 10 pixels no matter the size. I am currently trying to create an empty game object ...
0
votes
3answers
1k views

How would I generate random falling objects

I'm creating a game using libgdx on Eclipse that is similar to Ragdoll Avalanche. I'm looking for a way to generate falling objects like the triangles of Ragdoll Avalanche. All I know that i have to ...
0
votes
1answer
80 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 ...
0
votes
1answer
53 views

Can't seem to get Sprite to face left in sfml c++

I am having some small issues getting my sprite character to flip around. Basically I have a character that can walk to the right.. I am looking to flip it so that it looks like it is walking left. I ...
5
votes
1answer
468 views

Unity3D - How to tessellate 2D sprites?

I use dynamic vertex lighting on 2D sprites. On larger sprites the lighting is uglier than on smaller ones. This is because every sprite is just a quad of two triangles. Not enough vertices there for ...
0
votes
1answer
54 views

How to render the sprites for a 2D soft body physics system

This is not a question as to how to achieve soft body physics, but rather if I have a mass-spring system how to modify a sprite with that information. I am using unity so I dont have access to vector ...
0
votes
2answers
167 views

Simultaneous Animation for a GameObject - Unity3D

Its my second week with Unity. I am doing a 2D game and I have a small GameObject which should change its sprite along with following a definite path defined in Animation Curves. I did both of them ...
0
votes
2answers
370 views

Libgdx detect when player is outside of screen

Im trying to learn libGDX (coming from XNA/MonoDevelop), and I'm making a super simple test game to get to know it better. I was wondering how to detect if the player sprite is outside of the screen ...
0
votes
1answer
17 views

Sprite rotation 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; private ...
1
vote
1answer
23 views

How to remove the old sprites in pygame and show them at a different location

I am trying to show the motion of some basketballs towards walle using the pygae sprites. The idea is that I don't know how to remove the old ones so they won't show. Is there a move method so that it ...
0
votes
1answer
54 views

Set color by uniform per sprite using libGDX SpriteBatch

I am using a SpriteBatch to render large amounts of sprites very fast. Now I want to modify the sprites with shaders to tint them in a color. Problem 1: Altering an uniform by getting the shader and ...
0
votes
0answers
108 views

Bad quality of the sprite in Unity

I need to import a few sprites (background platform and sky) into my game scene but it seems that their quality after importing into Unity is too bad (they are blurred). The original resolution of ...
0
votes
3answers
196 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? ...
3
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
93 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
104 views

Is it Possible to create one equipment piece, and handle the manipulation programatically

I have a 2D game made in XNA-4.0. I am brainstorming on how to implement a system of equipment where I can draw one Texture, and rotate/scale it to my character's current animation without haveing to ...
0
votes
1answer
57 views

Why does my vertex shader produce no output until I add some arbitrary value to the position attribute?

I want to draw a textured quad but there is nothing drawn and the setup should be right. This is my vertex shader: #version 330 in vec2 position; in vec2 texel; out vec2 texCoord; void main() { ...
5
votes
1answer
155 views

How to read a color of a pixel from texture (cocos2d-js)?

How to read a color of a pixel at [x,y] from a texture (in cocos2d-js)?
3
votes
1answer
71 views

How do I edit a Texture2D at run-time to visually indicate connected tiles?

I'm making a 2D sandbox game in C# and MonoGame, and I have a couple of tile sprites. These tile are loaded in-game as Texture2Ds. I want to have blocks visually connect to adjacent blocks. An ...
1
vote
1answer
54 views

Ground in AndEngine

I'm quite a newbie to AnEngine and I have a problem. I have been searching a lot, but I couldn't find answer. I'm trying to make my first game, but I have no idea how to make ground. I'd like to make ...
0
votes
1answer
241 views

Need ideas on how to give my levels structure [closed]

I am making an iOS game for a project at school. It is going to be a tiny bit like Fruit Ninja, as in it will have different things on the screen, and when you hit them, they die, and you get points. ...
1
vote
1answer
103 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
135 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 ...
4
votes
1answer
263 views

Letting the user draw a Polygon Body and Image

In my game, I want to provide the user with a drawing feature. By free hand drawing, the user creates a polygon shape. Then, in my game implementation, I have to create a body for the found vertices ...
1
vote
2answers
813 views

SDL2 sprite batching and texture atlases

I have been programming a 2D game in C++, using the SDL2 graphics API for rendering. My game concept currently features effects that could result in even tens of thousands of sprites being drawn ...
0
votes
0answers
95 views

Unity 2.5D Character Movement

I'm wondering if anyone can point me in the right direct as to how to take a 2D character/sprite in Unity and have said character turn corners in a 3D style. Solutions or resources welcome.
0
votes
0answers
32 views

How do I open/edit a *.xnb file in XNA Game Studio 4.0?

I've downloaded a *.xnb font sprite, but I don't know how to open/edit it. I installed XNA Frameword 4.0 in VS 2010. Thanks for your help!
1
vote
2answers
405 views

how to re-use a sprite in cocos2d-x

some times it takes time to create the sprite structures in the scene, I might need to setup structures inside this sprite to meet requirement, thus I would hope to reuse such structures with the game ...
8
votes
7answers
2k views

What's the best way of transforming a 2D vector into the closest 8-way compass direction?

If you have a 2D vector expressed as x and y, what's a good way of transforming that into the closest compass direction? e.g. x:+1, y:+1 => NE x:0, y:+3 => N x:+10, y:-2 => E // ...
1
vote
1answer
584 views

LibGdx sprite rotation vs Box2D physics rotation problem

LibGdx sprite rotation vs Box2D physics rotation problem Tearing my hair out on this one. I am an experienced software developer, but very new to LibGdx and Box2D development. I am writing a game ...
0
votes
1answer
66 views

Simple shader for sprite interface [closed]

I have been looking for any examples for a long time, I cant get anything to work (from the examples). I have tried using vertex/pixel shaders, effects files, but they never have any effect on the ...
2
votes
1answer
748 views

Create sprite renderer using custom material

I have done following thing. Create Material Attach sprite with texture type as Texture Add sprite renderer component to game object Assign material to it that I create in last steps There is no ...
1
vote
1answer
78 views

Interpolating rotated objects

I've finally got interpolation working to 'smooth' out movement, however it doesn't seem to work for objects that are rotating (around their own center) - when I try to do this, the objects in ...
1
vote
1answer
95 views

Why are my sprite outlines partially rendering in the wrong place?

I've been trying to draw an outline around a sprite using the code from this answer. Details My sprite is called Ship2Sprite. This is how I create the rectangle: rectangle = New ...
0
votes
0answers
12 views

Seperate game sprite

I want to create java game Jump Rope , something like this : http://www.juicycraft.com/HTML5/JumpRope/ do I need to draw two seperately sprites (one for character and one for rope ) or only one ...
0
votes
2answers
91 views

Implications of using a single ID3DXSprite object to render multiple images

I wanted to know if using a single Sprite object to render all 2D textures on screen is better than using one sprite for each 2D texture in performance. EDIT: Using single sprite refers to using a ...
1
vote
1answer
53 views

Compute billboard rotation

I'm trying to compute a matrix to have object always facing the camera. For the moment, my result look pretty good, the problem is that my original billboard scale isn't preserved (Every billboard ...
3
votes
1answer
255 views

How can I apply a “genie animation” to a CCSprite?

I am new to Cocos2D and following this tutorial. I want to animate a CCSprite with the genie effect that OS X uses for hiding windows to the dock and showing them again. Here's an example from an ...
1
vote
1answer
115 views

libgdx get rotated sprite coords points

I would like to get the position of each edge of a sprite when he has been rotated. I have no idea how to do it, I made a image to explain it. I would like to get the X and Y position of each Red ...
0
votes
1answer
503 views

set TouchEvent to every particle in SpriteParticleSystem in andEngine livewallpaper

All I have working on andEngine Live wallpaper and I have use SpriteParticleSystem. I want to add touch event to every Sprite of SpriteParticleSystem and remove that sprite from scene. I have use ...
-1
votes
1answer
126 views

Changing a Sprite When Hit in GameMaker

I am making a simple little Galaga style game. I want the objects sprite to change whenever it is hit. For example if a laser hits an alien then the sprite takes 1 out of 4 damage to its health ...
1
vote
3answers
576 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: mygroup = ...
-2
votes
2answers
309 views

How can I locate the frames of a spritesheet PNG based on this PLIST data?

Someone asked me to reskin a certain game. Now he only sent me the whole sprite PNG and PLIST files of the sprites. He instructed me to rename each sprite with the same name corresponding to each ...
4
votes
3answers
638 views

How can I generate isometric sprite sheets from 3D animations?

I want to generate sprite-sheets for an isometric projection of various 3d assets purchased from the Unity3D asset store. I'd preferably also render the normal maps. I am a programmer, but new to 3D ...
2
votes
2answers
102 views

How do I get rid of this coloured border on my sprite?

I'm working on a 2D game in Unity. My triangle sprites display in-game with a line along one of the transparent sides: Larger view here. You might need to zoom somewhat. It's quite obvious on the ...
0
votes
0answers
26 views

Is there a way to make Unity 4.3 Sprite packer keep caching even after restart unity?

It's bother me a lot. It has to pack every time I open unity. It took sometimes until it finish. If I drag new image into project and do not specify any packing tag, it still repack. I know there's a ...
0
votes
1answer
137 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 ...
4
votes
1answer
133 views

cost of texture change vs color change

How would I go about determining the difference in cost between changing the render color of an object every frame vice changing the texture (same sheet, just changing the source rectangle) every ...
0
votes
0answers
48 views

Monogame - How to make a character move automatically right when the game starts?

I am working on an infinite runner using Monogame and Visual Studio. I have a basic sprite that can move back and fourth. But I want to know how I can have objects, like platforms, moving ...