A 2D rendering of an object in space.

learn more… | top users | synonyms (1)

2
votes
1answer
159 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 ...
1
vote
0answers
80 views

How to make 2D sprites from 3D models [closed]

Hi I'm making a top shooter game and I'd like to what programs are the easiest/fastest to make 3D models and sprite sheets ? Here is an example of I what I want to do ...
1
vote
1answer
149 views

How to rotate an image around its own center in AndEngine?

I'm beginner in Android programming with Andengine framework. And my question: How to rotate an image around its own center in AndEngine? I use Body and AnimatedSprite. Update This is my code: ...
0
votes
0answers
59 views

How do I get a sprite's angle after collision?

I'm using Cocos2d (version 3) and I want my hero sprite to be jostled around by incoming enemy sprites. The Chipmunk-based physics work, but I need some way to track the rotation of the sprite after a ...
1
vote
1answer
80 views

Is this Possible to force gameobjects (coliders etc) to get stretched based on the aspect ratio of the screen?

Well with unity3D, I am in big trouble whenever I use sprites. As for textures I compensate for a evener look by Stretching it (Screen.width & Screen.height- that's fine for low end 2D games). Now ...
0
votes
1answer
122 views

Sprite/Tile Sheets Vs Single Textures

I'm making a race circuit which is constructed using various textures. To provide some background, I'm writing it in C++ and creating quads with OpenGL to which I assign a loaded .raw texture too. ...
0
votes
0answers
125 views

Unity not updating sprite animations (possible bug)

I have a simple animation of a foot which i want to change sprites from one sprite to another, which is seen in the following two images: now as one can see in the animation timeline there is a ...
1
vote
1answer
270 views

Cocos2D - Fill a Sprite with a pattern

I have a CCSprite with a certain shape in Cocos2D and I would like to fill it with a pattern, as seen here: I've seen a lot of examples where they fill a rectangle with a pattern, or even a ...
0
votes
1answer
124 views

Incorrect sprite rotation with atan2() [duplicate]

I want to rotate a sprite so that it faces the mouse cursor/screen touch location. Currently I'm using the following method to compute the angle of rotation. The input position is the target point the ...
0
votes
1answer
2k views

Change the sprite of a Object in Unity

Inside the script code of the the hero(object) I want add the possibility to change its sprite. So the player hits the space button and the sprite changes into the other sprite already added to the ...
0
votes
1answer
2k views

How can I get multiple sprites on a Unity2D Sprite Renderer

I have a GameObject that I want to have multiple sprites. I tried adding an extra Sprite Renderer, but it tells me I can't add the same component multiple times. I'd really rather not have to have ...
0
votes
1answer
43 views

Stopping sprties from toppling off platform

I am new to Unity and am trying to create a simple 2d platformer. I have applied a box collider to my player sprite and the floor/platform its standing on. Now when I go over the platform, it toppes ...
1
vote
1answer
87 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 ...
-2
votes
2answers
258 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 ...
0
votes
1answer
149 views

Android AndEngine creating a body behind the sprite exactly

I am using AndEngine for Android. I created a body, but it is not behind the sprite as I wanted. Body.setTransform(Sprite.getX()/32, Sprite.getY()/32, 0); This is ...
1
vote
1answer
102 views

Drawing Sprites with Artemis

I am trying to trace the StarWarrior code (the Artemis tutorial). I cannot figure out how these sprites are being drawn. This is the code where the player's ship is initialized: /// ...
4
votes
1answer
2k views

Unity 4.3 (2D) Rendering only the parts of a sprite that are within specific bounds

I'm working in Unity, using the 2D features to recreate the match-3 style of 10000000 (Ten Million). I have a parent object (green square) with several children objects (blue rectangles) on top of ...
1
vote
0answers
494 views

Unity 2D loading Spritesheet Atlas at runtime from web and using it dynamically

I am new to Unity (came from AS3/Starling) and just started for 2D games in Unity. I have a spritesheet / texture-atlas (many different sized images packed in a single png) which I want to download at ...
1
vote
0answers
170 views

LibGDX render sprites in tiled-map format ( convert texture to sprite )

I am creating a game in which till now I have used textures to create A 2D tiled game. I have created a matrix which converts the touch co-ordinates into a array index number and according to that ...
-2
votes
1answer
182 views

Load single texture atlas for multiple sprite

Recently, I am developing sudoku game. For this, I have created multiple grid 9x9,12x12 and 15x15. For this numbers are repeated so multiple sprite renderer are created and it load same number ...
0
votes
0answers
34 views

Register Modifier to Parent Entity

As far as I know, with Andengine if you register a modifier to a parent, all the children will also be affected by the modifier. If I am wrong please let me know. I'm currently working on a game and I ...
1
vote
3answers
85 views

Getting sprites to move exactly the same on different devices

Background When moving a sprite along the X axis, this is my code: spriteXReal = spriteXReal + (spriteXVel * dt); //.5 would be halfway point of, 1 would be right hand side screen etc... ...
0
votes
1answer
36 views

How can I get the width and height of a picture?

I'm trying to make a script on RPG Maker XP that needs the width and height of an image to do some calculations. I tried @picture.bitmap.widthand @picture.bitmap.height but it returned the width and ...
0
votes
0answers
52 views

Dealing with 2D tiled maps in DirectX

I'm new to DirectX. I'm pretty much to the point to where I can create some sprites and attach textures to them, but I'm not fully cognizant of the entire model of textures and sprites or exactly how ...
-1
votes
1answer
441 views

Animating a sprite with mecanim

I want to try animating sprites with the Unity's mecanim. All the tutorials I found used bipedal humanoids, which already have the avatar for the animator component and imported animations. What I ...
2
votes
2answers
196 views

How can I create delays for sprite animations that work correctly when the application is killed and restored?

Please see my original question here: How should I use system time to compute delay times without stutters? In summary, I am attempting to to introduce a delay (say of 5 seconds or so) before a ...
0
votes
1answer
159 views

Why are my geometry-shader-generated billboards not showing up given the following code?

My program is a rain particle system. After processing a list of positions of rain particles, I passed them to the geometry shader for generating a billboard for each position. If I use a simple ...
2
votes
3answers
620 views

Two sided sprites

What is the most efficient way of making two sided sprites in Unity's new 2D tools? I'm looking to make playing cards with a backside and a front side.
1
vote
1answer
592 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 ...
7
votes
1answer
771 views

How do I programmatically access single sprites when Sprite Mode is Multiple?

Unity 4.3 newly brings an ability to cut up a sprite sheet into multiple individual sprites. This is useful since you then only need one master spritesheet, but nevertheless get references to ...
1
vote
2answers
113 views

SDL sprite animation problem

I'm currently drawing my character from a single file, and my sprite class handles it taking the file path as an argument. Now, I need to add a simple animation, cycling between two frames. The ...
2
votes
2answers
228 views

Expandable 2d environment by spawning and controlling individual tiles

what is the best way to implement an environment that is "expandable" in every direction so that when the player moves in any direction a new row or column of tiles that can be manipulated ...
0
votes
1answer
131 views

Making a sprite jump at a particular angle android

I am making a game in android Java, and I am kind of new in game programming. Please help me out. I have a sprite that is moving horizontally across the screen. I want him to jump when the use ...
0
votes
0answers
135 views

Sprite Rendering Cost Calculation

First of all asking before asking this question I have already read following post for the clearance of my mind. Sprite Renderer Texture 2D I want to change my background texture as per device ...
0
votes
0answers
21 views

libgdx : Scrolling background from spritesheet causes lag when sprite is repositioned… am I doing something wrong? [duplicate]

So, I use a sprite from a spritesheet to draw the background and repeat it. (I am drawing it twice) However, the moment that the background is re-positioned to make it look infinite, it causes a lag. ...
1
vote
1answer
585 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 ...
2
votes
3answers
916 views

Polygons vs sprites rendering performance in Unity for windows phone 8

I'm currently building a windows phone 8 game with unity, having 111 (no more no less) sprites being updated each frames. I have a strong overhead in the profiler (70% to 90% minimum) I tried the ...
3
votes
1answer
491 views

How do I make a 2D character aim their gun toward the mouse?

Heli Attack is a perfect example of the shooting mechanic I'd like. The character aims perpetually toward the mouse. What's going on here? From what I've read so far, you could separate the arm and ...
0
votes
1answer
172 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.
0
votes
2answers
276 views

Recommended way to handle sprite assets for different screen densities (Android)

I am currently working on a 2D game for Android. All of the images that I render were created as SVG's and then exported to PNG's which I have placed in my assets directory. These images are also all ...
1
vote
2answers
138 views

What is the correct way to draw layered Sprites in modern OpenGL?

So what do I mean by layered sprites? Layered Sprites are Sprites that consist of multiple layers, e.g. you have sprite sheets for the basic Body, the Head, Clothes, Weapons, etc. Well now I wanted ...
1
vote
1answer
158 views

How to adjust a font to fit inside a speech bubble?

I'm creating a game that contains a speech bubble for dialog. The idea of this function is to allow one call to set new text in a speech bubble. The speech bubble will adjust in size of the new font ...
2
votes
3answers
198 views

Is it more efficient to encode rotation in a spritesheet or rotate at runtime?

I'm developing a game with JavaScript and HTML5 and I'm wondering about the performance implications of sprite rotations. There are two ways that I know to rotate a sprite: Rotate the actual sprite ...
3
votes
1answer
92 views

Pygame collision detection less frequent when objects are increased

I currently experiencing an issue in pygame where whenever i increase the number of objects e.g. platforms, rocks for a in range(150): rock = Rock(0,0) OR incresing the range which they spawn ...
0
votes
2answers
341 views

AndEngine - Smooth scaling on a sprite

I'm trying to implement a pinch zoom on a sprite. I would like to get an effect like the SmoothCamera, but on a single sprite. I've managed to pinch zoom on the sprite by changing its scale, but the ...
0
votes
1answer
104 views

methods for player interaction with world

What's the proper way, a proper way, or any proper way at all, to handle interactions between a sprite (usually a player) and another sprite (can be any other object)? (in a tile based world) i.e. ...
2
votes
1answer
5k views

How can I programatically generate sprite instances in Unity?

I want to create a block-based puzzle game that generates blocks as they are required, however I cannot seem to find any good imformation on how to do something like this using Unity's new sprite ...
0
votes
1answer
127 views

How can I support a background more complex than a flat color?

I'm a beginner at making 2D games. Up until now, I always created my games with a black background, or a fixed color. This is because my sprites always have a black (or a solid color) background, and ...
1
vote
1answer
133 views

How to prevent a sprite to move in an angle that will lead to collision

I have two sprites that can move in any angle. The sprites are rectangular. I created bounding boxes for both the sprites. These boxes rotate whenever the sprite rotates. They always surround the ...
2
votes
1answer
131 views

How do I rotate a bounding box together with a sprite?

I have a game object with a sprite that can rotate. It's a rectangle. I need its bounding box to rotate with it. How do I make sure that they can both rotate, but they're always both at the same ...