A 2D rendering of an object in space.

learn more… | top users | synonyms (1)

1
vote
2answers
173 views

XNA slowly stops sprite movement on key released

I'm making a game where player moves around a spaceship pressing W,S,A,D. What I would like to achieve is that I would like to make the ship stop slightly when a key is released before it went to full ...
2
votes
1answer
159 views

re-using objects

I'm working with openGL ES 2.0 on Android and I've created a custom 'Quad' class. This allows me to make a sprite object like so: Quad mySprite = new Quad(); mySprite.setSize(w,h); ...
1
vote
1answer
718 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
187 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
270 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
243 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
261 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
369 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
1k 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
133 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
162 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
100 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
285 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
220 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
80 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
132 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 ...
0
votes
1answer
332 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
168 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
35 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
88 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
857 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
100 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
165 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
92 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
805 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
1k 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
66 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
348 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
2k 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
849 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
315 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
181 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
144 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
313 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
274 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
361 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 ...
1
vote
0answers
345 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. ...
2
votes
1answer
4k views

Managing sprite sheets for animation [closed]

I am trying to use a sprite sheet for animation but I'm having some trouble with my implementation. The three key things that I require my code to do are: Play through a set of images once, for ...
0
votes
1answer
317 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
116 views

Flash CS6 Spritesheets and XNA

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
133 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
422 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
264 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
197 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
631 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 ...
-1
votes
2answers
1k 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 ...