A 2D rendering of an object in space.

learn more… | top users | synonyms (1)

1
vote
1answer
945 views

Loading images in XNA 4.0; “Cannot Open File” Problems

Okay, I'm writing a game in C#/XNA 4.0 and am utterly stumped at my current juncture: Sprite animation. I understand how it works and have all the code in place, but my ContentLoader won't open my ...
3
votes
1answer
213 views

Sfml: Sprite scale transformation animation

Is there any way to animate a transformation on sf::Sprite like setScale or setPosition? ie: sprite.setScale(0.5f,0.5f);. I want the transition between normal and half scale be smooth. Thanks!
1
vote
0answers
329 views

Create a touchpad-joystick using texturepacker2

I am adding a touchpad control to my game, using TexturePacker for loading images into the image-atlas. I have followed this tutorial to add the joystick. Everything is the same apart from the loading ...
1
vote
1answer
277 views

Sprite sheet resolutions and Tile Maps

I am making a game using Cocos2d-x and want to support multiple mobile phone resolutions and sizes. Right now I have made my game sprite sheets set on a resolution of iPad Retina's resolution of ...
2
votes
1answer
289 views

Glowing Sprites

I really enjoy the simple sprite style that is just shapes + slight glow effect. Cipher Prime uses it a lot in their games. I was wondering how this effect was achieved. Is the sprite itself just ...
1
vote
1answer
406 views

2D character tile based movement problem

I am making a Super Mario like 2D platformer and I've encountered a problem. I need to move this sprite : When a player presses the right key, the sprite moves by 32 px to the right. The process ...
1
vote
2answers
2k views

Simple Android loading screen when using OpenGL

My game uses openGL ES 2.0 on Android and it's got to the point where the pause (while loading resources) has become noticeable. All I'm after is to show a static screen (probably via an XML layout ...
1
vote
3answers
137 views

Generating spritesheet(s) on load

I would like to reduce the size of the spritesheet I am loading by only loading the specific sprites I need. Is there a way to crop and splice images at runtime using javascript? Creating separate ...
1
vote
1answer
205 views

Handling collision for sprites with different frame sizes

I am creating a platform game, and the main character has three images for its left and right animation. The problem is that when it is walking and the player run into a block, if at that moment it ...
0
votes
1answer
114 views

PyGame sprite assistance

I've basically just started developing with PyGame and I am having trouble with the whole Sprite concept. I have been looking every where for guides on how to use it, I just can't seem to find any. I ...
1
vote
1answer
332 views

Dealing with “jumping” sprites: badly centered?

Thing is, I've used darkFunction Editor as a way to get all the spriteCoordinates off a spriteSheet for each individual sprite, and parse the .xml it generates inside my game. It all works fine, ...
3
votes
1answer
294 views

sprite animation individual framerate

When animating sprites I am taking the delta difference between frames and locking the rendering frame rate of the sprite animation to the delta time. float delay = 1000.0f / FPS; float now = ...
1
vote
1answer
94 views

Black areas on different screen sizes

I'm currently facing some problems with sprites/images on different screen sizes. For now the game stage is stretched to maximum width and height of the screen. In Samsung Galaxy S2, SGS3 and SGS4 ...
1
vote
0answers
148 views

Recommendations for / issues with implementation of composite sprite system for beat 'em up game [closed]

I am currently working on a 2D Double Dragon style beat 'em up game project. We are working with DirectX 9 and are looking at implementing a composite sprite system for all our characters as explained ...
1
vote
2answers
449 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 ...
-2
votes
1answer
181 views

Bitmap vs. Vector Graphics: Building Sprites [closed]

I'm currently doing game development of my own I heard that bitmap is much cleaner than Vector graphics since it appear to show up ugly in pixel form? What's better shown in a 2D art form?
0
votes
1answer
57 views

sprite array problem with initialization

I have a problem with my Sprites. I'm trying to create a lot of Sprites. However, I got a problem in that I have several grass tiles and I don't want to do this grass1 = new Sprite...; grass2 = new ...
0
votes
1answer
91 views

My Sprite Rectangle moves, but my sprite doesn't

Here's the issue, When I build, everything loads fine, everything works, but then, when you enter the game, the sprite is there. However, The sprite does not move, the sprite RECTANGLE does. Meaning ...
0
votes
1answer
1k views

Android cocos2d getting a sprite to continuously move to a dynamic position

I tried using the MoveTo method in cocos2d to get a sprite to continuously follow my player sprite: CCMoveTo actionMove = CCMoveTo.action(actualDuration, player.getPosition()); CCSequence actions = ...
3
votes
2answers
1k views

OpenGL ES 2.0: 2D game rendering, no performance gain with glDraw call batching

I just did a small benchmark. To my surprise batching sprites into a single draw call doesn't give any significant performance boost. Following are my results: Hardware: iPod touch 4 Extra info: ...
3
votes
1answer
119 views

How to make a map surface object

I'm making a 2d tile based game. In pygame I could create a map like this: screen = pygame.display(resolution) map = pygame.Surface(width, height) for tile in all_tiles: map.blit(tile) ...
-1
votes
1answer
184 views

How would you program sprite movement in a 2-D ariel view rpg game? [duplicate]

I'm relatively new to programming and I have recently programmed an RPG game in java. Any tips on character movement with animations? I would like it to be similar to those of other rpg games such as ...
1
vote
1answer
96 views

Create sprite and place in pre-defined places using mouse

So, I have a table. I want to be able to click on a button that allows a mode where I place a sprite on the table, on places that are predefined. How do I do that? I was thinking I could constantly ...
0
votes
1answer
1k views

Android cocos2d removing a sprite after animation

I have an object going across the screen with an animation using the following code: CCSpriteFrameCache.sharedSpriteFrameCache().addSpriteFrames("ninjastar.plist"); CCSpriteSheet projectileSheet = ...
4
votes
1answer
2k views

How should a programmer get started with creating 2D Sprites? [duplicate]

I am a programmer. Given a sprite sheet, I can code game as per the requirements. But I do not know how to create these sprites. I use Cocos2D. And I do not know where to begin. I have never done ...
0
votes
1answer
67 views

How to determine the best approximate direction [duplicate]

I want to determine which sprite to use when one agent is "facing" another agent. My game is 2d, and uses 8-directional movement. Deciding which sprite to use for movement is easy enough since there ...
2
votes
1answer
438 views

Moving sprites based on Delta time - consistent movement across all devices with different resolutions

This is the formula I am currently using to move my sprites across the screen: Examples below only deal with X coordinates to keeps things as short as possible. Initial variable declarations: float ...
1
vote
1answer
3k views

LibGdx : Animations not working on custom actor

I have this code for rendering a sprite, retrieved from a TextureAtlas public class SpriteActor extends Actor { private Sprite sprite; public SpriteActor(TextureAtlas atlas, String spriteName) { ...
6
votes
1answer
1k views

Mip Maps on 2D Sprite causing black line above. Why is this?

I am new to Unity. I'm trying it out and using Futile for a code-first approach, but still importing textures using the Unity system. The problem I'm having is that when I use mip maps to scale large ...
3
votes
2answers
1k views

scaling point sprites with distance

How can you scale a point sprite by its distance from the camera? GLSL fragment shader: gl_PointSize = size / gl_Position.w; seems along the right tracks; for any given scene all sprites seem nicely ...
0
votes
5answers
1k views

Collision detection logic

Edit 2 In the following picture sprite1 (the red square) is hitting the platform from the left, so: sprite1_rightEdge>platformSprite leftEdge would be true, so I can simply reposition ...
1
vote
2answers
381 views

Sprite not rotating around its centre after Scaling at its centre

If I scale a sprite at its centre, then try to rotate it around its centre as well, the rotation does not occur around its centre. If you need to rotate, for example a scaled ball,the way its working ...
1
vote
1answer
240 views

How to attach one sprite to another in LibGDX?

I want to attach one sprite to another so that it is always located at the 'bottom' of the other sprite, regardless of how the main sprite is rotated.
0
votes
2answers
154 views

Sprites: Are there any tools to scale sprites individually without using Photoshop/GIMP? [closed]

I am using TexturePacker as tool to pack my 2D sprites, it is good but it doesn't provide the possibility to scale individual sprites to a specific scale. I am wondering whether there is any good ...
1
vote
1answer
343 views

Powers of 2 textures in Android 2d games?

I've read a lot about the importance of using powers of 2 png's for textures when using OpenGL ES. However, how does this relate to Google's own documentation regarding the resizing of graphics for ...
2
votes
3answers
300 views

Do larger sprite sheets improve performance in html 5 games?

I know when I did some game development with XNA they recommended that we try to group are sprites into fewer sheets because the graphic card could process it faster. Does this also apply to web based ...
0
votes
1answer
490 views

Drawing more that one quad with only one glDrawArray call…?

Edit After initially thinking that my sprite batch test was faster than calling each sprite individually, it appears that is not the case!! :-( With a single set of GL calls for a each sprite, I can ...
3
votes
2answers
549 views

Optimal OpenGL 2D Sprite Batching (Best Practice)

I am working on simple 2D engine using OpenGL (3.3+) for rendering and was wondering what the optimal method of sprite batching would be. I plan to put all sprites into one (or fewer) texture atlases. ...
0
votes
1answer
380 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 ...
0
votes
0answers
125 views

Flash CS6 Spritesheets and XNA [closed]

So new with Adobe Flash CS6 comes the new Feature to export Movie Clips as a Spritesheet which seems very nice! I have a few questions to CS6: http://imgur.com/enllkyL Its nifty but it lost its "up ...
2
votes
1answer
141 views

Get average tile color

In my 2D game I have TileSet class that loads the texture and creates Rectangle[] array which stores each tile coordinates. Pretty basic stuff. Now I'd like to also calculate and store the average ...
1
vote
1answer
480 views

Love2D : How can I keep up with lots of small sprites' collision data?

So I'm using a SpriteBatch to keep up with lots of small pieces for a falling-piece puzzle game. I have an array of Quads (for different color blocks), and they are randomly added to the ...
0
votes
2answers
1k views

How to scale a sprite with its center as origin?

I'm trying to zoom-in a sprite gradually from 0% to 100% (a sprite called SelectionBox), so it zooms from the middle of the sprite, not from the upper-left corner. I'm almost there, but I'm having ...
0
votes
1answer
311 views

Love2D : Problem rotating image in a SpriteBatch

I'm working on a falling blocks type of game with triangular pieces. I'm using a SpriteBatch to accumulate and remember the pieces and their locations. The problem is that when I rotate a scaled ...
-1
votes
1answer
218 views

Drawing multiple sprites with clear screen for every frame

I googled with best of my skills, but I cannot find any relevant answer to my problem. I'm making a game with an isometric view. I need to draw multiple sprites on the screen and before switching to ...
6
votes
1answer
803 views

2D animation: Animated 3D models or sprites with animation frames?

Starting out with new project, I am stuck choosing between: 3D textured model animated directly through the renderer 2D sprites and drawing each animation frame The game will be 2D platform, I ...
0
votes
2answers
2k views

Moving a sprite towards an x and y coordinate

Given a sprite with an x and y coordinate, how would I move it toward another sprite with an x and y coordinate? I've already made it face towards the other sprite, and I've made it move towards the ...
-1
votes
2answers
1k views

Semi Transparent Background in Scene [closed]

In my game I want to create game over scene which is semi transparent so game scene become partially visible. Game over scene contain several button that are not transparent but I need only ...
2
votes
2answers
2k views

Common practice when handling sprite animation

Let's say I'm using the following sprite as a sample to try LibGDX Animation and TextureRegion. http://www.smackjeeves.com/images/uploaded/comics/7/8/78bc6b62fEySW.gif As you can see, the provided ...
0
votes
1answer
257 views

Revolve FlxSprites Around a Central FlxSprite in Flash Game made with Flixel

I have been working on a Flash game made in Flash Builder using the Flixel library. I have been trying to dynamically create a group of FlxSprites , and revolve them around a player controlled class ...