A 2D rendering of an object in space.

learn more… | top users | synonyms (1)

4
votes
2answers
1k views

LibGDX stretching 2d graphics

I have a problem with stretching sprites in LibGDX. I have one png file for the sky in the game (1 x 1000px) and I want to render it 1000 x 1000px sprite.setSize(pixelWidth,pixelHeight); I want to ...
4
votes
1answer
1k views

Orthographic Camera Zooming

In XNA I am using a spritebatch to render a board. I have created a camera class which can provide me a view and projection matrix. Currently I am supplying the view matrix to my sprite batch when I ...
4
votes
1answer
241 views

Letting the user draw a Polygon Body and Image

In my game, I want to provide the user with a drawing feature. By free hand drawing, the user creates a polygon shape. Then, in my game implementation, I have to create a body for the found vertices ...
3
votes
1answer
664 views

How do I make a jumping dolphin rotate realistically?

I want to program a dolphin that jumps and rotates like a real dolphin. Jumping is not the problem, but I don't know how to make the rotation. At the moment, my dolphin rotates a little weird. But I ...
3
votes
2answers
17k views

How are 8/16 bit sprites created?

I already found this question, but it only talks about the kind of software used - not the actual methods. Were they drawn at a high resolution first and then shrunk down? Or did you just zoom way in? ...
3
votes
1answer
539 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 ...
3
votes
2answers
682 views

SpriteSheet Animation with XNA

Hi i'm working on my First 2D Game with XNA and I have a little problem. To give a running effect to my Sprite, I scroll through a SpriteSheet with this code(running right): if (AnimationDelay == 6) ...
3
votes
2answers
672 views

Better to use fixed sprite size or variable sprite sizes in a sprite sheet?

you have N frames for an animation (an idle animation for example) of a 2D character. What is the best resolution to use for each frame? The problem is that if you save the N frames such that each of ...
3
votes
3answers
455 views

What's the best place to showcase my pixel art?

I recently started learning spriting/pixel art to help propel my game development endeavors and I've gotten to the point where I'd like to start sharing it for comments, critiques and other feedback. ...
3
votes
4answers
533 views

Is character movement with an animated sprite controlled by the animation itself or moved manually?

How is a walking animation of a given character designed? I can see two possible ways: The first way is to draw each frame of the animation such that, if the frames are displayed at position (0,0), ...
3
votes
2answers
505 views

Sprites are sometimes blurry in Flash

I am playing around with drawing an SVG sprite (imported in through [Embed]). Depending on the coordinates of the image, sometimes it appears more crisp than others. The following image shows how at ...
3
votes
1answer
603 views

Collision and response between sprites?

What is an easy way to have sprites collide and react to the collision? E.g. if I'm writing a game in XNA or with Canvas 2D and need to write the code myself very simply.
3
votes
3answers
715 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.
3
votes
3answers
3k views

what is more expensive 2D sprites or 3D models?

Me and my friends are programmers.We decided to try ourselves in game design. As we don't want to find ourselves in debts, we decided to avoid investors. We want to develop and publish a couple of ...
3
votes
2answers
1k views

How do you set the movement speed of a sprite?

I'm using Slick 2D/Java to play around with graphics. Getting an image to move is easy: Input input = gc.getInput(); if(input.isKeyDown(sprite.up)){ sprite.y--; }else if ...
3
votes
2answers
1k views

What is causing these visual artifacts on my OpenGL sprites?

What could be the cause of the defects in my characters sprite? I am using OpenGL ES 2.0. I draw my sprites in a sprite batch that uses UV coordinates from one large texture atlas. If you look around ...
3
votes
2answers
936 views

Managing animations

I'm developing a 2d game that requires sprite based animations. I was thinking about which is the most convenient way to manage many of these sprites all together with timings. I already know how ...
3
votes
2answers
1k views

How can i create sprite sheet from 3d model (3D studio max)

I built simple 3D model of a car, with simple animation in which it's wheels are turning. Now i want to create a sprite sheet, the only way i know how to do it, is to render manually 20 frames from ...
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
2answers
960 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 ...
3
votes
1answer
271 views

Combining multiple sprites vs separate sprites

I have a character which can hold ten types of weapons. Should I: Create ten sets of animations for the character with each weapon Create animations for each weapon, and programmatically draw them ...
3
votes
2answers
2k views

Turning model from 3ds max file into sprite

I'm planning to buy animated 3D assets to render and use as 2D sprites in my game, but i don't know anything about 3ds max or own any software. How do i render the animations (i need top-down ones) to ...
3
votes
1answer
466 views

How to prepare a sprite for a game?

For example, I created my character drawing on Paint.NET using the Pencil tool and now it's a sprite like asset. If I want him to move do I need to create many different poses for him and render them ...
3
votes
1answer
94 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 ...
3
votes
1answer
103 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) ...
3
votes
2answers
153 views

How can I draw a texture line by line

I wish to draw a texture to the screen line by line (horizontal lines). Can I do this in xna? At first I wish to just start at the top of the texture, draw one single horizontal line of pixels and x ...
3
votes
1answer
2k views

How to “swing” bounding box and update collision for sprite swinging a weapon?

I have a simple question about sprite swinging weapons. I am making an RPG and would like something other than stabby-swords, so why not swinging swords? I have a bounding rectangle for them, and the ...
3
votes
2answers
4k views

Cocos2d rotating sprite while moving with CCBezierBy

I've done my moving actions which consists of sequences of CCBezierBy. However I would like the sprite to rotate by following the direction of the movement (like an airplane). How sould I do this with ...
3
votes
2answers
651 views

XNA 4.0: Trouble Aligning an Animating Sprite (Texture Origin)

I'll try to explain this as best as I can. I'm trying to build a game where there exists a "Surfer" who is surfing down a rail. I have a sprite sheet for the surfer however I have been running into ...
3
votes
3answers
1k views

How to animate a character from a sprite sheet?

I'm making an online game, and I had been using a blank square as the character until recently. Now I want to add a real, animated character. I downloaded a free sprite sheet which has 12 (3x4) ...
3
votes
1answer
332 views

Space Invaders-type game: Keeping the enemies aligned with each other as they turn around?

OK, so here's the lowdown of the problem I'm trying to solve. I'm developing a game in PyGame that's a cross between Space Invaders and Columns. I'm trying to make the motion of the enemies similar ...
3
votes
3answers
7k views

Bounding box of a rotated rectangle (2d)

I can see this has been asked before in various ways. I am struggling to work it out though hence asking again. 2d sprite that moves and rotates. I'm looking to contain it in a bounding box as it ...
3
votes
3answers
404 views

How can I get a list of sprites which are being drawn in the current viewport using XNA?

Just starting out using XNA to draw 3D scenes and have a question about determining which objects are currently visible. If I load many thousands of sprites and shapes in a scene, then render the ...
3
votes
2answers
711 views

How to store character moves (sprite animations)?

So I'm thinking about making a small rpg, mainly to test out different design patterns I've been learning about. But the one question that I'm not too sure on how to approach is how to store an array ...
3
votes
2answers
2k views

Scrolling 2D sprites on a map with a camera

I'm working on a 2D sprite-based strategy-type game (ok, full disclosure: it's a tower defense game), and I'm having a problem getting the actors to behave correctly when I move the camera. I've got ...
3
votes
1answer
271 views

Collision detection for sloping tiles

I've been looking into adding 'sloping' tiles into my platform game and my first attempt at collision detection with these tiles has produced some promising results (considering it's a first attempt), ...
3
votes
1answer
195 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!
3
votes
2answers
2k views

Point Sprites vs Textured Quads in Open GLES 2.0

I'm wondering what would perform better, point sprites (GL_POINTS) or regular sprites (GL_TRIANGLES). Here's the scenario: I am developing a simple particle system to allow me to produce various ...
3
votes
4answers
3k views

How to move a sprite automatically using a physicsHandler in Andengine?

I use a DigitalOnScreenControl (knob with a four-directional arrow control) to move the entity and the entity which is bound to a physicsHandler. physicsHandler.setEntity(sprite); ...
3
votes
1answer
679 views

How do you get textures out of a png file

I have 1 png of many different textures. I want to use these textures in my iphone game using cocos2d. I found the program "Zwoptex" where you can combine many textures to one png and create a plist ...
3
votes
1answer
117 views

Need some advice on a java api to use for a 'presentation display board' - based on game 2d/3d tech

As part of the project i am working on I am looking to produce some software that works on a LCD display (think call center info boards) and displays various graphs (the bars grow etc in realtime, so ...
3
votes
2answers
817 views

Unity - Part of the sprite is covered in shadow

I have a sprite with Transparent/Cutout/Diffuse shader. Recieving shadows is turned on in SpriteRenderer. The light is a pointlight and I am using deffered rendering path. However when I am above or ...
3
votes
1answer
149 views

How can I render a wave effect like the one used in California Games' surfing mini-game?

Well, I'm trying to study XNA, and I'm trying to make a California Games-inspired surfing game. I got the surfer guy done, and it's working very well but I don't have any idea on how I should draw ...
3
votes
1answer
240 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
1k 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
359 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
174 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
153 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
293 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 ...