A 2D rendering of an object in space.

learn more… | top users | synonyms (1)

-1
votes
0answers
20 views

2D Sprite movement XNA [on hold]

I'm using XNA to make a 2D game. How would I use keyboard input to move a simple sprite around the screen? Any help would be greatly appreciated.
1
vote
1answer
44 views

How can I implement the ability to 'cut' sprites into arbitrary shapes?

I want to create a game where you have scissors that cut a sprite in a shape that you create by dragging your finger on the screen. My problem is that I can't figure out how can I cut my sprite in ...
1
vote
2answers
47 views

Collision between Mesh Plane and 2D Sprite

I've just recently started programming using Unity and made a couple of games with it, I'm trying out more and more advanced stuff as I do more games, but right now... I'm trying to make a game ...
0
votes
1answer
41 views

Dealing with multiple 2d sprite animations for the same object

I am using libGDX for a 2d game. Some of my in-game objects have animations, for example a soldier in top-down view that has a walking animation. That is working fine. Now, while walking, this ...
0
votes
0answers
22 views

How to rotate a sprite from sprite sheet (sequence of rotating frames) using keyboard in Java [closed]

I am making a game for my HW project. Right now, my tank can move forward(right arrow), backward (left arrow) and fire when moving left or right. I currently have a Tank class which receives the ...
0
votes
0answers
12 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 ...
0
votes
0answers
24 views

AndEngine - Making the game loop

I am trying to develop a game with simple touch combinations. You must click on 4 different monster in a specific combination. The combination is generated using public int generateNumber(){ ...
-2
votes
3answers
28 views

Sprite not drawing at correct position

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

Alternative Font loaders in Monogame Framework

While working on projects of mine, I have been finding that it is a huge pain to switch operating systems just to create a simple spritefont when using Monogame. I saw that the Nuclex Framework can ...
6
votes
4answers
179 views

Keeping sprites nice and pixelated

How do I keep the sprites in my game nicely pixelated on screens of all sizes and resolutions? I use nearest-neighbor texture filtering when resizing pixels, but this works well only at really high ...
0
votes
1answer
62 views

Assigning multiple game objects to a single sprite (Unity)

I've been making a pokemon game clone on my own with Unity, as I'm a beginner and just trying to learn. Up until now I've been splicing the town pictures and manually putting them together, but this ...
0
votes
1answer
29 views

Change sprite at touch input: “scroll through characters”

if(Input.GetKey("y")){ gameObject.GetComponent<SpriteRenderer>().sprite = Characters[0]; } if(Input.GetKey("u")){ ...
1
vote
1answer
79 views

What causes sprite tearing / corruption in unity PC stand alone running on Windows XP?

The image below is representative of my client's experience running the released version of an app I created for him on his Windows XP Machine. I built it using Unity 4.5. The messed up buttons ...
1
vote
1answer
74 views

How can I position a sprite in the same spot across different screen sizes?

Taking into account the multitude of screen sizes and resolutions, is there a way I can position a sprite so it's at roughly the same spot on every iOS device? Doesn't matter if you are using ...
0
votes
0answers
48 views

Change 2D Angle Into Isometric Angle

i Rendered My Sprite With 72 Angles In Isometric View. Rendered Frame Number 0 And Angle 0 Is When My Sprite Looking Right And And I Rendered My Sprite Every 5 Angle. In My 2D Game My Sprite Moving ...
0
votes
1answer
55 views

2D Hitboxing on an HTML image [duplicate]

I want to make a turn-based game where the player is given "opportunities for attack." An image of the in-game sprite character appears when it's the player's turn to attack. The player can mouseover ...
1
vote
2answers
140 views

How can I implement a futuristic “barrier field” that reacts to hits?

I want to implement a "shield" that reacts to projectile hits. Currently, my colliders are mapped to the animated sprite's outline on all frames. I'm looking for something like the image below. For ...
8
votes
6answers
2k views

How do you move a sprite in sub-pixel increments?

Pixels are either on or off. The minimum amount you can move a sprite is a single pixel. So how you make the sprite move slower than 1 pixel per frame? The way I did it was to add the speed to a ...
0
votes
1answer
66 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 ...
1
vote
1answer
47 views

Alpha blending, transparence and z-ordering

I'm making some tests with alpha blending in a projet and I don't understand something. In my tests I've done something like that and everything look good: Draw blue box first (depth test: true, ...
1
vote
1answer
71 views

Quick sprite contouring solutions?

I want to be able to quickly outline sprites(mainly with black, but other colours too) without doing it manually, as pictured. What would be a good program/solution to do so? Edit: I don't want it ...
0
votes
0answers
94 views

How to overlay texture materials on top of each other in Unity 2D tiled game

I'm learning how to do a 2D tile-based game. So far, I have followed this tutorial which seems like a good starting point. With his method of building the raw triangles and then applying the uvs, I ...
0
votes
0answers
20 views

CCActionMoveBy doesnot working properly when the action called for many of the sprite in cocos2d

I have an issue with CCActionMoveBy when I call the movement action for many of my sprites. I need to move to a certain position and then remove it from the scene. My problem is If the call the ...
0
votes
0answers
78 views

How to get rid of half pixel artifacts?

I've been having a bit of trouble using OpenGL to make 2D games. I am using a traditional ortho perspective with just some sprites being rendered and moved around. It all works perfectly but there is ...
0
votes
2answers
149 views

How to make sprites from multiple images using SDL2

Using SDL2 in C++ I can load textures with out problem however, I have sprites that are from about 15 different png's that I was hoping I could load them all up and for loop through them. However, ...
0
votes
0answers
112 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
1answer
84 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 ...
0
votes
1answer
141 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 ...
1
vote
1answer
65 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 ...
-1
votes
1answer
63 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; private ...
0
votes
1answer
298 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 ...
1
vote
1answer
118 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
73 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() { ...
3
votes
1answer
79 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
62 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 ...
5
votes
1answer
210 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)?
0
votes
0answers
178 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
104 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!
0
votes
1answer
78 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 ...
5
votes
1answer
623 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
103 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 ...
1
vote
1answer
96 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
98 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 ...
1
vote
1answer
80 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 ...
2
votes
2answers
111 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
41 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
259 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
143 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
54 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 ...