A 2D rendering of an object in space.

learn more… | top users | synonyms (1)

3
votes
1answer
295 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 = ...
3
votes
2answers
2k views

Detect multitouch (two fingers touch) on a sprite to apply pinch zoom behaviour

I am using andengine, want to move, zoom and rotate multiple sprites individually on a scene. I have achieved "move" but for pinch zoom i am unable to get the event to two fingers' touch. Below is the ...
3
votes
1answer
413 views

Scaling sprite velocity / co-ordinatesin Android

I'm trying to find the answer to a question that I've had for a long time, but am having trouble finding it! I hope someone can help :-) I'm trying to find information on how to scale sprite velocity ...
3
votes
3answers
176 views

Collision and Graphics integration

I'm a little confused about the integration between collision and graphics. They both need to share the same position in the world. The most obvious choice is the center of the entity, which is good ...
3
votes
1answer
2k views

Spritesheet per pixel collision XNA

So basically i'm using this: public bool IntersectPixels(Rectangle rectangleA, Color[] dataA,Rectangle rectangleB, Color[] dataB) { int top = Math.Max(rectangleA.Top, rectangleB.Top); ...
3
votes
1answer
154 views

Coordinate based travel through multi-line path over elapsed time

I have implemented A* Path finding to decide the course of a sprite through multiple waypoints. I have done this for point A to point B locations but am having trouble with multiple waypoints, because ...
3
votes
1answer
342 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 ...
3
votes
2answers
2k views

Sprite Animation in XAML/C# for Windows 8 Modern UI (Metro)

I'm working on a project that requires doing sprite based animation in XAML / C# for a windows store app. I've worked out a method for displaying the animation, but it causes flickering during the ...
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 ...
3
votes
1answer
266 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 ...
2
votes
1answer
2k views

Collision detection with non-rectangular images

I'm creating a game and I need to detect collisions between a character and some parts of the environment. Since my character's frames are taken from a sprite sheet with a transparent background, I'm ...
2
votes
2answers
5k views

How can I draw a simple 2D line in XNA without using 3D primitives and shders

I would like to be able to draw arbitary lines in my sprite based 2D XNA game. How can I draw a simple line on screen in XNA without dealing with vertex arrays or shaders.
2
votes
2answers
244 views

What kind of projection is used here?

Tibia is a 2d game, but it's sprites are drawn using certain kind of orthographic projection that is not the same I'm used to: I'm trying to figure out what projection is used here. I've guessed ...
2
votes
2answers
157 views

Pathplanning A* Getting stuck in wall

I'm having a problem with my pathplanning. I can plan a path and make my character follow it, that's not a problem but then i plan a path around a wall it takes the shortest way as A* suggests, which ...
2
votes
1answer
612 views

Rotating a group of sprites - How to calculate origin

I am rotating a group of sprites in XNA, which I developed with the help of the following example: http://msdn.microsoft.com/en-us/library/bb194912%28v=xnagamestudio.10%29.aspx It all works very ...
2
votes
2answers
334 views

How do you handle animations that are for transitioning between states?

How does one usually handle animations that are for going between a game object's states? For example, imagine a very simple game in which a character can only crouch or stand normally. Currently, I ...
2
votes
2answers
381 views

Frameskipping in Android gameloop causing choppy sprites (Open GL ES 2.0)

I have written a simple 2d platform game for Android and am wondering how one deals with frame-skipping? Are there any alternatives? Let me explain further. So, my game loop allows for the ...
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 ...
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 ...
2
votes
2answers
227 views

Loading Texture2D is extremly slow on XBOX360

I have ~100 sprites for each level im my XNA game. On windows it takes ~2 seconds to load them all. Unfortunately on XBOX360 it takes ~30-60 seconds. Am i doing something wrong? Essentially the ...
2
votes
3answers
411 views

Animation with non-uniform frame sizes

How do you know when to draw the next frame if its bounding box is larger/smaller than the current? For example, in KOF, some characters have elastic arms and things of the like..How are these handled ...
2
votes
3answers
4k views

Sprite sheet generator

I need to generate a sprite sheet with squared sprite for a 2D game. How can I generate a sprite sheet where each frame has x = y? The only think I have to do is to "insert" some blank space between ...
2
votes
1answer
337 views

Sprite vs 3d Model in Flash Facebook Game

I'm looking at creating a real time strategy/tower defense mashup game for facebook (and other platforms like google+) along the same feel, but of course different mechanics, as backyard monsters. ...
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 ...
2
votes
3answers
424 views

How can I create a spritesheet animation with big images?

If I have a 200x200 pixel sprite, and I want to create an animation for it with 30 different frames, how can I accomplish that? I can't put them on one texture/spritesheet.
2
votes
1answer
356 views

What exactly are sprites and entities and what are the differences between the two?

Well I was looking at a few game based tutorials, as well as articles. I found out about two terms: Entities and Sprites. Now they seem related but different, what is each and how are they the same ...
2
votes
2answers
337 views

Is it better to cut and store all sprites needed from a spritesheet in memory, or cut them out just-in-time?

I'm not sure what's best practice here as I have little experience with this. Essentially what I am asking is... if it's better to get your single PNG with all your different sprites on it for use ...
2
votes
2answers
6k views

Exporting the frames in a Flash CS5.5 animation and possibly creating the spritesheet

Some time ago, I asked a question here to know what would be the best way to create animations when making an Android game and I got great answers. I did what people told me there by exporting each ...
2
votes
1answer
481 views

Is there a technique to creating a “black hole” background in XNA?

I'm creating application in XNA 4.0 and am trying to create a specialized background. I'm familiar with the creation of a parallax scrolling background but I'd like to create a background image that ...
2
votes
1answer
725 views

How to move a 2d sprite to a target location while avoiding obstacles?

How can I get a 2d sprite to move to a position clicked on the screen, without bumping into other objects? I'm programming in java using the android API library I have created a surface view and ...
2
votes
2answers
1k views

State of the art in image compression?

I'm looking for good algorithms for compressing textures offline (ie decompressing them at install or load time, I know about using DXT/3DC to save runtime video memory, but these create awful visual ...
2
votes
1answer
193 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 ...
2
votes
2answers
172 views

Replicating no. of sprites without letting the app to slow down and crash

Is it possible that if I'm making a a simple drag-n-drop game, does making a new sprite via constructor with texture as a parameter makes the game slower and depletes more memory until it crashes or ...
2
votes
3answers
498 views

Move a 2D sprite into an irregular terrain

With a tile based engine, in my knowledge, is not possible to move a sprite into an irregular terrain. So which are the techniques to use for implementing that? Maybe an hexagonal tile based engine?
2
votes
2answers
1k views

How does sprite customization in 2D games work?

I´m working on the design of a new game concept at the moment and I would like to know how to handle a customization of sprites. (In 2D that is, hence the topic.) This is my scenario: The player will ...
2
votes
1answer
400 views

Customize Colors for Sprites in Web Game

So I'm working on an html5/javascript/css3-based game. Without going into too much detail, I'm thinking of having the characters be simple 8 or 16-bit style sprites, but I'd like to allow the user to ...
2
votes
2answers
984 views

How do I apply pixel shader to specific sprite in XNA 4.0 in a spritesort FrontToBack?

I have a set of sprite drawn in FrontToBack sortmode. In XNA 4.0, the effect must be as an input argument of Begin() function of SpriteBatch. However, If I reinvoke the function, then the sprite ...
2
votes
2answers
2k views

Sprite-sheets vs Sprites/MovieClips in Flash

We create 3D models in Maya2011 and create PNGs and import the bunch into Adobe Flash CS5 to create a sprite. I read somewhere that sprite-sheets can save space over making the sprite in Flash. How ...
2
votes
1answer
397 views

Rendering an explosion in 3D Studio Max to a spritesheet?

I'd like to render a 3D explosion in 3DS Max but into a sprite sheet. My main problem is that I need to use alpha values instead of the viewport background (which is usually black). Any ideas how I ...
2
votes
1answer
343 views

What is an OpenGL equivalent to ID3DXSprite?

As a Direct3D developer I can use the ID3DXSprite class (in D3DX library) for drawing 2D graphics. What's the best way to implement this functionality in OpenGL?
2
votes
3answers
1k views

Make a laser beam effect with Ogre and a BillboardChain

http://www.lpi.usra.edu/lunar/missions/apollo/apollo_15/images/laser_beam_lg.gif I want to be able to such an effect, but I don't really know how the BillboardChain class works or how I can use it, ...
2
votes
1answer
230 views

How can I correctly line up differently sized animation frames with a character?

For educational purposes, I'm developing a 2d game without APIs or libraries. Currently I'm stuck with a sprite drawing problem. To store sprites for drawing (assuming I have the sprites I need all ...
2
votes
3answers
248 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 ...
2
votes
1answer
267 views

Is it possible to achieve a smooth sprite animation with a fixed 60 FPS using Java 2D?

I've seen a lot of different game loops, and before implementing anything complicated I decided to start with a capped 60 FPS. My run method looks like this in my game thread: /** * Fixed Frames Per ...
2
votes
2answers
661 views

How to implement pathfinding in this situation

So I'm creating a game for android using the libgdx library. I render the map from a tmx file and in it all the water tiles have the property of blocked. My player(a sprite) moves to where I ...
2
votes
1answer
324 views

Which camera angle is used for these sprites?

I am trying to replicate these sprites: But I am not managing to make sense of how it is done. The character is facing forward ( <--- ), but you can see the front of its body instead of just ...
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 ...
2
votes
1answer
419 views

High volume sprite management in entity component system

I'm working on an entity-component-system based 2.5d game. That is, entities are groups of components that are processed by systems. I am having a hard time seeing how a sprite rendering system, that ...
2
votes
1answer
966 views

Sprite animation in openGL - Some frames are being skipped

Earlier, I was facing problems on implementing sprite animation in openGL ES. Now its being sorted up. But the problem that i am facing now is that some of my frames are being skipped when a bullet(a ...
2
votes
1answer
368 views

How can you represent equip-able items in a 2d game?

I've been working on an item system for a post-apocalyptic RPG, with diablo as inspiration, and it would be awesome if I could visually represent an item that can be equipped on the player sprite. I ...