A 2D rendering of an object in space.

learn more… | top users | synonyms (1)

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 ...
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
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 ...
2
votes
2answers
238 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
4answers
4k views

Unity: Flip Sprite Direction

I'm toying around with the new Sprite class in Unity, and I'm trying to work out how to change the direction the sprite is facing ("flip" it). I'm sure I can most likely just scale it across the x ...
2
votes
1answer
600 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
320 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
136 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
2answers
243 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
350 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
275 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
222 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
386 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
332 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
395 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
317 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
290 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
5k 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
430 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
702 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
903 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
153 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
144 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
457 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
368 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
914 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
388 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
336 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
144 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
186 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
211 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
477 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
231 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
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 ...
2
votes
1answer
384 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
345 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 ...
2
votes
1answer
3k views

AndEngine sprite movement

I want to ask that I have a player in my game. I may walk. I have a image which has five different frames for walk and two frames for standing position. I want to ask that how can I change the images ...
2
votes
2answers
2k views

2D animation example in pyglet (python) looping through 2 images/sprites every x seconds

Suppose you have two images: step1.png and step2.png . Can anyone show me a very simple example in pyglet how to loop through those 2 images say every 0.5 seconds? The character doesn't have to ...
2
votes
2answers
358 views

How optimal do you think maintianing states in a sprite class?

Currently i'm working on a sprite system which will have frames which make animations. Usually a sprite contains current position, current frame number to be displayed in the running animation, ...
2
votes
2answers
430 views

Clipping Sprite Sheets with Variable Placement

I was looking at some sprite sheets at sprite sheet database. I noticed that some of the sprite sheets had several different objects placed together in one file. Some of the sprites, such as movement ...
2
votes
3answers
176 views

Sprites saved in INA and AN format?

im not sure if this is a suitable question but i found a game that had all it is sprites and stuff saved in INA and AN format and i got curious to know which program is it... Or is it some sort of ...
2
votes
1answer
4k 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 ...
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 ...
2
votes
1answer
215 views

Sprite Animation Using Multiple Images (XNA / C#)

all. Right now I am currently working on a game with my Australian buddy and I just am having such a difficult time with the spriting process. As the programmer of our game, it is my responsibility ...
2
votes
1answer
906 views

Android 2D game, shooting and getting animation to stop

I'm developing a game as a learning-process, and since everything I do is new to me, I have alot of problems, usually I can fix it myself but right now I'm stuck and need help. Link to a recording of ...